LFS-FID2PATH(1)
π LFS-FID2PATH π
okay bestie, welcome to lfs-fid2path β a page from the Lustre User Utilities manual (section 1, so it's a command, not a syscall, iykyk πΈ).
β¨ NAME β¨
lfs-fid2path β print the pathname(s) for a file identifier, no cap π«Ά
π¦ SYNOPSIS π¦
lfs fid2path [OPTION]... FSNAME|MOUNT_POINT FID...
like. that's the whole vibe. a bunch of options, then a filesystem name or a mount point, then one or more FIDs. slay β¨
π DESCRIPTION π
so basically lfs fid2path takes a numeric Lustre File IDentifier (FID) and maps it to one or more pathnames that have hard links to that file. literally it's the glow-up from a random number to an actual filename π
this is iconic for two reasons:
- it lets you resolve filenames for FIDs that show up in console error messages (yes, the cryptic number in the error message DOES have a name, we can find it π)
- it resolves all of the pathnames for a file that has multiple hard links, not just one
pathnames get resolved relative to the MOUNT_POINT you specified β or relative to the filesystem mount point if you gave an FSNAME instead. either works, the tool is flexible like that π
π OPTIONS π
-0,--print0β prints the full pathname and then a NUL character instead of the newline character. perfect for piping into things that eat NULs, fr fr β¨-f,--print-fidβ print the FID along with the path. two for one, we love a bundle π-c,--print-linkβ print the current link number with each pathname or parent directory. very demure, very informative π-l,--link=LINK_NUMβ if a file has multiple hard links, only print the specifiedLINK_NUM, and heads up: it starts counting at link 0. so if you're passing multiple FIDs but you only need one pathname per file? use--link=0. periodt π-n,--nameβ print only the filename instead of the whole pathname. short, sweet, straight to the point π¦
πΈ EXAMPLES πΈ
here's the tea, in code:
# lfs fid2path /mnt/testfs [0x200000403:0x11f:0x0]
/mnt/testfs/etc/hosts
# lfs fid2path -0 /mnt/lustre 0x200000401:0x6:0x0 | xargs --null
/mnt/lustre/Test_
file /mnt/lustre/Link_
file
# lfs fid2path -n /mnt/testfs [0x200000403:0x11f:0x0]
hosts
first one: mount point in, FID in, path out. second one: that -0 NUL-separated output feeding straight into xargs --null like a well-behaved little pipeline π«Ά third one: -n giving you just hosts, no directory drama. chef's kiss π
β AVAILABILITY β
lfs fid2path is part of the lustre(7) filesystem package since release 2.0.0. it's been around, it's established, it's giving legacy icon π
π SEE ALSO π
lfs(1)lfs-getstripe(1)lfs-path2fid(1)llapi_fid2path(3)lustre(7)
(all of these are your besties too, go say hi π§)
and that's the page!! this one came from Lustre, dated 2024-08-15, page LFS-FID2PATH(1) β mwah, go resolve some FIDs bestie, you've got this πβ¨π
π¦ where this page comes from
- ubuntu stonking: lustre-client-utils 2.17.58+dfsg-0ubuntu2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms