[Lustre-discuss] redistribute used space to other OSTs (free space)

Brian J. Murrell Brian.Murrell at Sun.COM
Tue Nov 4 08:49:35 PST 2008


On Tue, 2008-11-04 at 17:47 +0200, Alex wrote:
> Now i have:
> [root at rhclm ~]# cat /proc/fs/lustre/lov/testfs-mdtlov/qos_prio_free
> 90%

That is the default value, which should result in a more-or-less equal
usage (in terms of percentages) of all OSTs.

> How can i do this? lctl conf_param testfs-MDT0000.lov.qos_prio_free=100 will 
> do the trick?

No.  Look at the deactivate option of lctl in the manpage.

> All right. Let me explain better... I found that /mnt/lustre/test3.img is 12Gb 
> in size and is striped between all OSTs (arround 3GB/OST). Indeed, if i 
> remove /mnt/lustre/test3.img i'll get some free space on OST:0, as well as on 
> other OSTs.

Right.

> Now, i want to make up some free space ONLY on OST:0, MOVING some 
> objects from it to another OST.

No, you don't manipulate objects directly, you let the MDS take care of
allocation.

> [root at rs1 ~]# lfs getstripe /mnt/lustre/test3.img
> OBDS:
> 0: testfs-OST0000_UUID ACTIVE
> 1: testfs-OST0001_UUID ACTIVE
> 2: testfs-OST0002_UUID ACTIVE
> 3: testfs-OST0003_UUID ACTIVE
> /mnt/lustre/test3.img
>         obdidx           objid          objid            group
>              0               7            0x7                0
>              2               6            0x6                0
>              3              70           0x46                0
>              1              69           0x45                0
> 
> [root at rs1 ~]#
> 
> So, how can i move objid=7 from OST:0 to OST:2, keeping 
> intact /mnt/lustre/test3.img file?

You can't work with that much precision.  You first deactivate the OST
on the MDS, then when you cp the file, the destination file will be
restriped, but will not get striped to the deactivated OST.  You must
note that the copied file does not inherit the striping policy of the
original automatically.  If the files you want to move are just using
the filesystem default striping then this is not a problem.  However if
the striping for a directory is different than the filesystem, you will
want to create your target directory first and set the stripe policy and
then cp/rm the files.  If you have striping policies on individual files
then you have to address them on a case by case basis.

I said earlier that you could use mv.  I'm not positive that will always
have the desired results so likely you should stick with cp/rm.

b.





More information about the lustre-discuss mailing list