Whamcloud - gitweb
LU-11099 doc: include "-N" option to lfs_setstripe.1
[fs/lustre-release.git] / lustre / doc / lfs-setstripe.1
index 583cf31..ec9d342 100644 (file)
@@ -14,8 +14,15 @@ lfs setstripe \- set striping pattern of a file or directory default
 .B lfs setstripe --component-del \fR{\fB--component-id\fR|\fB-I \fIcomp_id\fR|
 .B --component-flags=\fIcomp_flags\fR} <\fIfilename\fR>
 .br
+.B lfs setstripe --component-set \fR{\fB--component-id\fR|\fB-I \fIcomp_id\fR|
+.B --component-flags=\fIcomp_flags\fR} <\fIfilename\fR>
+.br
 .B lfs setstripe -d \fR<\fIdirectory\fR>
 .br
+.B lfs setstripe -N\fR[\fImirror_count\fR] \fR[\fISTRIPE_OPTIONS\fR] <\fIdirectory\fR|\fIfilename\fR>
+.br
+.B lfs setstripe --yaml=<yaml_template_file> <filename>
+.br
 .SH DESCRIPTION
 .TP
 .B lfs setstripe \fR[\fISTRIPE_OPTIONS\fR] <\fIdirectory\fR|\fIfilename\fR>
@@ -54,6 +61,8 @@ not possible to add components incrementally to the default directory layout,
 since the entire default layout can be replaced with one
 .B lfs setstripe
 call.
+.br
+Adding a component to FLR files is not allowed.
 .TP
 .B lfs setstripe --component-del \fR{\fB--component-id\fR|\fB-I \fIcomp_id\fR | \
 \fB--component-flags \fIcomp_flags\fR} <\fIfilename\fR>
@@ -69,7 +78,36 @@ layout, since the entire default layout can be replaced with one
 .B lfs setstripe
 call.
 The \fB--component-flags\fR option is used to specify certain type of
-components, such as all instantiated ones.
+components, such as all instantiated ones. Available component flags for
+deleting a component would be:
+.RS
+.TP
+.B init
+instantiated component.
+.LP
+A leading '^' in front of the \fIflags\fR means inverted flags.
+.br
+Deleting a component from FLR files is not allowed.
+.RE
+.TP
+.B lfs setstripe --component-set \fR{\fB--component-id\fR|\fB-I \fIcomp_id\fR | \
+\fB--component-flags \fIcomp_flags\fR} <\fIfilename\fR>
+Set or clear \fIflags\fR to the specified component. This command can be only
+be applied to FLR files. Available \fIflags\fR are:
+.RS
+.TP
+.B stale
+indicates the data in the corresponding component is not available for I/O.
+Once a component is set to stale, a \fBlfs-mirror-resync\fR(1) is required to
+clear the flag.
+.TP
+.B prefer
+set this flag to the corresponding component so that Lustre would prefer to
+choose the specified component for I/O.
+.LP
+A leading '^' means to clear the corresponding flag. It doesn't allow to clear
+\fBstale\fR flag.
+.RE
 .TP
 .B lfs setstripe -d \fR<\fIdirectory\fR>
 .br
@@ -77,6 +115,28 @@ Delete the default layout on the specified directory.  It is not necessary
 to delete the default layout on a directory before replacing it.  This is
 only needed if the directory should revert from a directory-specific layout
 to using the global filesystem default layout stored on the root directory.
+.TP
+.B lfs setstripe -N\fR[\fImirror_count\fR] \fR[\fISTRIPE_OPTIONS\fR] <\fIdirectory\fR|\fIfilename\fR>
+.br
+The -N option indicates how many mirrors that have the same layout will be set
+on a file or directory (see \fBlfs-mirror-create\fR(1)). The \fImirror_count\fR
+argument is optional and defaults to 1 if it's not specified; if specified,
+it must follow the option without a space.
+.br
+The \fISTRIPE_OPTIONS\fR specify the specific layout for the mirror. It can
+be a plain layout with specific striping pattern or a composite layout.
+If they are not specified, the stripe options inherited from the previous
+component will be used. If there is no previous component, the
+\fIstripe_count\fR and \fIstripe_size\fR options inherited from filesystem-wide
+default values will be used, and OST \fIpool_name\fR inherited from parent
+directory will be used.
+.TP
+.B lfs setstripe --yaml=<yaml_template_file> <filename>
+.br
+Create a file with layout information specified by a YAML format template
+file, the template file can be obtained using the
+.B lfs getstripe --yaml <anotherfile>
+command.
 .SH STRIPE_OPTIONS
 The various stripe related options are listed and explained below:
 .TP
