Whamcloud - gitweb
LU-9771 flr: lfs mirror create and extend commands
[fs/lustre-release.git] / lustre / doc / lfs-mirror-extend.1
1 .TH LFS-MIRROR-EXTEND 1 2017-07-25 "Lustre" "Lustre Utilities"
2 .SH NAME
3 lfs mirror extend \- add mirror(s) to an existing file
4 .SH SYNOPSIS
5 .B lfs mirror extend
6 [\fB\-\-no\-verify\fR]
7 <\fB\-\-mirror\-count\fR|\fB\-N\fR[\fImirror_count\fR]>
8 [\fIsetstripe_options\fR|\fB\-\-parent\fR|\fB\-f\fR <\fIvictim_file\fR>] ...
9 <\fIfilename\fR>
10 .SH DESCRIPTION
11 This command adds mirror(s) to an existing file specified by the path name
12 \fIfilename\fR.
13 .br
14 The file \fIfilename\fR can already be a mirrored file, or just a regular
15 non-mirrored file. If it's a non-mirrored file, then the command will convert it
16 to a mirrored file.
17 .br
18 The \fB\-\-mirror\-count\fR|\fB\-N\fR option is required and indicates how many
19 mirrors that have the same layout will be added. It can be repeated multiple
20 times to separate mirrors that have different layouts. The \fImirror_count\fR
21 argument is optional and defaults to 1 if it's not specified; if specified, it
22 must follow the option without a space.
23 .br
24 The \fIsetstripe_options\fR specify the specific layout for the mirror. It can
25 be a plain layout with specific striping pattern or a composite layout like
26 Progressive File Layout (PFL) (see \fBlfs-setstripe\fR(1)).
27 If \fIsetstripe_options\fR are not specified,
28 then the stripe options inherited from the previous component will be used. If
29 \fB\-\-parent\fR option is specified, then the default stripe options inherited
30 from parent directory will be used. For stripe options, only \fIstripe_count\fR,
31 \fIstripe_size\fR and OST \fIpool_name\fR can be inherited.
32 If \fIvictim_file\fR exists, then the
33 command will split the layout from that file and use it as a mirror added to the
34 mirrored file. After the command is finished, the victim file will be removed.
35 The \fIsetstripe_options\fR and \fB\-\-parent\fR option cannot be specified with
36 \fB\-f\fR <\fIvictim_file\fR> option in one command line.
37 .br
38 If \fIvictim_file\R is specified, the utility will verify that the file contents
39 from \fIvictim_file\fR are the same as \fIfilename\fR. Otherwise the command
40 will return failure. However, option \fB\-\-no\-verify\fR can be used to
41 override this verification. The option can save siginificant time on file
42 comparison if the file size is large, but use it only when the file contents
43 are known to be the same.
44 .br
45 If no option is specified, then the command will return an error.
46 .SH OPTIONS
47 .TP
48 .BR \-\-mirror\-count\fR|\fB\-N\fR[\fImirror_count\fR]
49 The number of mirrors that have the same layout to be added. The option can be
50 repeated multiple times to separate mirrors that have different layouts. The
51 \fImirror_count\fR argument is optional and defaults to 1 if it's not specified;
52 if specified, it must follow the option without a space.
53 .TP
54 .I setstripe_options
55 The layout of one mirror. The options are the same as those for
56 \fBlfs-setstripe\fR(1) command.
57 If \fIsetstripe_options\fR are not specified, then the stripe options inherited
58 from the previous component will be used. This option cannot be specified with
59 \fB\-f\fR <\fIvictim_file\fR> option.
60 .TP
61 .BR \-\-parent
62 This option indicates that the default stripe options inherited from parent
63 directory will be used.
64 It cannot be specified with \fB\-f\fR <\fIvictim_file\fR> option.
65 .TP
66 .BR \-f\fR\ <\fIvictim_file\fR>
67 The layout of \fIvictim_file\fR will be split and used as a mirror added to the
68 mirrored file. This option cannot be specified with \fIsetstripe_options\fR or
69 \fB\-\-parent\fR option.
70 .TP
71 .BR \-\-no\-verify
72 This option indicates not to verify the mirror(s) from victim file(s) in case
73 the victim file(s) contains the same data as the original mirrored file.
74 .SH EXAMPLES
75 .TP
76 .B lfs mirror extend -N2 /mnt/lustre/file1
77 Add 2 mirrors to /mnt/lustre/file1. If file1 is a non-mirrored file, then the
78 command will convert it to a mirrored file first and then add mirrors. Each
79 mirror has the same striping pattern inherited from parent directory.
80 .LP
81 .B lfs mirror extend -N3 -E 1M -c 1 -E 32M -c 4 -S 16M -E eof -c -1
82 .B /mnt/lustre/file1
83 .in
84 Add 3 PFL mirrors to /mnt/lustre/file1. Each mirror has the same specified PFL
85 layout.
86 .TP
87 .B lfs mirror extend -N -c 1 -S 4M -N -c 2 -o 2,3 -N --parent /mnt/lustre/file1
88 Add 3 plain layout mirrors to /mnt/lustre/file1. The first mirror has a single
89 stripe and 4MB stripe size. The second mirror has two stripes and locates on
90 OSTs with indices 2 and 3. It also has 4MB stripe size inherited from the first
91 mirror. The third mirror has default striping pattern inherited from parent
92 directory.
93 .LP
94 .B lfs mirror extend -N2 -E 4M -c 2 --pool flash -E eof -c 4 -N3 -E 16M -c 4
95 .B -S 16M --pool archive -E eof -c -1 /mnt/lustre/file1
96 .in
97 Add 5 PFL mirrors to /mnt/lustre/file1. The first and second mirrors have the
98 same PFL layout. All of the components are allocated from the flash OST pool.
99 The last three mirrors have the same PFL layout. All of these components have a
100 stripe size of 16MB and use OSTs in the archive pool.
101 .LP
102 .B lfs mirror extend --no-verify -N -f /mnt/lustre/file2 -N -f /mnt/lustre/file3
103 .B /mnt/lustre/file1
104 .in
105 Split the layouts from /mnt/lustre/file2 and /mnt/lustre/file3, which contain
106 the same data as /mnt/lustre/file1, use the layouts as mirrors and add them to
107 /mnt/lustre/file1 without verification.
108 .SH AUTHOR
109 The \fBlfs mirror extend\fR command is part of the Lustre filesystem.
110 .SH SEE ALSO
111 .BR lfs (1),
112 .BR lfs-setstripe (1),
113 .BR lfs-mirror-create (1),
114 .BR lfs-mirror-split (1),
115 .BR lfs-mirror-resync (1),
116 .BR lfs-mirror-verify (1)