LFS-GETSTRIPE(1)

๐Ÿ“ฆ version 2.17.58, in ubuntu stonking

๐Ÿ‘‘ LFS-GETSTRIPE ๐Ÿ‘‘

okay so welcome to LFS-GETSTRIPE(1), straight outta the Lustre User Utilities manual โ€” section 1, users' commands, periodt ๐Ÿ’… this is the one you run when you wanna know exactly how a file's data is laid out across the filesystem and you're not about to guess. no cap.


โœจ NAME โœจ

lfs-getstripe โ€” the Lustre client command that prints the layout parameters of a file ๐Ÿฆ‹


๐ŸŒธ SYNOPSIS ๐ŸŒธ

like, here's the whole vibe, verbatim, don't @ me:

lfs getstripe [--component-count|--comp-count]
              [--component-end|--comp-end|-E[=[+-]END_OFFSET [KMGTPE]]
              [--component-flags|--comp-flags[=COMP_FLAGS]]
              [--component-id|--comp-id [=COMP_ID]|-I[COMP_ID]]
              [--component-start[=[+-]START_OFFSET[KMGTPE]]]
              [--extension-size|--ext-size|-z] [--default|-D]
              [--directory|-d] [--fid|-F] [--generation|-g] [--help|-h]
              [--hex-idx] [--layout|-L] [--mdt|--mdt-index|-m]
              [--ost|-O OST_NAME] [--pool|-p] [--quiet|-q]
              [--recursive|-r] [--raw|-R] [--stripe-count|-c] [--stripe-
              index|-i] [--stripe-size|-S] [--mirror-count|-N]
              [[!]--mirror-index=[+-]MIRROR_INDEX | [!]--mirror-
              id=[+-]MIRROR_ID] [--verbose|-v] [--yaml|-y] [--no-follow]
              FILENAME|DIRECTORY ...

๐Ÿ’– DESCRIPTION ๐Ÿ’–

so lfs getstripe is literally here to list the layout / striping info for a filename or a whole directory tree, bestie. by default it shows you the stripe_count, stripe_size, stripe_offset, and all the allocated OST objects for every file. that's the default dump, no notes. ๐Ÿ’…

but bestie, if you only want specific layout info printed? you can totally just use --stripe-count, --stripe-size, --extension-size, --stripe-index, --layout, --fid, --generation, --component-id, --component-flags, --component-count, --component-start, --component-end, --pool, or --mirror-index or --mirror-id โ€” or the equivalent single-character options โ€” with no argument, and you'll get back just that field (or fields). the way that you can just ask for one thing and get one thing ๐ŸŽ€ iconic behavior fr fr.

you can also limit the displayed content to one or more specific components or mirrors of a composite file layout by specifying the matching parameter(s) for --component-id, --component-flags, --component-start, --component-end, --mirror-index, or --mirror-id โ€” or their single-character options. and hERE'S the catch, don't get it twisted: for the single-character options, the argument has to follow the option with no space in between, and for long options you gotta use an = sign. this is the rule. respect the rule. ๐Ÿค

and hey, default behavior when you hand it a directory? it lists the striping info for all the files inside that specified directory โ€” like ls -l DIRECTORY. cute right? ๐Ÿ˜Œ


๐Ÿ’… OPTIONS ๐Ÿ’…

okay bestie this is the whole menu, don't skip, everything matters:

  • --component-count, --comp-count โ€” prints only the number of components in the file's layout. just the count. nothing else. ๐Ÿ”ข
  • -E, --component-end, --comp-end[[+-]END_OFFSET[KMGTPE]] โ€” prints only the component end offset (in bytes) for the component(s). if you also give the component end offset (with an optional suffix for SI units), then it prints only the attributes of the component(s) with that given end offset. and if you use +END_OFFSET or -END_OFFSET, it prints components with, respectively, a larger or smaller END_OFFSET offset. ๐ŸŒˆ
  • --component-flags, --comp-flags[^]COMP_FLAG,... โ€” prints only the component flags. if you specify COMP_FLAG, it prints only the components matching that specified COMP_FLAG set. if you use ^COMP_FLAG, it prints only the components that don't match COMP_FLAG. you can stack multiple flags, separated by commas. the valid flag names are:
    • init โ€” the component has been initialized (meaning it has allocated OST objects). โœ…
    • stale โ€” replicated (mirrored) components that do not have up-to-date data. these stale components will not be used for read or write operations, and they need to be resynched using lfs mirror resync before they can be accessed again. โš ๏ธ
    • prefer โ€” replicated (mirrored) components that are preferred for read or write. like, for example, because they're sitting on SSD-based OSTs, or they're more local on the network to clients. ๐Ÿ†
    • prefrd โ€” replicated (mirrored) components that are preferred for read. ๐Ÿ‘€
    • prefwr โ€” replicated (mirrored) components that are preferred for write. โœ๏ธ
    • nosync โ€” replicated (mirrored) components that do not resync using lfs mirror resync. and heads up: files with the nosync flag will also print the timestamp of when the flag was set on that replica. ๐Ÿ•
  • -I, --component-id, --comp-id[COMP_ID] โ€” prints only the component COMP_ID number for the component(s). this file-unique component COMP_ID gets assigned as each component is created, and it is not re-used. also important: COMP_ID is not necessarily related to the offset of the component within the file, especially since replicated file layouts can have overlapping extents. and if COMP_ID is specified, then it prints only the fields for the matching component. ๐ŸŽฏ
  • --component-start, --comp-start[+-]START_OFFSET[KMGTPE] โ€” prints only the component start offset (in bytes) for the component(s). if you specify the component START_OFFSET offset (with an optional suffix for SI units), it prints only the attributes of the component(s) with that given starting offset. if you use +START_OFFSET or -START_OFFSET, it prints components with, respectively, a larger or smaller START_OFFSET offset. ๐ŸŒŸ
  • -D, --default โ€” shows the default layout that gets used when creating new files in the specified directory. ๐ŸŒฑ
  • -d, --directory โ€” gets striping info for only the specified directory, like ls -d. no recursion into the children, bestie. ๐Ÿšช
  • -F, --fid โ€” shows only the 128-bit unique Lustre File Identifier (FID). ๐Ÿ†”
  • -g, --generation โ€” prints only the layout generation number. ๐Ÿ”„
  • -h, --help โ€” prints the usage message. classic. ๐Ÿ†˜
  • --hex-idx โ€” prints OST and MDT indexes in hexadecimal instead of decimal. ๐Ÿ”ขโžก๏ธ๐Ÿ…ฐ๏ธ
  • --layout โ€” shows only the file layout, which is one of these bad boys:
    • bad โ€” files that have an invalid layout and are inaccessible. ๐Ÿ’€
    • foreign โ€” files that have a foreign (non-Lustre/free format) component. heads up, such files may be inaccessible without external software integration. ๐Ÿ‘ฝ
    • hole โ€” files that are missing a data object, possibly because of OST failure and layout reconstruction by LFSCK. ๐Ÿ•ณ๏ธ
    • mdt โ€” files that store the first data component on the MDT holding the inode. ๐Ÿ—„๏ธ
    • overstriped โ€” files that have more than one stripe per OST, for improved lock scalability. ๐Ÿ“ˆ
    • raid0 โ€” the traditional Lustre RAID-0 striping format. ๐Ÿงฑ
    • released โ€” HSM-archived files that are not resident in the filesystem. ๐Ÿ“ฆ
  • -m, --mdt, --mdt-index โ€” shows the MDT index on which the file or directory inode is located. ๐Ÿ“
  • -N, --mirror-count โ€” prints the number of mirrors on the file. ๐Ÿชž
  • --mirror-index=[+-]MIRROR_INDEX โ€” prints only the components of the MIRROR_INDEX-th mirror, based on the order that the mirror components are stored in the file layout. MIRROR_INDEX starts at 1. if you use +MIRROR_INDEX or -MIRROR_INDEX, it prints components of mirror(s) respectively later or earlier than the MIRROR_INDEX-th mirror. โœจ
    • ! โ€” negates the meaning. using + before MIRROR_INDEX means the mirror appears 'later than MIRROR_INDEX', and - before MIRROR_INDEX means the mirror appears 'earlier than MIRROR_INDEX '. if neither is used, it means 'equal to MIRROR_INDEX'. ๐Ÿšฆ
  • --mirror-id =[ +- ] MIRROR_ID โ€” prints only the components of the mirror with the ID of MIRROR_ID. mirror IDs are assigned to new mirrors as they are created, but they may not be sequential if some mirrors get removed. if you use +MIRROR_ID or -MIRROR_ID, it prints components of mirror(s) with, respectively, a larger or smaller mirror ID than MIRROR_ID. ๐Ÿชฉ
    • ! โ€” negates the meaning. using + before MIRROR_ID means a mirror with an ID 'larger than MIRROR_ID', and - before MIRROR_ID means a mirror with an ID 'smaller than MIRROR_ID'. if neither is used, it means 'equal to MIRROR_ID'. ๐Ÿšฆ
  • -O, --ost OST_NAME โ€” prints only file layouts and OST objects on the specified OST_NAME. ๐ŸŽช
  • -p, --pool โ€” prints only the OST pool name on which the file was created. ๐ŸŠ
  • -q, --quiet โ€” prints only the allocated objects for each file, and not the other layout parameters. ๐Ÿคซ
  • -R, --raw โ€” prints layout information without substituting the filesystem's default values for unspecified fields. and if the file layout isn't set, then 0, 0, and -1 will be printed for stripe_count, stripe_size, and stripe_offset respectively. raw is raw. ๐Ÿฅฉ
  • -r, --recursive โ€” recurses into all subdirectories. all the way down, bestie. ๐ŸŒ€
  • -c, --stripe-count โ€” prints the number of stripes in the file. for composite files, this is the stripe count of the last initialized component. ๐Ÿงฎ
  • -i, --stripe-index โ€” prints the starting OST index for the file layout. ๐Ÿšฉ
  • -S, --stripe-size โ€” prints the stripe size in bytes. for composite files, this is the stripe size of the last initialized component. ๐Ÿ“
  • -z, --extension-size, --ext-size โ€” prints the extension size in bytes. for composite files, this is the extension size of the first extension component. ๐Ÿงฉ
  • -v, --verbose โ€” also prints the layout magic, FID sequence, FID object ID, and FID, on top of the normally-printed attributes. talkative queen. ๐Ÿ—ฃ๏ธ
  • -y, --yaml โ€” always prints the layout in YAML format, instead of only using this format for composite files. ๐Ÿ“œ
  • --no-follow โ€” prints the stripe information of the symbolic link itself. don't follow the link, bestie, look at the link. ๐Ÿ”—


๐Ÿ’– EXAMPLES ๐Ÿ’–

okay bestie, this is the part where it all clicks. every example below is copied exactly so you can just paste and go bestie, no cap โœจ


list the detailed object allocation of the given file:

# lfs getstripe -v /mnt/lustre/file1

list the detailed information of only component with ID 2 of the given file:

# lfs getstripe -v -I2 /mnt/lustre/file1

print the mirror(s) appearing later than the first mirror in the file:

# lfs getstripe --mirror-index=+1 /mnt/lustre/file1

print the mirror(s) with mirror ID other than 2 in the file:

# lfs getstripe ! --mirror-id=2 /mnt/lustre/file1
bestie note the ! sitting right there before the option โ€” don't drop it, that lil guy is the whole "not this one" energy ๐Ÿ’…

print only the component IDs for all the uninitialized components:

# lfs getstripe --component-flags=^init -I /mnt/lustre/file1

print only the component(s) that are instantiated but not stale:

# lfs getstripe --component-flags=init,^stale -I /mnt/lustre/file1

list information of components in a file with extent end less than 64MiB:

# lfs getstripe -E-64M /mnt/lustre/file1

print only the component start for the component with ID of 3:

# lfs getstripe -I3 --component-start /mnt/lustre/file1

lists the information of the components of a file in YAML format:

# lfs getstripe --yaml /mnt/lustre/file1

๐Ÿซถ AVAILABILITY ๐Ÿซถ

lfs getstripe is part of the lustre(7) filesystem package since release 0.10.0 ๐Ÿ’ซ been here, been iconic, been doing the werk.


๐ŸŒˆ SEE ALSO ๐ŸŒˆ

go read your siblings, they're all serving too ๐Ÿ”ฅ


and that's the whole page bestie, you ate that ๐Ÿ’…โœจ this one's from the Lustre crew, dated 2025-12-20, and it lives at LFS-GETSTRIPE(1) in the manual. go forth and getstripe responsibly ๐Ÿฆ‹๐Ÿ’–

๐Ÿ“ฆ where this page comes from