Whamcloud - gitweb
7639f59afc378aa3f2ab802bbd08e70ecaa08937
[fs/lustre-release.git] / lustre / doc / lreplicate.8
1 .TH lreplicate 8 "2009 Apr 08" Lustre "Lustre Filesystem replication utility"
2 .SH NAME
3 lreplicate \- Utility to replicate a Lustre Filesystem
4 .SH SYNOPSIS
5 .br
6 .B lreplicate --source|-s <src> --target|-t <tgt> 
7 .br
8 .B\t\t\t --mdt|-m <mdt>  --user|-u <user id> --xattr|-x <yes|no>
9 .br
10 .B\t\t\t --verbose|-v --statuslog|-l <log> --dry-run
11 .br
12
13 .br
14 .B lreplicate  --statuslog|-l <log>
15 .br
16
17 .br
18 .B lreplicate  --statuslog|-l <log> --source|-s <source>
19 .br
20 .br
21 .B\t\t\t --target|-t <tgt> --mdt|-m <mdt>
22 .SH DESCRIPTION
23 .B lreplicate
24 can be used to replicate a lustre filesystem (source filesystem) to
25 another target filesystem (any filesystem type). It is required that
26 changelogs be enabled on the source filesystem (see lctl (8)).
27
28 The source and the target filesystems must be identical before
29 changelogs are enabled. If the source filesystem has been populated
30 before turning on changelogs, a utility like rsync may be used to make
31 them identical.
32
33 .SH OPTIONS
34 .B --source=<src>
35 .br
36 The source filesytem which will be replicated. Mandatory if a valid
37 statuslog created during an previous replication operation
38 (--statuslog) is not specified.
39
40 .B --target=<tgt>
41 .br
42 The filesystem to which the source filesystem is replicated. Mandatory
43 if a valid statuslog created during an previous replication operation
44 (--statuslog) is not specified. This option can be repeated if
45 multiple replication targets are desired.
46
47 .B --mdt=<mdt>
48 .br
49 The metadata device which is to be replicated. Changelogs must be
50 turned on on this device. Mandatory if a valid statuslog created
51 during an previous replication operation (--statuslog) is not
52 specified.
53
54 .B --user=<user id>
55 .br
56 The changelog user id. See lctl(8) changelog_register. Mandatory if a
57 valid statuslog created during an previous replication operation
58 (--statuslog) is not specified.
59
60 .B --statuslog=<log>
61 .br
62 A status log file to which the status of replication is saved. At the
63 time of initialization, the state from a previous replication
64 operation which was saved, can be read and reused.
65
66 If a statuslog from a previous replication operation is specified, the
67 otherwise mandatory options like --source, --target and --mdt may be
68 skipped.
69
70 By specifying the options like --source, --target and --mdt in
71 addition to the --statuslog option, the parameters in the statuslog
72 can be overridden. The command line options take precedence over the
73 ones from the statuslog.
74
75 .B --xattr <yes|no>
76 .br
77 Specify whether extended attributes are replicated or not. The default
78 is to replicate extended attributes. Disabling xattrs will mean that
79 striping information will not be replicated.
80
81 .B --verbose
82 .br
83 Produce a verbose output.
84
85 .B --dry-run
86 .br
87 Shows what the program would do without actually replicating data.
88
89 .SH EXAMPLES
90
91 .TP
92 Register a changelog consumer for MDT lustre-MDT0000
93 $ ssh $MDS lctl changelog_register --device lustre-MDT0000 -n
94 .br
95 1
96
97 .TP
98 Replicate the lustre filesystem /mnt/lustre to /mnt/target.
99 $ lreplicate --source=/mnt/lustre --target=/mnt/target \\ 
100 .br
101              --mdt=lustre-MDT0000 --user=1 \\
102 .br
103              --statuslog replicate.log  --verbose
104 .br
105 Lustre filesystem: lustre
106 .br
107 MDT device: lustre-MDT0000
108 .br
109 Source: /mnt/lustre
110 .br
111 Target: /mnt/target
112 .br
113 Statuslog: replicate.log
114 .br
115 Changelog registration: cl1
116 .br
117 Starting changelog record: 0
118 .br
119 Errors: 0
120 .br
121 lreplicate took 1 seconds
122 .br
123 Changelog records consumed: 22
124 .br
125
126
127 .TP
128 After the filesystem undergoes some changes, replicate the \
129 changes. Only the statuslog needs to be specified as it has all the \
130 parameters passed earlier.
131 .br
132 $ lreplicate --statuslog replicate.log --verbose
133 .br
134 Replicating Lustre filesystem: lustre
135 .br
136 MDT device: lustre-MDT0000
137 .br
138 Source: /mnt/lustre
139 .br
140 Target: /mnt/target
141 .br
142 Statuslog: replicate.log
143 .br
144 Changelog registration: cl1
145 .br
146 Starting changelog record: 22
147 .br
148 Errors: 0
149 .br
150 lreplicate took 2 seconds
151 .br
152 Changelog records consumed: 42
153 .br
154
155 .TP
156 To replicate the lustre filesystem /mnt/lustre to /mnt/target1 and /mnt/target2.
157 $ lreplicate --source=/mnt/lustre \\ 
158 .br
159              --target=/mnt/target1 --target=/mnt/target2 \\ 
160 .br
161              --mdt=lustre-MDT0000 --user=cl1
162 .br
163              --statuslog replicate.log
164 .br
165
166
167 .SH AUTHOR
168 The lreplicate command is part of the Lustre filesystem. Contact
169 http://www.lustre.org/
170
171 .SH SEE ALSO
172 .BR lctl (8),
173 .BR lfs (1)