File: drbdadm.8

package info (click to toggle)
drbd-utils 9.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 5,388 kB
  • sloc: ansic: 43,698; xml: 15,968; cpp: 7,783; sh: 3,699; makefile: 1,353; perl: 353
file content (397 lines) | stat: -rw-r--r-- 10,713 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
'\" t
.\"     Title: drbdadm
.\"    Author: [see the "Author" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\"      Date: 5 Dec 2008
.\"    Manual: System Administration
.\"    Source: DRBD 8.3.2
.\"  Language: English
.\"
.TH "DRBDADM" "8" "5 Dec 2008" "DRBD 8.3.2" "System Administration"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
drbdadm \- Administration tool for DRBD
.SH "SYNOPSIS"
.HP \w'\fBdrbdadm\fR\ 'u
\fBdrbdadm\fR [\-d] [\-c\ {\fIfile\fR}] [\-t\ {\fIfile\fR}] [\-s\ {\fIcmd\fR}] [\-m\ {\fIcmd\fR}] [\-S] [\-h\ {\fIhost\fR}] [\-\-\ {\fIbackend\-options\fR}] {\fIcommand\fR} [all | \fIresource\fR...]
.SH "DESCRIPTION"
.PP
\fBDrbdadm\fR
is the high level tool of the DRBD program suite\&.
\fBDrbdadm\fR
is to
\fBdrbdsetup\fR
and
\fBdrbdmeta\fR
what
\fBifup\fR/\fBifdown\fR
is to
\fBifconfig\fR\&.
\fBDrbdadm\fR
reads its configuration file and performs the specified commands by calling the
\fBdrbdsetup\fR
and/or the
\fBdrbdmeta\fR
program\&.
.SH "OPTIONS"
.PP
\fB\-d\fR, \fB\-\-dry\-run\fR
.RS 4
Just prints the calls of
\fBdrbdsetup\fR
to stdout, but does not run the commands\&.
.RE
.PP
\fB\-c\fR, \fB\-\-config\-file\fR \fIfile\fR
.RS 4
Specifies the configuration file drbdadm will use\&. If this parameter is not specified, drbdadm will look for
\fB/etc/drbd\-83\&.conf\fR,
\fB/etc/drbd\-08\&.conf\fR
and
\fB/etc/drbd\&.conf\fR\&.
.RE
.PP
\fB\-t\fR, \fB\-\-config\-to\-test\fR \fIfile\fR
.RS 4
Specifies an additional configuration file drbdadm to check\&. This option is only allowed with the dump and the sh\-nop commands\&.
.RE
.PP
\fB\-s\fR, \fB\-\-drbdsetup\fR \fIfile\fR
.RS 4
Specifies the full path to the
\fBdrbdsetup\fR
program\&. If this option is omitted, drbdadm will look for
\fB/sbin/drbdsetup\fR
and
\fB\&./drbdsetup\fR\&.
.RE
.PP
\fB\-m\fR, \fB\-\-drbdmeta\fR \fIfile\fR
.RS 4
Specifies the full path to the
\fBdrbdmeta\fR
program\&. If this option is omitted, drbdadm will look for
\fB/sbin/drbdmeta\fR
and
\fB\&./drbdmeta\fR\&.
.RE
.PP
\fB\-S\fR, \fB\-\-stacked\fR
.RS 4
Specifies that this command should be performed on a stacked resource\&.
.RE
.PP
\fB\-P\fR, \fB\-\-peer\fR
.RS 4
Specifies to which peer node to connect\&. Only necessary if there are more than two host sections in the resource you are working on\&.
.RE
.PP
\fB\-\-\fR \fIbackend\-options\fR
.RS 4
All options following the doubly hyphen are considered
\fIbackend\-options\fR\&. These are passed through to the backend command\&. I\&.e\&. to
\fBdrbdsetup\fR,
\fBdrbdmeta\fR
or
\fBdrbd\-proxy\-ctl\fR\&.
.RE
.SH "COMMANDS"
.PP
attach
.RS 4
Attaches a local backing block device to the DRBD resource\*(Aqs device\&.
.RE
.PP
detach
.RS 4

Removes the backing storage device from a DRBD resource\*(Aqs device\&.
.RE
.PP
connect
.RS 4

Sets up the network configuration of the resource\*(Aqs device\&. If the peer device is already configured, the two DRBD devices will connect\&. If there are more than two host sections in the resource you need to use the
\fB\-\-peer\fR
option to select the peer you want to connect to\&.
.RE
.PP
disconnect
.RS 4

Removes the network configuration from the resource\&. The device will then go into StandAlone state\&.
.RE
.PP
syncer
.RS 4

Loads the resynchronization parameters into the device\&.
.RE
.PP
up
.RS 4

Is a shortcut for attach and connect\&.
.RE
.PP
down
.RS 4

Is a shortcut for disconnect and detach\&.
.RE
.PP
primary
.RS 4

Promote the resource\*(Aqs device into primary role\&. You need to do this before any access to the device, such as creating or mounting a file system\&.
.RE
.PP
secondary
.RS 4

Brings the device back into secondary role\&. This is needed since in a connected DRBD device pair, only one of the two peers may have primary role (except if
\fBallow\-two\-primaries\fR
is explicitly set in the configuration file)\&.
.RE
.PP
invalidate
.RS 4

Forces DRBD to consider the data on the
\fIlocal\fR
backing storage device as out\-of\-sync\&. Therefore DRBD will copy each and every block from its peer, to bring the local storage device back in sync\&. To avoid races, you need an established replication link, or be disconnected Secondary\&.
.RE
.PP
invalidate\-remote
.RS 4

This command is similar to the invalidate command, however, the
\fIpeer\*(Aqs\fR
backing storage is invalidated and hence rewritten with the data of the local node\&. To avoid races, you need an established replication link, or be disconnected Primary\&.
.RE
.PP
resize
.RS 4

Causes DRBD to re\-examine all sizing constraints, and resize the resource\*(Aqs device accordingly\&. For example, if you increased the size of your backing storage devices (on both nodes, of course), then DRBD will adopt the new size after you called this command on one of your nodes\&. Since new storage space must be synchronised this command only works if there is at least one primary node present\&.
.sp
The
\fB\-\-assume\-peer\-has\-space\fR
allows you to resize a device which is currently not connected to the peer\&. Use with care, since if you do not resize the peer\*(Aqs disk as well, further connect attempts of the two will fail\&.
.sp
The
\fB\-\-assume\-clean\fR
allows you to resize an existing device and avoid syncing the new space\&. This is useful when adding addtional blank storage to your device\&. Example:
.sp
.if n \{\
.RS 4
.\}
.nf
# drbdadm \-\- \-\-assume\-clean resize r0
.fi
.if n \{\
.RE
.\}
.sp
.RE
.PP
check\-resize
.RS 4

Calls drbdmeta to eventually move internal meta data\&. If the backing device was resized, while DRBD was not running, meta data has to be moved to the end of the device, so that the next
\fBattach\fR
command can succeed\&.
.RE
.PP
create\-md
.RS 4

Initializes the meta data storage\&. This needs to be done before a DRBD resource can be taken online for the first time\&. In case of issues with that command have a look at
\fBdrbdmeta\fR(8)
.RE
.PP
get\-gi
.RS 4

Shows a short textual representation of the data generation identifiers\&.
.RE
.PP
show\-gi
.RS 4

Prints a textual representation of the data generation identifiers including explanatory information\&.
.RE
.PP
dump\-md
.RS 4

Dumps the whole contents of the meta data storage, including the stored bit\-map and activity\-log, in a textual representation\&.
.RE
.PP
outdate
.RS 4

Sets the outdated flag in the meta data\&.
.RE
.PP
adjust
.RS 4

Synchronizes the configuration of the device with your configuration file\&. You should always examine the output of the dry\-run mode before actually executing this command\&.
.RE
.PP
wait\-connect
.RS 4

Waits until the device is connected to its peer device\&.
.RE
.PP
role
.RS 4

Shows the current roles of the devices (local/peer)\&. E\&.g\&. Primary/Secondary
.RE
.PP
state
.RS 4

Deprecated alias for "role", see above\&.
.RE
.PP
cstate
.RS 4

Shows the current connection state of the devices\&.
.RE
.PP
status
.RS 4

Shows the current status of all devices defined in the current config file, in XML\-like format\&. Example output:
.sp
.if n \{\
.RS 4
.\}
.nf
<drbd\-status version="8\&.3\&.2" api="88">
<resources config_file="/etc/drbd\&.conf">
<resource minor="0" name="s0" cs="SyncTarget" st1="Secondary" st2="Secondary"
          ds1="Inconsistent" ds2="UpToDate" resynced_precent="5\&.9" />
<resource minor="1" name="s1" cs="WFConnection" st1="Secondary"
          st2="Unknown" ds1="Inconsistent" ds2="Outdated" />
<resource minor="3" name="dummy" cs="Unconfigured" />
<!\-\- resource minor="4" name="scratch" not available or not yet created \-\->
</resources>
</drbd\-status>
.fi
.if n \{\
.RE
.\}
.sp
.RE
.PP
dump
.RS 4

Just parse the configuration file and dump it to stdout\&. May be used to check the configuration file for syntactic correctness\&.
.RE
.PP
outdate
.RS 4

Used to mark the node\*(Aqs data as outdated\&. Usually used by the peer\*(Aqs fence\-peer handler\&.
.RE
.PP
verify
.RS 4

Starts online verify\&. During online verify, data on both nodes is compared for equality\&. See
/proc/drbd
for online verify progress\&. If out\-of\-sync blocks are found, they are
\fInot\fR
resynchronized automatically\&. To do that,
\fBdisconnect\fR
and
\fBconnect\fR
the resource when verification has completed\&.
.sp
See also the notes on data integrity on the drbd\&.conf manpage\&.
.RE
.PP
pause\-sync
.RS 4

Temporarily suspend an ongoing resynchronization by setting the local pause flag\&. Resync only progresses if neither the local nor the remote pause flag is set\&. It might be desirable to postpone DRBD\*(Aqs resynchronization until after any resynchronization of the backing storage\*(Aqs RAID setup\&.
.RE
.PP
resume\-sync
.RS 4

Unset the local sync pause flag\&.
.RE
.PP
new\-current\-uuid
.RS 4

Generates a new currend UUID and rotates all other UUID values\&.
.sp
This can be used to shorten the initial resync of a cluster\&. See the
\fBdrbdsetup\fR
manpage for a more details\&.
.RE
.PP
dstate
.RS 4

Show the current state of the backing storage devices\&. (local/peer)
.RE
.PP
hidden\-commands
.RS 4
Shows all commands undocumented on purpose\&.
.RE
.SH "VERSION"
.sp
This document was revised for version 8\&.3\&.2 of the DRBD distribution\&.
.SH "AUTHOR"
.sp
Written by Philipp Reisner <philipp\&.reisner@linbit\&.com> and Lars Ellenberg <lars\&.ellenberg@linbit\&.com>
.SH "REPORTING BUGS"
.sp
Report bugs to <drbd\-user@lists\&.linbit\&.com>\&.
.SH "COPYRIGHT"
.sp
Copyright 2001\-2008 LINBIT Information Technologies, Philipp Reisner, Lars Ellenberg\&. This is free software; see the source for copying conditions\&. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE\&.
.SH "SEE ALSO"
.PP
\fBdrbd.conf\fR(5),
\fBdrbd\fR(8),
\fBdrbddisk\fR(8),
\fBdrbdsetup\fR(8),
\fBdrbdmeta\fR(8)
and the
\m[blue]\fBDRBD project web site\fR\m[]\&\s-2\u[1]\d\s+2
.SH "NOTES"
.IP " 1." 4
DRBD project web site
.RS 4
\%http://www.drbd.org/
.RE