Whamcloud - gitweb
LU-10966 utils: Fix `lfs check` documentation and arguments
[fs/lustre-release.git] / lustre / doc / lfs-mirror-create.1
1 .TH LFS-MIRROR-CREATE 1 2017-07-25 "Lustre" "Lustre Utilities"
2 .SH NAME
3 lfs mirror create \- create a mirrored file or directory
4 .SH SYNOPSIS
5 .B lfs mirror create
6 <\fB\-\-mirror\-count\fR|\fB\-N\fR[\fImirror_count\fR]>
7 [\fIsetstripe_options\fR|[\fB--flags\fR<=\fIflags\fR>]] ...
8 .RI < filename | directory >
9 .SH DESCRIPTION
10 This command creates a mirrored file or directory specified by the path name
11 \fIfilename\fR or \fIdirectory\fR.
12 .br
13 The \fB\-\-mirror\-count\fR|\fB\-N\fR option is required and indicates how many
14 mirrors that have the same layout will be created. It can be repeated multiple
15 times to separate mirrors that have different layouts. The \fImirror_count\fR
16 argument is optional and defaults to 1 if it's not specified; if specified, it
17 must follow the option without a space.
18 .br
19 The \fIsetstripe_options\fR specify the specific layout for the mirror. It can
20 be a plain layout with specific striping pattern or a composite layout like
21 Progressive File Layout (PFL) (see \fBlfs-setstripe\fR(1)).
22 If \fIsetstripe_options\fR are not specified,
23 then the stripe options inherited from the previous component will be used. If
24 there is no previous component, then the \fIstripe_count\fR and
25 \fIstripe_size\fR options inherited from filesystem-wide default values will be
26 used, and OST \fIpool_name\fR inherited from parent directory will be used.
27 .br
28 If no option is specified, then the command will return an error.
29 .SH OPTIONS
30 .TP
31 .BR \-\-mirror\-count\fR|\fB\-N\fR[\fImirror_count\fR]
32 The number of mirrors that have the same layout to be created. The option can be
33 repeated multiple times to separate mirrors that have different layouts. The
34 \fImirror_count\fR argument is optional and defaults to 1 if it's not specified;
35 if specified, it must follow the option without a space.
36 .TP
37 .I setstripe_options
38 The layout of one mirror. The options are the same as those for
39 \fBlfs-setstripe\fR(1) command.
40 If \fIsetstripe_options\fR are not specified, then
41 the stripe options inherited from the previous component will be used.
42 .TP
43 .B --flags<=\fIflags\fR>
44 Where available \fIflags\fR are as follows:
45 .RS
46 .TP
47 .BI prefer
48 is supported in mirror creation. This flag will be set to all components that
49 belong to ths corresponding mirror. The \fBprefer\fR flag gives hint to Lustre
50 for which mirrors should be used to serve I/O. When a mirrored file is being
51 read, the component(s) with \fBprefer\fR are likely to be picked to serve the
52 read; and when a mirrored file is prepared to be written, the MDT will
53 tend to choose the component with \fBprefer\fR flag set and stale the other
54 components with overlapping extents. This flag just provides a hint to Lustre,
55 which means Lustre may still choose mirrors without this flag set, for instance,
56 if all preferred mirrors are unavailable when the I/O occurs. This flag could be
57 set on multiple components.
58 .LP
59 Please note that this flag will be set to all components that belong to the
60 corresponding mirror. There also exists option \fB--comp-flags\fR that can be
61 set to individual components at mirror creation time.
62 .RE
63 .SH EXAMPLES
64 .TP
65 .B lfs mirror create -N2 /mnt/lustre/file1
66 Create a mirrored file with 2 mirrors. Each mirror has the same default striping
67 pattern with \fIstripe_count\fR and \fIstripe_size\fR inherited from
68 filesystem-wide default values, and OST \fIpool_name\fR inherited from
69 parent directory.
70 .TP
71 .B lfs mirror create -N2 -E 1M -E eof -c -1 /mnt/lustre/dir1
72 Create a mirrored directory with 2 PFL mirrors. Each mirror has the same
73 specified PFL layout.
74 .LP
75 .B lfs mirror create -N3 -E 1M -c 1 -E 32M -c 4 -S 16M -E eof -c -1
76 .B /mnt/lustre/file1
77 .in
78 Create a mirrored file with 3 PFL mirrors. Each mirror has the same specified
79 PFL layout.
80 .LP
81 .B lfs mirror create -N -c 1 -S 4M -N -c 2 -o 2,3 -p flash
82 .B -N -p none /mnt/lustre/file1
83 .in
84 Create a mirrored file with 3 plain layout mirrors. The first mirror has a
85 single stripe and 4MB stripe size. The second mirror has two stripes and locates
86 on OSTs with indices 2 and 3 allocated from the \fBflash\fR OST pool.
87 It also has 4MB stripe size inherited from the first mirror.
88 The third mirror has two stripes and 4MB stripe size inherited from the previous
89 mirror, and also has inherited OST \fIpool_name\fR from parent directory.
90 .LP
91 .B lfs mirror create -N2 -E 4M -c 2 --pool flash --flags prefer -E eof -c 4
92 .B -N3 -E 16M -c 4 -S 16M --pool archive --comp-flags=prefer -E eof -c -1
93 .B /mnt/lustre/file1
94 .in
95 Create a mirrored file with 5 PFL mirrors. The first and second mirrors have the
96 same PFL layout, and both of the components are allocated from the \fBflash\fR
97 OST pool. Also, flag \fBprefer\fR is applied to all the components of the first
98 two mirrors, which tells the client to read data from those components whenever
99 they are available.
100 .br
101 The last three mirrors have the same PFL layout, and each of these
102 components have a stripe size of 16MB and use OSTs in the \fBarchive\fR pool.
103 However, the flag \fBprefer\fR is only applied to the first component of each
104 mirror.
105 .SH AUTHOR
106 The \fBlfs mirror create\fR command is part of the Lustre filesystem.
107 .SH SEE ALSO
108 .BR lfs (1),
109 .BR lfs-setstripe (1),
110 .BR lfs-mirror-extend (1),
111 .BR lfs-mirror-split (1),
112 .BR lfs-mirror-resync (1),
113 .BR lfs-mirror-verify (1)