[LU-9392] lfs migrate -o and lfs setstripe -o should pick OST from ost_list Created: 04/Apr/17  Updated: 01/Aug/23

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Michael Hebensteit (Inactive) Assignee: WC Triage
Resolution: Unresolved Votes: 0
Labels: medium
Environment:

lustre-client-2.7.15.3-3.10.0_229.20.1.el6.x86_64.knl2.x86_64


Issue Links:
Related
is related to LU-4665 utils: lfs setstripe to specify OSTs Resolved
is related to LU-9771 FLR1: Landing tickets for File Level ... Resolved
is related to LU-6135 improved support for selecting specif... Resolved
is related to LU-13363 unbalanced round-robin for object all... Resolved
is related to LU-11510 preserve PFL/FLR/DoM layout with lfs_... Resolved
is related to LU-14480 Setting specific OST's under pool fai... Resolved
is related to LU-15494 DNE3: "lfs setdirstripe -D" for speci... Open
is related to LU-8616 DNE3: enhance "lfs mkdir" to select s... Resolved
Rank (Obsolete): 9223372036854775807

 Description   

It would be nice if "lfs setstripe" and "lfs migrate" could pick x out of y given OSTs (y>x). AKA you tell it to stripe across 8 OSTs, give a list of 25 and "lfs migrate" pick the 8 OSTs with most space available. Currently it breaks with x != y.

For files with overstriping, "lfs setstripe -o x,y,z -C N" should repeat the x,y,z pattern until all N OSTs are selected.



 Comments   
Comment by Andreas Dilger [ 05/Apr/17 ]

This would indeed be useful. For permanent collections of "y" OSTs (e.g. different OSS storage types) it is possible to define "OST pools" and then specify a stripe count within the pool.

However, being able to use lfs setstripe -c 3 -o 3,4,13,14,23,24 for temporary collections of OSTs would also be useful, particularly since creating/removing OST pools is limited to the admin.

Comment by Andreas Dilger [ 05/Oct/17 ]

It would also be useful to be able to persistently set lfs setstripe -o layouts on a parent directory.

Comment by Emoly Liu [ 16/Mar/20 ]

It's easy to implement picking stripe_count=x out of y given OSTs (x<=y) by changing the conditions to compare stripe_count with nr_tgts in function lfs_setstripe_internal().

What I'm thinking about is the QOS policy. In function lod_alloc_ost_list(), "The exact order of OSTs requested by the user is respected as much as possible depending on OST status." It means, except that the specified OSTs are full or inactive, the OSTs will be selected from the first one in the list strictly. If we want to pick x out of y, do we still want this order? or some disorder?

Comment by Andreas Dilger [ 16/Mar/20 ]

I think in the x < y case it makes sense to use normal RR or QOS to select the starting OST and which other OSTs to use, to preserve space balance. It should be treated in the same way as if the OST list was coming from a pool.

The one difficulty that I thought about for the implementation was how to specify both the number of OSTs in the lov_user_md and the stripe count for the file?

Comment by Gerrit Updater [ 16/Mar/20 ]

Emoly Liu (emoly@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/37940
Subject: LU-9392 lfs: pick x out of y given OSTs(x <= y) for setstripe
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: ce5835193b6364fc2e853ca140aa502d9e90dddb

Generated at Sat Feb 10 02:25:47 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.