Whamcloud - gitweb
LU-9771 flr: lfs mirror create and extend commands
[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 .RI [ setstripe_options | \fB--parent ] ...
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 or \fB\-\-parent\fR option is specified, then the
25 default stripe options inherited from parent directory will be used. For stripe
26 options, only \fIstripe_count\fR, \fIstripe_size\fR and OST \fIpool_name\fR can
27 be inherited.
28 .br
29 If no option is specified, then the command will return an error.
30 .SH OPTIONS
31 .TP
32 .BR \-\-mirror\-count\fR|\fB\-N\fR[\fImirror_count\fR]
33 The number of mirrors that have the same layout to be created. The option can be
34 repeated multiple times to separate mirrors that have different layouts. The
35 \fImirror_count\fR argument is optional and defaults to 1 if it's not specified;
36 if specified, it must follow the option without a space.
37 .TP
38 .I setstripe_options
39 The layout of one mirror. The options are the same as those for
40 \fBlfs-setstripe\fR(1) command.
41 If \fIsetstripe_options\fR are not specified, then
42 the stripe options inherited from the previous component will be used.
43 .TP
44 .B \-\-parent
45 This option indicates that the default stripe options inherited from parent
46 directory will be used.
47 .SH EXAMPLES
48 .TP
49 .B lfs mirror create -N2 /mnt/lustre/file1
50 Create a mirrored file with 2 mirrors. Each mirror has the same default striping
51 pattern inherited from parent directory or filesystem-wide default.
52 .TP
53 .B lfs mirror create -N2 -E 1M -E eof -c -1 /mnt/lustre/dir1
54 Create a mirrored directory with 2 PFL mirrors. Each mirror has the same
55 specified PFL layout.
56 .LP
57 .B lfs mirror create -N3 -E 1M -c 1 -E 32M -c 4 -S 16M -E eof -c -1
58 .B /mnt/lustre/file1
59 .in
60 Create a mirrored file with 3 PFL mirrors. Each mirror has the same specified
61 PFL layout.
62 .TP
63 .B lfs mirror create -N -c 1 -S 4M -N -c 2 -o 2,3 -N --parent /mnt/lustre/file1
64 Create a mirrored file with 3 plain layout mirrors. The first mirror has a
65 single stripe and 4MB stripe size. The second mirror has two stripes and locates
66 on OSTs with indices 2 and 3. It also has 4MB stripe size inherited from the
67 first mirror. The third mirror has default striping pattern inherited from
68 parent directory.
69 .LP
70 .B lfs mirror create -N2 -E 4M -c 2 --pool flash -E eof -c 4 -N3 -E 16M -c 4 -S
71 .B 16M --pool archive -E eof -c -1 /mnt/lustre/file1
72 .in
73 Create a mirrored file with 5 PFL mirrors. The first and second mirrors have the
74 same PFL layout, and both of the components are allocated from the \fBflash\fR
75 OST pool. The last three mirrors have the same PFL layout, and each of these
76 components have a stripe size of 16MB and use OSTs in the \fBarchive\fR pool.
77 .SH AUTHOR
78 The \fBlfs mirror create\fR command is part of the Lustre filesystem.
79 .SH SEE ALSO
80 .BR lfs (1),
81 .BR lfs-setstripe (1),
82 .BR lfs-mirror-extend (1),
83 .BR lfs-mirror-split (1),
84 .BR lfs-mirror-resync (1),
85 .BR lfs-mirror-verify (1)