@@ -132,18 +192,35 @@ and
 will be used as well; the
 .I start_ost_index
 must be part of the pool or an error will be returned.
+If <\fIpool_name\fR> is
+.BR none
+, then the OST pool name will be cleared and inherit from parent directory.
 .TP
-There are two options available only for \fBlfs migrate\fR:
-.TP
-.BR -b , --block
-Block file access during data migration (default).
+.B -L\fR, \fB--layout \fR<\fIlayout type\fR>
+The type of stripe layout, can be
+.BR raid0 ", " released " or " mdt ".
+It is
+.BR raid0
+by default. The
+.BR mdt
+type allows place the first component of the file on the MDT where the inode
+is located. This is used with composite file layouts and can be defined as
+first component only. The
+.IR stripe_size
+of MDT part is always equal to the component size. There is also per-MDT
+parameter
+.IR lod.dom_stripesize
+to limit maximum size of DoM stripe which can be changed with
+.BR lctl\ set_param
+command, (e.g.
+.IR lctl\ set_param\ lod.*.dom_stripesize=0
+, see
+.BR lctl (8))
 .TP
-.BR -n , --non-block
-Abort migrations if concurrent access is detected.
 .SH COMPONENT_OPTIONS
 The various component related options are listed and explained below:
 .TP
-.B -E\fR,\fB--component-end \fR< \fIend\fR>
+.B -E\fR, \fB--component-end \fR<\fIend\fR>
 The end offset of the component,
 .I end
 is specified in bytes, or using a suffix (kMGTP),
@@ -159,8 +236,13 @@ Component flags. Available \fIflags\fR:
 .B init\fR: instantiated component.
 .RE
 .RS
-.B ^init\fR: uninstantiated component.
+.B prefer\fR: preferred component, for FLR only.
 .RE
+.RS
+.B stale\fR: stale component, for FLR only.
+.RE
+.LP
+A leading '^' means inverted flag. Multiple flags can be separated by comma(s).
 .RE
 .TP
 .B --component-add
@@ -178,6 +260,16 @@ This creates a file striped on two OSTs with 128kB on each stripe.
 This deletes a default stripe pattern on dir. New files created in that
 directory will use the filesystem global default instead.
 .TP
+.B lfs setstripe -N2 -E 1M -E eof -c -1 /mnt/lustre/dir1
+This sets a default mirror layout on a directory with 2 PFL mirrors. Each mirror
+has the same specified PFL layout.
+.TP
+.B lfs setstripe -N2 /mnt/lustre/file1
+This creates a mirrored file with 2 mirrors. Each mirror has the same default
+striping pattern with \fIstripe_count\fR and \fIstripe_size\fR inherited from
+filesystem-wide default values, and OST \fIpool_name\fR inherited from parent
+directory.
+.TP
 .B $ lfs setstripe -E 4M -c 1 -E 64M -c 4 -E -1 -c -1 /mnt/lustre/file1
 This creates a file with composite layout, the component has 1 stripe and \
 covers [0, 4M), the second component has 4 stripes and covers [4M, 64M), the \
@@ -189,6 +281,19 @@ the end of file.
 .TP
 .B $ lfs setstripe --component-del -I 1 /mnt/lustre/file1
 This deletes the component with ID equals 1 from an existing file.
+.TP
+.B $ lfs setstripe --component-set -I 1 --component-flags=^prefer,stale /mnt/lustre/file1
+This command will clear the \fBprefer\fR flag and set the \fBstale\fR to
+component with ID 1.
+.TP
+.B $ lfs setstripe -E 1M -L mdt -E -1 /mnt/lustre/file1
+This created file with Data-on-MDT layout. The first 1M is placed on MDT and \
+rest of file is placed on OST with default striping.
+.TP
+.B $ lfs setstripe --yaml=/tmp/layout_yaml /mnt/lustre/file2
+This creates a file with layout specified by a layout template which can be \
+obtained with \fBlfs getstripe --yaml\fR command.
+
 .SH SEE ALSO
 .BR lfs (1),
 .BR lfs-migrate (1),