LFS-FID2PATH(1)

πŸ“¦ version 2.17.58, in ubuntu stonking

πŸ’– 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 specified LINK_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 🌈

(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