[\fB--component-flags\fR|\fB--comp-flags\fR[\fB=\fIflags\fR]]
[\fB--component-id\fR|\fB--comp-id\fR[=\fIid\fR]|\fB-I\fR[\fIid\fR]]
[\fB--component-start\fR[\fB=\fR[\fB+-\fR]\fIstart\fR[\fBKMGTPE\fR]]]
+ [\fB--extension-size\fR|\fB--ext-size\fR|\fB-z\fR]
[\fB--directory\fR|\fB-d\fR]
[\fB--fid\fR|\fB-F\fR]
[\fB--generation\fR|\fB-g\fR]
+[\fB--help\fR|\fB-h\fR]
[\fB--layout\fR|\fB-L\fR]
[\fB--mdt\fR|\fB--mdt-index\fR|\fB-m\fR]
[\fB--ost\fR|\fB-O\fR <\fIuuid\fR>]
[\fB--raw\fR|\fB-R\fR]
[\fB--stripe-count\fR|\fB-c\fR]
[\fB--stripe-index\fR|\fB-i\fR]
- [\fB--stripe-size\fR|\fB-S\fR]
-[\fB--verbose\fR|\fB-v\fR]
-[\fB--yaml\fR|\fB-y\fR]
- <\fIdirname\fR|\fIfilename\fR> ...
+ [\fB--stripe-size\fR|\fB-S\fR] [\fB--mirror-count\fR|\fB-N\fR]
+ [[\fB!\fR] \fB--mirror-index\fR=[\fB+-\fR]\fI<index>\fR | [\fB!\fR] \fB--mirror-id\fR=[\fB+-\fR]\fI<id>\fR]
+ [\fB--verbose\fR|\fB-v\fR]
+[\fB--yaml\fR|\fB-y\fR][\fB--no-follow\fR]
+<\fIdirname\fR|\fIfilename\fR> ...
+
.SH DESCRIPTION
.B lfs getstripe
is used to list the layout/striping information for a given filename or
specific layout information to be printed, then the
.BR --stripe-count ,
.BR --stripe-size ,
+.BR --extension-size ,
.BR --stripe-index ,
.BR --layout ,
.BR --fid ,
.BR --component-count ,
.BR --component-start ,
.BR --component-end ,
-or
.BR --pool
+or
+.BR --mirror-index
+or
+.BR --mirror-id
options, or equivalent single-character options, can be used without an
argument to return only the specified field(s).
.PP
-You can limit the displayed content to one or more specific components of
-a composite file layout by specifying the matching parameter(s) for the
+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
.BR --component-id ,
.BR --component-flags ,
.BR --component-start ,
-and
.BR --component-end ,
+.BR --mirror-index ,
+or
+.BR --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
.RB ' = '
sign must be used.
-.br
+.PP
The default behavior when a directory is specified is to list the striping
information for all files within the specified directory (like
-.RB ' "ls -l" ').
+.RB ' "ls -l <directory>" ').
.SH OPTIONS
.TP
.BR --component-count | --comp-count
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.
+.TP
+.B nosync
+Replicated (mirrored) components that do not resync using \fB
+lfs mirror resync\fR. Files with the \fBnosync\fR flag will also
+print the timestamp when the flag was set on the replica.
.RE
.TP
.BR --component-id | --comp-id [ =\fIid ]| -I [ \fIid ]
.BR --fid | -F
Show only the 128-bit unique Lustre File Identifier (FID).
.TP
-.B --generation | -g
+.BR --generation | -g
Print only the layout generation number.
.TP
+.BR --help | -h
+Print usage message.
+.TP
.BR --layout
Show only the file layout, which is one of:
.RS 1.2i
.BR --mdt | --mdt-index | -m
Show the MDT index on which the file or directory inode is located.
.TP
+.BR --mirror-count | -N
+Print the number of mirrors on the file.
+.TP
+.BR --mirror-index = [\fB+-\fR]\fR<\fIindex\fR>
+Print only the components of \fI<index>\fR-th mirror, based on the order
+that the mirror components are stored in the file layout. The \fIindex\fR
+starts at 1. If
+.BI + index
+or
+.BI - index
+is used, print components of mirror(s) respectively later or earlier than
+the \fIindex\fR-th mirror.
+.RS 1.2i
+.TP
+.B !
+Negates the meaning. Using + before \fIindex\fR means mirror appears 'later
+than \fIindex\fR',
+- before \fIindex\fR means mirror appears 'earlier than \fIindex\fR'. If
+neither is used, it means 'equal to \fIindex\fR'.
+.RE
+.TP
+.BR --mirror-id = [\fB+-\fR]\fR<\fIid\fR>
+Print only the components of the mirror with ID of \fIid\fR. The mirror IDs
+are assigned to new mirrors as they are created, but may not be sequential
+if some mirrors are removed. If
+.BI + id
+or
+.BI - id
+is used, print components of mirror(s) with respectively a larger or smaller
+mirror ID of
+.I id
+.
+.RS 1.2i
+.TP
+.B !
+Negates the meaning. Using + before \fIid\fR means mirror with ID 'larger
+than \fIid\fR', - before \fIid\fR means mirror with ID 'smaller than \fIid\fR'.
+If neither is used, it means 'equal to \fIid\fR'.
+.RE
+.TP
.BR --ost | -O
-Print the starting OST index for the file layout.
+Print only the components located on a specific OST.
.TP
.BR --pool | -p
Print only the OST pool name on which the file was created.
Print the stripe size in bytes. For composite files this is the stripe
size of the last initialized component.
.TP
+.BR --extension-size | --ext-size | -z
+Print the extension size in bytes. For composite files this is the extension
+size of the first extension component.
+.TP
.BR --verbose | -v
Also print the layout magic, FID sequence, FID object ID, and FID, in
addition to the normally-printed attributes.
.BR --yaml | -y
Always print the layout in YAML format, rather than only using this
format for composite files.
+.TP
+.BR --no-follow
+Print the stripe information of symbolic link itself.
.br
.SH EXAMPLES
.TP
.B $ lfs getstripe -v -I2 /mnt/lustre/file1
List the detailed information of only component with ID 2 of the given file.
.TP
+.B $ lfs getstripe --mirror-index=+1 /mnt/lustre/file1
+Print the mirror(s) appearing later than the first mirror in the the file.
+.TP
+.B $ lfs getstripe ! --mirror-id=2 /mnt/lustre/file1
+Print the mirror(s) with mirror ID other than 2 in the file.
+.TP
.B $ lfs getstripe --component-flags=^init -I /mnt/lustre/file1
Print only the component IDs for all the uninitialized components.
.TP
.B $ lfs getstripe --component-flags=init,^stale -I /mnt/lustre/file1
-Print only the component(s) that are instantiated but not stale
+Print only the component(s) that are instantiated but not stale.
.TP
.B $ lfs getstripe -E-64M /mnt/lustre/file1
List information of components in a file with extent end less than 64MiB.