1DRBDADM(8)                   System Administration                  DRBDADM(8)
2
3
4

NAME

6       drbdadm - Administration tool for DRBD
7

SYNOPSIS

9       drbdadm [-d] [-c {file}] [-t {file}] [-s {cmd}] [-m {cmd}] [-S]
10               [-h {host}] [-- {backend-options}] {command} [{all} |
11               {resource[/volume>]...}]
12

DESCRIPTION

14       Drbdadm is the high level tool of the DRBD program suite.  Drbdadm is
15       to drbdsetup and drbdmeta what ifup/ifdown is to ifconfig.  Drbdadm
16       reads its configuration file and performs the specified commands by
17       calling the drbdsetup and/or the drbdmeta program.
18
19       Drbdadm can operate on whole resources or on individual volumes in a
20       resource. The sub commands: attach, detach, primary, secondary,
21       invalidate, invalidate-remote, outdate, resize, verify, pause-sync,
22       resume-sync, role, csytate, dstate, create-md, show-gi, get-gi,
23       dump-md, wipe-md work on whole resources and on individual volumes.
24
25       Resource level only commands are: connect, disconnect, up, down,
26       wait-connect and dump.
27

OPTIONS

29       -d, --dry-run
30           Just prints the calls of drbdsetup to stdout, but does not run the
31           commands.
32
33       -c, --config-file file
34           Specifies the configuration file drbdadm will use. If this
35           parameter is not specified, drbdadm will look for
36           /etc/drbd-84.conf, /etc/drbd-83.conf, /etc/drbd-08.conf and
37           /etc/drbd.conf.
38
39       -t, --config-to-test file
40           Specifies an additional configuration file drbdadm to check. This
41           option is only allowed with the dump and the sh-nop commands.
42
43       -s, --drbdsetup file
44           Specifies the full path to the drbdsetup program. If this option is
45           omitted, drbdadm will look for it beneath itself first, and then in
46           the PATH.
47
48       -m, --drbdmeta file
49           Specifies the full path to the drbdmeta program. If this option is
50           omitted, drbdadm will look for it beneath itself first, and then in
51           the PATH.
52
53       -S, --stacked
54           Specifies that this command should be performed on a stacked
55           resource.
56
57       -P, --peer
58           Specifies to which peer node to connect. Only necessary if there
59           are more than two host sections in the resource you are working on.
60
61       -- backend-options
62           All options following the doubly hyphen are considered
63           backend-options. These are passed through to the backend command.
64           I.e. to drbdsetup, drbdmeta or drbd-proxy-ctl.
65

COMMANDS

