[LU-9343] hsm: lfs hsm_remove needs --mntpath to use FIDS Created: 14/Apr/17  Updated: 05/Aug/20  Resolved: 22/Nov/17

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

Type: Bug Priority: Minor
Reporter: CEA Assignee: Hongchao Zhang
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
is related to LU-9345 tests: sanity-hsm: test_29d: hsm_remo... Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

But when running lfs hsm_remove, one will notice that you cannot use FIDS:

#> lfs hsm_remove 0x200000401:0x1:0x0
Cannot stat 0x200000401:0x1:0x0: No such file or directory

Unless you use the --mntpath/-m option:

#> lfs hsm_remove --mntpath $MOUNT 0x200000401:0x1:0x0

The usage message of lfs hsm_remove:

usage: hsm_remove [--filelist FILELIST] [--data DATA]
                  [--mntpath MOUNTPATH] [--archive NUM] <file|FID> ...

Note: To remove files from the archive that have been deleted on
Lustre, set mntpath and optionally archive. In that case, all the
positional arguments and entries in the file list must be FIDs.

The note is about files that have been removed from Lustre.

I think a better usage message would be for example:

usage hsm_remove [--filelist FILELIST] [--data DATA] [--archive NUM]
                  (FILE [FILE] | --mntpath MOUNTPATH FID [FID])

Note: one can remove data from the backend associated to deleted files
in Lustre. To do so the --mntpath option is required and one has to use
FIDS instead of file paths.


 Comments   
Comment by Peter Jones [ 17/Apr/17 ]

Hongchao

Could you please assist with this one?

Thanks

Peter

Comment by Gerrit Updater [ 28/Apr/17 ]

Hongchao Zhang (hongchao.zhang@intel.com) uploaded a new patch: https://review.whamcloud.com/26882
Subject: LU-9343 utils: update the usage of hsm_remove
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: c50deda22bce84bd71213439c9845083318b8e77

Comment by Gerrit Updater [ 22/Nov/17 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/26882/
Subject: LU-9343 utils: update the usage of hsm_remove
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 0d63e3c7490d63cc628073b0af173928ac6cfc38

Comment by Peter Jones [ 22/Nov/17 ]

Landed for 2.11

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