Whamcloud - gitweb
LU-16974 utils: lfs mirror resync to show progress
[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 <\fB\-\-bandwidth\-limit=\fR|\fB\-W\fR[\fIbandwidth_limit\fR]>
9 [\fB\-\-stats\fR]
10 <\fB\-\-stats\-interval\fR=\fIinterval_in_sec\fR>
11 [\fIsetstripe_options\fR|\fB\-f\fR <\fIvictim_file\fR>] ...
12 <\fIfilename\fR>
13 .SH DESCRIPTION
14 This command adds mirror(s) to an existing file specified by the path name
15 \fIfilename\fR.
16 .br
17 The file \fIfilename\fR can already be a mirrored file, or just a regular
18 non-mirrored file. If it's a non-mirrored file, then the command will convert it
19 to a mirrored file.
20 .br
21 The \fB\-\-mirror\-count\fR|\fB\-N\fR option is required and indicates how many
22 mirrors that have the same layout will be added. It can be repeated multiple
23 times to separate mirrors that have different layouts. The \fImirror_count\fR
24 argument is optional and defaults to 1 if it's not specified; if specified, it
25 must follow the option without a space.
26 .br
27 The \fIsetstripe_options\fR specify the specific layout for the mirror. It can
28 be a plain layout with specific striping pattern or a composite layout like
29 Progressive File Layout (PFL) (see \fBlfs-setstripe\fR(1)).
30 If \fIsetstripe_options\fR are not specified,
31 then the stripe options inherited from the previous component will be used.
32 If \fIvictim_file\fR exists, then the
33 command will merge the layout from that file as a mirror added to the
34 mirrored file. After the command is finished, the victim file will be
35 removed.  The \fIsetstripe_options\fR cannot be specified with
36 \fB\-f\fR <\fIvictim_file\fR> option in one command line.
37 .br
38 If \fIvictim_file\fR 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 \-f\fR\ <\fIvictim_file\fR>
62 The layout of \fIvictim_file\fR will be merged as a mirror added to the
63 mirrored file. This option cannot be specified with \fIsetstripe_options\fR
64 option.
65 .TP
66 .BR \-\-no\-verify
67 This option indicates not to verify the mirror(s) from victim file(s) in case
68 the victim file(s) contains the same data as the original mirrored file.
69 .TP
70 .BR \-\-stats
71 This option enables progress updates every 5 seconds, in YAML format.
72 .TP
73 .BR \-\-stats-interval=\fIstats_interval
74 This option enables progress updates every \fIstats_interval\fR seconds, in YAML format.
75 .TP
76 .BR \-\-bandwidth\-limit\fR|\fB\-W\fR\fIbandwidth_limit\fR
77 This option enables throttling so that mirror extending writes no more than
78 \fIbandwidth_limit\fR bytes a second.  An optional suffix can be used to
79 specify the units in
80 .BR K ilobytes,
81 .BR M egabytes
82 or
83 .BR  G igabytes.
84 .SH EXAMPLES
85 .TP
86 .B lfs mirror extend -N2 /mnt/lustre/file1
87 Add 2 mirrors to /mnt/lustre/file1. If file1 is a non-mirrored file, then the
88 command will convert it to a mirrored file first and then add mirrors. Each
89 mirror has the same default striping pattern with \fIstripe_count\fR and
90 \fIstripe_size\fR inherited from filesystem-wide default values, and
91 OST \fIpool_name\fR inherited from parent directory.
92 .LP
93 .B lfs mirror extend -N3 -E 1M -c 1 -E 32M -c 4 -S 16M -E eof -c -1
94 .B /mnt/lustre/file1
95 .in
96 Add 3 PFL mirrors to /mnt/lustre/file1. Each mirror has the same specified PFL
97 layout.
98 .LP
99 .B lfs mirror extend -N -c 1 -S 4M -N -c 2 -o 2,3 -p flash
100 .B -N -p none /mnt/lustre/file1
101 .in
102 Add 3 plain layout mirrors to /mnt/lustre/file1. The first mirror has a single
103 stripe and 4MB stripe size. The second mirror has two stripes and locates on
104 OSTs with indices 2 and 3 allocated from the \fBflash\fR OST pool.
105 It also has 4MB stripe size inherited from the first mirror.
106 The third mirror has two stripes and 4MB stripe size inherited from the previous
107 mirror, and also has inherited OST \fIpool_name\fR from parent directory.
108 .LP
109 .B lfs mirror extend -N2 -E 4M -c 2 --pool flash -E eof -c 4 -N3 -E 16M -c 4
110 .B -S 16M --pool archive -E eof -c -1 /mnt/lustre/file1
111 .in
112 Add 5 PFL mirrors to /mnt/lustre/file1. The first and second mirrors have the
113 same PFL layout. All of the components are allocated from the flash OST pool.
114 The last three mirrors have the same PFL layout. All of these components have a
115 stripe size of 16MB and use OSTs in the archive pool.
116 .LP
117 .B lfs mirror extend --no-verify -N -f /mnt/lustre/file2 -N -f /mnt/lustre/file3
118 .B /mnt/lustre/file1
119 .in
120 Merge the layouts from /mnt/lustre/file2 and /mnt/lustre/file3, which contain
121 the same data as /mnt/lustre/file1, use the layouts as mirrors and add them to
122 /mnt/lustre/file1 without verification.
123 .SH AUTHOR
124 The \fBlfs mirror extend\fR command is part of the Lustre filesystem.
125 .SH SEE ALSO
126 .BR lfs (1),
127 .BR lfs-setstripe (1),
128 .BR lfs-mirror-create (1),
129 .BR lfs-mirror-delete (1),
130 .BR lfs-mirror-split (1),
131 .BR lfs-mirror-resync (1),
132 .BR lfs-mirror-verify (1)