lfs-getstripe(1)

NAME
lfs-getstripe - Lustre client command to print layout parameters of a file

SYNOPSIS
lfs getstripe [--component-count|--comp-count]
      [--component-end|--comp-end|-E[=[+-]end[KMGTPE]]
      [--component-flags|--comp-flags[=flags]]
      [--component-id|--comp-id[=id]|-I[id]]
      [--component-start[=[+-]start[KMGTPE]]]
      [--extension-size|--ext-size|-z]
      [--directory|-d] [--fid|-F] [--generation|-g] [--help|-h] [--hex-idx]
      [--layout|-L] [--mdt|--mdt-index|-m] [--ost|-O <uuid>]
      [--pool|-p] [--quiet|-q] [--recursive|-r]
      [--raw|-R] [--stripe-count|-c] [--stripe-index|-i]
      [--stripe-size|-S] [--mirror-count|-N]
      [[!] --mirror-index=[+-]<index> | [!] --mirror-id=[+-]<id>]
      [--verbose|-v] [--yaml|-y][--no-follow] <dirname|filename> ...

DESCRIPTION
lfs getstripe is used to list the layout/striping information for a given filename or directory tree. By default the stripe_count, stripe_size, stripe_offset, and allocated OST objects for each file will be shown. If you only want specific layout information to be printed, then the --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 options, or equivalent single-character options, can be used without an argument to return only the specified field(s).

You can limit the displayed content to one or more specific components or mirror of a composite file layout by specifying the matching parameter(s) for the --component-id, --component-flags, --component-start, --component-end, --mirror-index, or --mirror-id, or their single-character options. For single-character options, the argument must follow the option without a space, and for long options an '=' sign must be used.

The default behavior when a directory is specified is to list the striping information for all files within the specified directory (like 'ls -l <directory>').

OPTIONS

--component-count|--comp-count
    Print only the number of components in the file's layout.

--component-end|--comp-end[=[+-]end[KMGTPE]]|-E[[+-]end[KMGTPE]]
    Print only the component end offset (in bytes) for the component(s). If the component end offset is specified (with optional suffix for SI units), print only the attributes of the component(s) with the given end offset. If +end or -end is used, print components with respectively a larger or smaller end offset.

--component-flags|--comp-flags[=[^]flag,...]]
    Print only the component flags. If flag is specified, print only components matching the specified flag set. If ^flag is used, print only components not matching flag. Multiple flags may be specified, separated by commas. Valid flag names are:

    init
        Component has been initialized (has allocated OST objects).

    stale
        Replicated (mirrored) components that do not have up-to-date data. Stale components will not be used for read or write operations, and 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. For example, because they are located on SSD-based OSTs, or are more local on the network to clients.

    nosync
        Replicated (mirrored) components that do not resync using lfs mirror resync. Files with the nosync flag will also print the timestamp when the flag was set on the replica.

--component-id|--comp-id[=id]|-I[id]
    Print only the component ID number for the component(s). The file-unique component ID is assigned as each component is created, and is not re-used. The ID is not necessarily related to the offset of the component within the file, in particular since replicated file layouts may have overlapping extents. If id is specified, then print only the fields for the matching component.

--component-start|--comp-start[=[+-]start[KMGTPE]]
    Print only the component start offset (in bytes) for the component(s). If the component start offset is specified (with optional suffix for SI units), print only the attributes of the component(s) with the given starting offset. If +start or -start is used, print components with respectively a larger or smaller start offset.

--directory|-d
    Get striping information for only the specified directory, like 'ls -d'.

--fid|-F
    Show only the 128-bit unique Lustre File Identifier (FID).

--generation|-g
    Print only the layout generation number.

--help|-h
    Print usage message.

--hex-idx
    Print OST and MDT indexes in hexademical rather than decimal.

--layout
    Show only the file layout, which is one of:

    raid0
        Traditional Lustre RAID-0 striping format.

    released
        HSM-archived files that are not resident in the filesystem.

    mdt Files that have the first data component on an MDT.

--mdt|--mdt-index|-m
    Show the MDT index on which the file or directory inode is located.

--mirror-count|-N
    Print the number of mirrors on the file.

--mirror-index=[+-]<index>
    Print only the components of <index>-th mirror, based on the order that the mirror components are stored in the file layout. The index starts at 1. If +index or -index is used, print components of mirror(s) respectively later or earlier than the index-th mirror.

    !   Negates the meaning. Using + before index means mirror appears 'later than index', - before index means mirror appears 'earlier than index'. If neither is used, it means 'equal to index'.

--mirror-id=[+-]<id>
    Print only the components of the mirror with ID of id. The mirror IDs are assigned to new mirrors as they are created, but may not be sequential if some mirrors are removed. If +id or -id is used, print components of mirror(s) with respectively a larger or smaller mirror ID of id

    !   Negates the meaning. Using + before id means mirror with ID 'larger than id', - before id means mirror with ID 'smaller than id'. If neither is used, it means 'equal to id'.

--ost|-O
    Print only the components located on a specific OST.

--pool|-p
    Print only the OST pool name on which the file was created.

--quiet|-q
    Print only allocated objects for each file, not other layout parameters.

--raw|-R
    Print layout information without substituting the filesystem's default values for unspecified fields. If the file layout is not set, 0, 0, and -1 will be printed for the stripe_count, stripe_size, and stripe_offset respectively.

--recursive|-r
    Recurse into all subdirectories.

--stripe-count|-c
    Print the number of stripes in the file. For composite files this is the stripe count of the last initialized component.

--stripe-index|-i
    Print the starting OST index for the file layout.

--stripe-size|-S
    Print the stripe size in bytes. For composite files this is the stripe size of the last initialized component.

--extension-size|--ext-size|-z
    Print the extension size in bytes. For composite files this is the extension size of the first extension component.

--verbose|-v
    Also print the layout magic, FID sequence, FID object ID, and FID, in addition to the normally-printed attributes.

--yaml|-y
    Always print the layout in YAML format, rather than only using this format for composite files.

--no-follow
    Print the stripe information of symbolic link itself.

EXAMPLES

$ lfs getstripe -v /mnt/lustre/file1
    List the detailed object allocation of the given file.

$ lfs getstripe -v -I2 /mnt/lustre/file1
    List the detailed information of only component with ID 2 of the given file.

$ lfs getstripe --mirror-index=+1 /mnt/lustre/file1
    Print the mirror(s) appearing later than the first mirror in the the file.

$ lfs getstripe ! --mirror-id=2 /mnt/lustre/file1
    Print the mirror(s) with mirror ID other than 2 in the file.

$ lfs getstripe --component-flags=^init -I /mnt/lustre/file1
    Print only the component IDs for all the uninitialized components.

$ lfs getstripe --component-flags=init,^stale -I /mnt/lustre/file1
    Print only the component(s) that are instantiated but not stale.

$ lfs getstripe -E-64M /mnt/lustre/file1
    List information of components in a file with extent end less than 64MiB.

$ lfs getstripe -I3 --component-start /mnt/lustre/file1
    Print only the component start for the component with ID of 3

$ lfs getstripe --yaml /mnt/lustre/file1
    Lists the information of the components of a file in YAML format.

AUTHOR
The lfs command is part of the Lustre filesystem.

SEE ALSO
lfs(1), lfs-find(1), lfs-getdirstripe(1), lfs-setstripe(1), lustre(7)