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_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
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.

-E, --component-end, --comp-end[[+-]END_OFFSET[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_OFFSET or -END_OFFSET is used, print components with respectively a larger or smaller END_OFFSET offset.

--component-flags, --comp-flags[^]COMP_FLAG,...
    Print only the component flags. If COMP_FLAG is specified, print only components matching the specified COMP_FLAG set. If ^COMP_FLAG is used, print only components not matching COMP_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.

    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. Files with the nosync flag will also print the timestamp when the flag was set on the replica.

-I, --component-id, --comp-id[COMP_ID]
    Print only the component COMP_ID number for the component(s). The file-unique component COMP_ID is assigned as each component is created, and is not re-used. The COMP_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 COMP_ID is specified, then print only the fields for the matching component.

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

-D, --default
    Show the default layout used when creating new files in the specified directory.

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

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

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

-h, --help
    Print usage message.

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

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

    bad Files that have an invalid layout and are inaccessible.

    foreign
        Files that have a foreign (non-Lustre/free format) component. Such files may be inaccessible without external software integration.

    hole
        Files that are missing a data object, possibly due to OST failure and layout reconstruction by LFSCK.

    mdt Files that store the first data component on the MDT holding the inode.

    overstriped
        Files have more than one stripe per OST for improved lock scalability.

    raid0
        Traditional Lustre RAID-0 striping format.

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

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

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

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

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

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

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

-O, --ost OST_NAME
    Print only file layouts and OST objects on the specified OST_NAME.

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

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

-R, --raw
    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.

-r, --recursive
    Recurse into all subdirectories.

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

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

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

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

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

-y, --yaml
    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
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

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

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