Whamcloud - gitweb
LU-11099 doc: include "-N" option to lfs_setstripe.1
[fs/lustre-release.git] / lustre / doc / lfs-setstripe.1
index 98abce4..ec9d342 100644 (file)
@@ -19,6 +19,10 @@ lfs setstripe \- set striping pattern of a file or directory default
 .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>
@@ -111,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
@@ -170,7 +196,7 @@ If <\fIpool_name\fR> is
 .BR none
 , then the OST pool name will be cleared and inherit from parent directory.
 .TP
-.B -L, --layout <\fIlayout type\fB>\fR
+.B -L\fR, \fB--layout \fR<\fIlayout type\fR>
 The type of stripe layout, can be
 .BR raid0 ", " released " or " mdt ".
 It is
@@ -191,17 +217,10 @@ command, (e.g.
 , see
 .BR lctl (8))
 .TP
-There are two options available only for \fBlfs migrate\fR:
-.TP
-.BR -b , --block
-Block file access during data migration (default).
-.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),
@@ -241,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 \
@@ -260,6 +289,11 @@ component with ID 1.
 .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),