[LU-7501] inconsistencies between "lfs find", "lfs getstripe", "lfs setstripe", "lfs setdirstripe" Created: 01/Dec/15  Updated: 25/Nov/21  Resolved: 20/Oct/16

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.8.0
Fix Version/s: Lustre 2.9.0, Lustre 2.11.0

Type: Bug Priority: Minor
Reporter: Andreas Dilger Assignee: Yang Sheng
Resolution: Fixed Votes: 0
Labels: dne3

Issue Links:
Duplicate
is duplicated by LU-9378 extract lfs-getstripe.1 from lfs.1 Resolved
Related
is related to LU-7502 add lfs find --mdt-count and --mdt-ha... Resolved
is related to LU-7503 "-v" is missing for "lfs migrate -m" Resolved
is related to LU-10856 running sanity now prints "warning: '... Resolved
is related to LU-11891 make --mdt-index usage consistent Resolved
is related to LU-15276 DNE3: "lfs find" able to check defaul... Open
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

There are a number of inconsistencies in the command-line options between lfs find, lfs getstripe, and lfs setstripe/lfs migrate which are confusing and should be fixed, in a compatible manner, but deprecating the old options.

  • lfs find and lfs migrate use -m to for mdt_index, but lfs getstripe uses -M to indicate mdt_index. getstripe should use -m and deprecate -M, since find uses -M for mtime.
  • lfs setstripe uses --ost-list, but lfs find and lfs getstripe uses for --ost, but they are all conceptually the same thing. setstripe should just use --ost for this, and deprecate --ost-list as this option has only been around for a short time.
  • lfs find uses --mdt to search for a specific mdt_index, but lfs getstripe and lfs migrate use --mdt-index. find should add --mdt-index (and --mdt_index for ease of use, but not document it), and getstripe and migrate should add --mdt.

I'm not sure of a clear winner between --mdt and --mdt-index, since I don't think --mdt is confusing and it parallels --ost for OST selection, and is short and convenient. Having both is not harmful I think.

The lfs setdirstripe and lfs getdirstripe options should also be expanded to be consistent with those in lfs find and lfs getstripe, namely, add --mdt-count|-c, --mdt-index|-m, --mdt-hash as aliases for the existing --count|-c and --index|-i and --hash-type|-t options. The long -count and -index options should be deprecated with LUSTRE_VERSION_CODE checks as they were for lfs_setstripe().



 Comments   
Comment by Peter Jones [ 01/Dec/15 ]

Yang Sheng

Could you please investigate?

THanks

Peter

Comment by Andreas Dilger [ 09/Sep/16 ]

Yang Sheng, could you please take some time to make a patch for this issue.

Comment by Yang Sheng [ 14/Sep/16 ]

Hi, Andreas,

I'll produce a patch for it asap.

Thanks,
YangSheng

Comment by Gerrit Updater [ 18/Sep/16 ]

Yang Sheng (yang.sheng@intel.com) uploaded a new patch: http://review.whamcloud.com/22581
Subject: LU-7501 utils: keep lfs arguments consistently
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: de2f76c2120e36cb761574513d827c681f73416f

Comment by Gerrit Updater [ 20/Oct/16 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/22581/
Subject: LU-7501 utils: keep lfs arguments consistent
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: cdeb2f3a56e89941e6af0c83929617ed52b8cb7a

Comment by Peter Jones [ 20/Oct/16 ]

Landed for 2.9

Comment by Gerrit Updater [ 09/Dec/17 ]

Andreas Dilger (andreas.dilger@intel.com) uploaded a new patch: https://review.whamcloud.com/30464
Subject: LU-7501 utils: split getstripe and find from lfs.1
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 5e8c89444161033384b96c6bc1e6d953903a698e

Comment by Gerrit Updater [ 06/Feb/18 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/28592/
Subject: LU-7501 utils: clean up lfs argument handling/docs
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 5fee5b700d1e683d165fc0ef0ae88c2a0ab83681

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