67       attach
68           Attaches a local backing block device to the DRBD resource's
69           device.
70
71       detach
72
73           Removes the backing storage device from a DRBD resource's device.
74
75       connect
76
77           Sets up the network configuration of the resource's device. If the
78           peer device is already configured, the two DRBD devices will
79           connect. If there are more than two host sections in the resource
80           you need to use the --peer option to select the peer you want to
81           connect to.
82
83       disconnect
84
85           Removes the network configuration from the resource. The device
86           will then go into StandAlone state.
87
88       syncer
89
90           Loads the resynchronization parameters into the device.
91
92       up
93
94           Is a shortcut for attach and connect.
95
96       down
97
98           Is a shortcut for disconnect and detach.
99
100       primary
101
102           Promote the resource's device into primary role. You need to do
103           this before any access to the device, such as creating or mounting
104           a file system.
105
106       secondary
107
108           Brings the device back into secondary role. This is needed since in
109           a connected DRBD device pair, only one of the two peers may have
110           primary role (except if allow-two-primaries is explicitly set in
111           the configuration file).
112
113       invalidate
114
115           Forces DRBD to consider the data on the local backing storage
116           device as out-of-sync. Therefore DRBD will copy each and every
117           block from its peer, to bring the local storage device back in
118           sync. To avoid races, you need an established replication link, or
119           be disconnected Secondary.
120
121       invalidate-remote
122
123           This command is similar to the invalidate command, however, the
124           peer's backing storage is invalidated and hence rewritten with the
125           data of the local node. To avoid races, you need an established
126           replication link, or be disconnected Primary.
127
128       resize
129
130           Causes DRBD to re-examine all sizing constraints, and resize the
131           resource's device accordingly. For example, if you increased the
132           size of your backing storage devices (on both nodes, of course),
133           then DRBD will adopt the new size after you called this command on
134           one of your nodes. Since new storage space must be synchronised
135           this command only works if there is at least one primary node
136           present.
137
138           Note that all of the following options are backend-options (i.e.,
139           separated via "--").
140
141           The --size option can be used to online shrink the usable size of a
142           drbd device. It's the users responsibility to make sure that a file
143           system on the device is not truncated by that operation. Example:
144
145               # drbdadm -- --size=10G resize r0
146
147           The --assume-peer-has-space allows you to resize a device which is
148           currently not connected to the peer. Use with care, since if you do
149           not resize the peer's disk as well, further connect attempts of the
150           two will fail.
151
152           The --assume-clean allows you to resize an existing device and
153           avoid syncing the new space. This is useful when adding addtional
154           blank storage to your device. Example:
155
156               # drbdadm -- --assume-clean resize r0
157
158           The options --al-stripes and --al-stripe-size-kB may be used to
159           change the layout of the activity log online. In case of internal
160           meta data this may invovle shrinking the user visible size at the
161           same time (unsing the --size) or increasing the avalable space on
162           the backing devices.
163
164       check-resize
165
166           Calls drbdmeta to eventually move internal meta data. If the
167           backing device was resized, while DRBD was not running, meta data
168           has to be moved to the end of the device, so that the next attach
169           command can succeed.
170
171       create-md
172
173           Initializes the meta data storage. This needs to be done before a
174           DRBD resource can be taken online for the first time. In case of
175           issues with that command have a look at drbdmeta(8)
176
177       get-gi
178
179           Shows a short textual representation of the data generation
180           identifiers.
181
182       show-gi
183
184           Prints a textual representation of the data generation identifiers
185           including explanatory information.
186
187       dump-md
188
189           Dumps the whole contents of the meta data storage, including the
190           stored bit-map and activity-log, in a textual representation.
191
192       outdate
193
194           Sets the outdated flag in the meta data.
195
196       adjust
197
198           Synchronizes the configuration of the device with your
199           configuration file. You should always examine the output of the
200           dry-run mode before actually executing this command.
201
202       wait-connect
203
204           Waits until the device is connected to its peer device.
205
206       role
207
208           Shows the current roles of the devices (local/peer). E.g.
209           Primary/Secondary
210
211       state
212
213           Deprecated alias for "role", see above.
214
215       cstate
216
217           Shows the current connection state of the devices.
218
219       dump
220
221           Just parse the configuration file and dump it to stdout. May be
222           used to check the configuration file for syntactic correctness.
223
224       outdate
225
226           Used to mark the node's data as outdated. Usually used by the
227           peer's fence-peer handler.
228
229       verify
230
231           Starts online verify. During online verify, data on both nodes is
232           compared for equality. See /proc/drbd for online verify progress.
233           If out-of-sync blocks are found, they are not resynchronized
234           automatically. To do that, disconnect and connect the resource when
235           verification has completed.
236
237           See also the notes on data integrity on the drbd.conf manpage.
238
239       pause-sync
240
241           Temporarily suspend an ongoing resynchronization by setting the
242           local pause flag. Resync only progresses if neither the local nor
243           the remote pause flag is set. It might be desirable to postpone
244           DRBD's resynchronization until after any resynchronization of the
245           backing storage's RAID setup.
246
247       resume-sync
248
249           Unset the local sync pause flag.
250
251       new-current-uuid
252
253           Generates a new currend UUID and rotates all other UUID values.
254
255           This can be used to shorten the initial resync of a cluster. See
256           the drbdsetup manpage for a more details.
257
258       dstate
259
260           Show the current state of the backing storage devices. (local/peer)
261
262       hidden-commands
263           Shows all commands undocumented on purpose.
264

VERSION

266       This document was revised for version 8.4.0 of the DRBD distribution.
267

AUTHOR

269       Written by Philipp Reisner <philipp.reisner@linbit.com> and Lars
270       Ellenberg <lars.ellenberg@linbit.com>
271

REPORTING BUGS

273       Report bugs to <drbd-user@lists.linbit.com>.
274
276       Copyright 2001-2011 LINBIT Information Technologies, Philipp Reisner,
277       Lars Ellenberg. This is free software; see the source for copying
278       conditions. There is NO warranty; not even for MERCHANTABILITY or
279       FITNESS FOR A PARTICULAR PURPOSE.
280

SEE ALSO

282       drbd.conf(5), drbd(8), drbddisk(8), drbdsetup(8), drbdmeta(8) and the
283       DRBD project web site[1]
284

NOTES

286        1. DRBD project web site
287           http://www.drbd.org/
288
289
290
291DRBD 8.4.0                        6 May 2011                        DRBDADM(8)
Impressum