Whamcloud - gitweb
LU-10966 utils: Fix `lfs check` documentation and arguments
[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\-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.
29 If \fIvictim_file\fR exists, then the
30 command will split the layout from that file and use it as a mirror added to the
31 mirrored file. After the command is finished, the victim file will be removed.
32 The \fIsetstripe_options\fR cannot be specified with
33 \fB\-f\fR <\fIvictim_file\fR> option in one command line.
34 .br
35 If \fIvictim_file\fR is specified, the utility will verify that the file contents
36 from \fIvictim_file\fR are the same as \fIfilename\fR. Otherwise the command
37 will return failure. However, option \fB\-\-no\-verify\fR can be used to
38 override this verification. The option can save siginificant time on file
39 comparison if the file size is large, but use it only when the file contents
40 are known to be the same.
41 .br
42 If no option is specified, then the command will return an error.
43 .SH OPTIONS
44 .TP
45 .BR \-\-mirror\-count\fR|\fB\-N\fR[\fImirror_count\fR]
46 The number of mirrors that have the same layout to be added. The option can be
47 repeated multiple times to separate mirrors that have different layouts. The
48 \fImirror_count\fR argument is optional and defaults to 1 if it's not specified;
49 if specified, it must follow the option without a space.
50 .TP
51 .I setstripe_options
52 The layout of one mirror. The options are the same as those for
53 \fBlfs-setstripe\fR(1) command.
54 If \fIsetstripe_options\fR are not specified, then the stripe options inherited
55 from the previous component will be used. This option cannot be specified with
56 \fB\-f\fR <\fIvictim_file\fR> option.
57 .TP
58 .BR \-f\fR\ <\fIvictim_file\fR>
59 The layout of \fIvictim_file\fR will be split and used as a mirror added to the
60 mirrored file. This option cannot be specified with \fIsetstripe_options\fR
61 option.
62 .TP
63 .BR \-\-no\-verify
64 This option indicates not to verify the mirror(s) from victim file(s) in case
65 the victim file(s) contains the same data as the original mirrored file.
66 .SH EXAMPLES
67 .TP
68 .B lfs mirror extend -N2 /mnt/lustre/file1
69 Add 2 mirrors to /mnt/lustre/file1. If file1 is a non-mirrored file, then the
70 command will convert it to a mirrored file first and then add mirrors. Each
71 mirror has the same default striping pattern with \fIstripe_count\fR and
72 \fIstripe_size\fR inherited from filesystem-wide default values, and
73 OST \fIpool_name\fR inherited from parent directory.
74 .LP
75 .B lfs mirror extend -N3 -E 1M -c 1 -E 32M -c 4 -S 16M -E eof -c -1
76 .B /mnt/lustre/file1
77 .in
78 Add 3 PFL mirrors to /mnt/lustre/file1. Each mirror has the same specified PFL
79 layout.
80 .LP
81 .B lfs mirror extend -N -c 1 -S 4M -N -c 2 -o 2,3 -p flash
82 .B -N -p none /mnt/lustre/file1
83 .in
84 Add 3 plain layout mirrors to /mnt/lustre/file1. The first mirror has a single
85 stripe and 4MB stripe size. The second mirror has two stripes and locates on
86 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 extend -N2 -E 4M -c 2 --pool flash -E eof -c 4 -N3 -E 16M -c 4
92 .B -S 16M --pool archive -E eof -c -1 /mnt/lustre/file1
93 .in
94 Add 5 PFL mirrors to /mnt/lustre/file1. The first and second mirrors have the
95 same PFL layout. All of the components are allocated from the flash OST pool.
96 The last three mirrors have the same PFL layout. All of these components have a
97 stripe size of 16MB and use OSTs in the archive pool.
98 .LP
99 .B lfs mirror extend --no-verify -N -f /mnt/lustre/file2 -N -f /mnt/lustre/file3
100 .B /mnt/lustre/file1
101 .in
102 Split the layouts from /mnt/lustre/file2 and /mnt/lustre/file3, which contain
103 the same data as /mnt/lustre/file1, use the layouts as mirrors and add them to
104 /mnt/lustre/file1 without verification.
105 .SH AUTHOR
106 The \fBlfs mirror extend\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-create (1),
111 .BR lfs-mirror-split (1),
112 .BR lfs-mirror-resync (1),
113 .BR lfs-mirror-verify (1)