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