Whamcloud - gitweb
LU-12780 scrub: all update to bitfields must be protected.
[fs/lustre-release.git] / lustre / doc / lfs-mirror-create.1
index 31310af..5d18c3b 100644 (file)
@@ -4,7 +4,7 @@ lfs mirror create \- create a mirrored file or directory
 .SH SYNOPSIS
 .B lfs mirror create
 <\fB\-\-mirror\-count\fR|\fB\-N\fR[\fImirror_count\fR]>
-.RI [ setstripe_options | \fB--parent ] ...
+[\fIsetstripe_options\fR|[\fB--flags\fR<=\fIflags\fR>]] ...
 .RI < filename | directory >
 .SH DESCRIPTION
 This command creates a mirrored file or directory specified by the path name
@@ -21,10 +21,9 @@ be a plain layout with specific striping pattern or a composite layout like
 Progressive File Layout (PFL) (see \fBlfs-setstripe\fR(1)).
 If \fIsetstripe_options\fR are not specified,
 then the stripe options inherited from the previous component will be used. If
-there is no previous component or \fB\-\-parent\fR option is specified, then the
-default stripe options inherited from parent directory will be used. For stripe
-options, only \fIstripe_count\fR, \fIstripe_size\fR and OST \fIpool_name\fR can
-be inherited.
+there is no previous component, then 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.
 .br
 If no option is specified, then the command will return an error.
 .SH OPTIONS
@@ -41,14 +40,33 @@ The layout of one mirror. The options are the same as those for
 If \fIsetstripe_options\fR are not specified, then
 the stripe options inherited from the previous component will be used.
 .TP
-.B \-\-parent
-This option indicates that the default stripe options inherited from parent
-directory will be used.
+.B --flags<=\fIflags\fR>
+Where available \fIflags\fR are as follows:
+.RS
+.TP
+.BI prefer
+is supported in mirror creation. This flag will be set to all components that
+belong to ths corresponding mirror. The \fBprefer\fR flag gives hint to Lustre
+for which mirrors should be used to serve I/O. When a mirrored file is being
+read, the component(s) with \fBprefer\fR are likely to be picked to serve the
+read; and when a mirrored file is prepared to be written, the MDT will
+tend to choose the component with \fBprefer\fR flag set and stale the other
+components with overlapping extents. This flag just provides a hint to Lustre,
+which means Lustre may still choose mirrors without this flag set, for instance,
+if all preferred mirrors are unavailable when the I/O occurs. This flag could be
+set on multiple components.
+.LP
+Please note that this flag will be set to all components that belong to the
+corresponding mirror. There also exists option \fB--comp-flags\fR that can be
+set to individual components at mirror creation time.
+.RE
 .SH EXAMPLES
 .TP
 .B lfs mirror create -N2 /mnt/lustre/file1
 Create a mirrored file with 2 mirrors. Each mirror has the same default striping
-pattern inherited from parent directory or filesystem-wide default.
+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 mirror create -N2 -E 1M -E eof -c -1 /mnt/lustre/dir1
 Create a mirrored directory with 2 PFL mirrors. Each mirror has the same
@@ -59,26 +77,37 @@ specified PFL layout.
 .in
 Create a mirrored file with 3 PFL mirrors. Each mirror has the same specified
 PFL layout.
-.TP
-.B lfs mirror create -N -c 1 -S 4M -N -c 2 -o 2,3 -N --parent /mnt/lustre/file1
+.LP
+.B lfs mirror create -N -c 1 -S 4M -N -c 2 -o 2,3 -p flash
+.B -N -p none /mnt/lustre/file1
+.in
 Create a mirrored file with 3 plain layout mirrors. The first mirror has a
 single stripe and 4MB stripe size. The second mirror has two stripes and locates
-on OSTs with indices 2 and 3. It also has 4MB stripe size inherited from the
-first mirror. The third mirror has default striping pattern inherited from
-parent directory.
+on OSTs with indices 2 and 3 allocated from the \fBflash\fR OST pool.
+It also has 4MB stripe size inherited from the first mirror.
+The third mirror has two stripes and 4MB stripe size inherited from the previous
+mirror, and also has inherited OST \fIpool_name\fR from parent directory.
 .LP
-.B lfs mirror create -N2 -E 4M -c 2 --pool flash -E eof -c 4 -N3 -E 16M -c 4 -S
-.B 16M --pool archive -E eof -c -1 /mnt/lustre/file1
+.B lfs mirror create -N2 -E 4M -c 2 --pool flash --flags prefer -E eof -c 4
+.B -N3 -E 16M -c 4 -S 16M --pool archive --comp-flags=prefer -E eof -c -1
+.B /mnt/lustre/file1
 .in
 Create a mirrored file with 5 PFL mirrors. The first and second mirrors have the
 same PFL layout, and both of the components are allocated from the \fBflash\fR
-OST pool. The last three mirrors have the same PFL layout, and each of these
+OST pool. Also, flag \fBprefer\fR is applied to all the components of the first
+two mirrors, which tells the client to read data from those components whenever
+they are available.
+.br
+The last three mirrors have the same PFL layout, and each of these
 components have a stripe size of 16MB and use OSTs in the \fBarchive\fR pool.
+However, the flag \fBprefer\fR is only applied to the first component of each
+mirror.
 .SH AUTHOR
 The \fBlfs mirror create\fR command is part of the Lustre filesystem.
 .SH SEE ALSO
 .BR lfs (1),
 .BR lfs-setstripe (1),
+.BR lfs-mirror-delete (1),
 .BR lfs-mirror-extend (1),
 .BR lfs-mirror-split (1),
 .BR lfs-mirror-resync (1),