[LU-3888] lfs getstripe should print FID Created: 05/Sep/13  Updated: 29/Sep/16  Resolved: 29/Sep/16

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

Type: Improvement Priority: Minor
Reporter: Colin Faber [X] (Inactive) Assignee: WC Triage
Resolution: Fixed Votes: 0
Labels: None

Rank (Obsolete): 10132

 Description   

Given that lustre 2.x versions now support unique file identifier (FID) it would be rather useful to be able to specify that FID in lfs setstripe and lfs getstripe commands.

Right now, if you have the single FID to a file, you can use lfs fid2path, however fid2path does not provide a full path to the file, so the parent FID is required.

Once you have the parent FID and target FID you can use those to lookup the actual file path / name and then lfs setstripe / getstripe.



 Comments   
Comment by Andreas Dilger [ 06/Sep/13 ]

If you want to do operations by FID it should be possible to use /mnt/lustre/.lustre/fid/[fid_sequence:objid:ver] as the filename? I haven't tried it, but it should work in theory.

As for fid2path, this needs the mountpoint and then it can generate a full path. Without the mountpoint the FID is not unique.

Comment by Andreas Dilger [ 28/May/14 ]

This patch doesn't implement getstripe for FIDs, but it does print the FID as part of lfs getstripe output with the lmm_fid: label, which is a start:
http://review.whamcloud.com/10465

I did verify that lfs getstripe -v /mnt/lustre/.lustre/fid/[fid_seq:fid_oid:0] works properly.

I'm not sure what lfs setstripe on a FID would do, since the file has to exist already, and this typically means it will already have a layout.

Comment by Lokesh Nagappa Jaliminche (Inactive) [ 11/Sep/15 ]

I have updated patch for getting FID info with -F option and also added test case to check that. Regarding "updating man page for -F option in lfs(1)" is there any other procedure (like creating seperate ticket at LUDOC or something like that) ? because as far as I know man page is not part of the lustre code.

Comment by Andreas Dilger [ 12/Sep/15 ]

The man pages are in lustre/doc

Comment by Gerrit Updater [ 29/Sep/16 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/10465/
Subject: LU-3888 utils: print lmm_fid as part of getstripe
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 4dfa29e8e0e77add076ef992bb9061519669dc16

Comment by Peter Jones [ 29/Sep/16 ]

Landed for 2.9

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