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

NAME

6       drbdsetup - Setup tool for DRBD
7

SYNOPSIS

9       drbdsetup {device} disk {lower_dev} {meta_data_dev} {meta_data_index}
10                 [-d {size}] [-e {err_handler}] [-f {fencing_policy}] [-b]
11                 [-t {disk_timeout}]
12
13       drbdsetup {device} net [af:] {local_addr} [:port] [af:] {remote_addr}
14                 [:port] {protocol} [-c {time}] [-i {time}] [-t {val}]
15                 [-S {size}] [-r {size}] [-k {count}] [-e {max_epoch_size}]
16                 [-b {max_buffers}] [-m] [-a {hash_alg}] [-x {shared_secret}]
17                 [-A {asb-0p-policy}] [-B {asb-1p-policy}]
18                 [-C {asb-2p-policy}] [-D] [-R {role-resync-conflict-policy}]
19                 [-p {ping_timeout}] [-u {val}] [-d {hash_alg}] [-o] [-n]
20                 [-g {congestion_policy}] [-f {val}] [-h {val}]
21
22       drbdsetup {device} syncer [-a {dev_minor}] [-r {rate}] [-e {extents}]
23                 [-v {verify-hash-alg}] [-c {cpu-mask}] [-C {csums-hash-alg}]
24                 [-R] [-p {plan_time}] [-s {fill_target}] [-d {delay_target}]
25                 [-m {max_rate}] [-n {ond-policy}]
26
27       drbdsetup {device} disconnect
28
29       drbdsetup {device} detach [-f]
30
31       drbdsetup {device} down
32
33       drbdsetup {device} primary [-f] [-o]
34
35       drbdsetup {device} secondary
36
37       drbdsetup {device} verify [-s {start-position}] [-S {stop-position}]
38
39       drbdsetup {device} invalidate
40
41       drbdsetup {device} invalidate-remote
42
43       drbdsetup {device} wait-connect [-t {wfc_timeout}]
44                 [-d {degr_wfc_timeout}] [-o {outdated_wfc_timeout}] [-w]
45
46       drbdsetup {device} wait-sync [-t {wfc_timeout}] [-d {degr_wfc_timeout}]
47                 [-o {outdated_wfc_timeout}] [-w]
48
49       drbdsetup {device} role
50
51       drbdsetup {device} cstate
52
53       drbdsetup {device} dstate
54
55       drbdsetup {device} status
56
57       drbdsetup {device} resize [-d {size}] [-f {assume-peer-has-space}]
58                 [-c {assume-clean}]
59
60       drbdsetup {device} check-resize
61
62       drbdsetup {device} pause-sync
63
64       drbdsetup {device} resume-sync
65
66       drbdsetup {device} outdate
67
68       drbdsetup {device} show-gi
69
70       drbdsetup {device} get-gi
71
72       drbdsetup {device} show
73
74       drbdsetup {device} suspend-io
75
76       drbdsetup {device} resume-io
77
78       drbdsetup {device} events [-u] [-a]
79
80       drbdsetup {device} new-current-uuid [-c]
81

DESCRIPTION

83       drbdsetup is used to associate DRBD devices with their backing block
84       devices, to set up DRBD device pairs to mirror their backing block
85       devices, and to inspect the configuration of running DRBD devices.
86

NOTE

88       drbdsetup is a low level tool of the DRBD program suite. It is used by
89       the data disk and drbd scripts to communicate with the device driver.
90

COMMANDS

92       Each drbdsetup sub-command might require arguments and bring its own
93       set of options. All values have default units which might be overruled
94       by K, M or G. These units are defined in the usual way (e.g. K = 2^10 =
95       1024).
96
97   Common options
98       All drbdsetup sub-commands accept these two options
99
100       --create-device
101           In case the specified DRBD device (minor number) does not exist
102           yet, create it implicitly.
103
104       --set-defaults
105           When --set-defaults is given on the command line, all options of
106           the invoked sub-command that are not explicitly set are reset to
107           their default values.
108
109   disk
110       Associates device with lower_device to store its data blocks on. The -d
111       (or --disk-size) should only be used if you wish not to use as much as
112       possible from the backing block devices. If you do not use -d, the
113       device is only ready for use as soon as it was connected to its peer
114       once. (See the net command.)
115
116       -d, --disk-size size
117           You can override DRBD's size determination method with this option.
118           If you need to use the device before it was ever connected to its
119           peer, use this option to pass the size of the DRBD device to the
120           driver. Default unit is sectors (1s = 512 bytes).
121
122           If you use the size parameter in drbd.conf, we strongly recommend
123           to add an explicit unit postfix. drbdadm and drbdsetup used to have
124           mismatching default units.
125
126       -e, --on-io-error err_handler
127           If the driver of the lower_device reports an error to DRBD, DRBD
128           will mark the disk as inconsistent, call a helper program, or
129           detach the device from its backing storage and perform all further
130           IO by requesting it from the peer. The valid err_handlers are:
131           pass_on, call-local-io-error and detach.
132
133       -f, --fencing fencing_policy
134           Under fencing we understand preventive measures to avoid situations
135           where both nodes are primary and disconnected (AKA split brain).
136
137           Valid fencing policies are:
138
139           dont-care
140               This is the default policy. No fencing actions are done.
141
142           resource-only
143               If a node becomes a disconnected primary, it tries to outdate
144               the peer's disk. This is done by calling the fence-peer
145               handler. The handler is supposed to reach the other node over
146               alternative communication paths and call 'drbdadm outdate res'
147               there.
148
149           resource-and-stonith
150               If a node becomes a disconnected primary, it freezes all its IO
151               operations and calls its fence-peer handler. The fence-peer
152               handler is supposed to reach the peer over alternative
153               communication paths and call 'drbdadm outdate res' there. In
154               case it cannot reach the peer, it should stonith the peer. IO
155               is resumed as soon as the situation is resolved. In case your
156               handler fails, you can resume IO with the resume-io command.
157
158       -b, --use-bmbv
159           In case the backing storage's driver has a merge_bvec_fn()
160           function, DRBD has to pretend that it can only process IO requests
161           in units not larger than 4 KiB. (At time of writing the only known
162           drivers which have such a function are: md (software raid driver),
163           dm (device mapper - LVM) and DRBD itself)
164
165           To get best performance out of DRBD on top of software raid (or any
166           other driver with a merge_bvec_fn() function) you might enable this
167           option, if you know for sure that the merge_bvec_fn() function will
168           deliver the same results on all nodes of your cluster. I.e. the
169           physical disks of the software raid are exactly of the same type.
170           USE THIS OPTION ONLY IF YOU KNOW WHAT YOU ARE DOING.
171
172       -a, --no-disk-barrier, -i, --no-disk-flushes, -D, --no-disk-drain
173           DRBD has four implementations to express write-after-write
174           dependencies to its backing storage device. DRBD will use the first
175           method that is supported by the backing storage device and that is
176           not disabled by the user.
177
178           When selecting the method you should not only base your decision on
179           the measurable performance. In case your backing storage device has
180           a volatile write cache (plain disks, RAID of plain disks) you
181           should use one of the first two. In case your backing storage
182           device has battery-backed write cache you may go with option 3.
183           Option 4 (disable everything, use "none") is dangerous on most IO
184           stacks, may result in write-reordering, and if so, can
185           theoretically be the reason for data corruption, or disturb the
186           DRBD protocol, causing spurious disconnect/reconnect cycles.  Do
187           not use no-disk-drain.
188
189           Unfortunately device mapper (LVM) might not support barriers.
190
191           The letter after "wo:" in /proc/drbd indicates with method is
192           currently in use for a device: b, f, d, n. The implementations:
193
194           barrier
195               The first requires that the driver of the backing storage
196               device support barriers (called 'tagged command queuing' in
197               SCSI and 'native command queuing' in SATA speak). The use of
198               this method can be disabled by the --no-disk-barrier option.
199               Note: Since Linux-2.6.36 (or RHEL's 2.6.32) this method is
200               disabled.
201
202           flush
203               The second requires that the backing device support disk
204               flushes (called 'force unit access' in the drive vendors
205               speak). The use of this method can be disabled using the
206               --no-disk-flushes option.
207
208           drain
209               The third method is simply to let write requests drain before
210               write requests of a new reordering domain are issued. That was
211               the only implementation before 8.0.9.
212
213           none
214               The fourth method is to not express write-after-write
215               dependencies to the backing store at all, by also specifying
216               --no-disk-drain. This is dangerous on most IO stacks, may
217               result in write-reordering, and if so, can theoretically be the
218               reason for data corruption, or disturb the DRBD protocol,
219               causing spurious disconnect/reconnect cycles.  Do not use
220               --no-disk-drain.
221
222       -m, --no-md-flushes
223           Disables the use of disk flushes and barrier BIOs when accessing
224           the meta data device. See the notes on --no-disk-flushes.
225
226       -s, --max-bio-bvecs
227           In some special circumstances the device mapper stack manages to
228           pass BIOs to DRBD that violate the constraints that are set forth
229           by DRBD's merge_bvec() function and which have more than one bvec.
230           A known example is: phys-disk -> DRBD -> LVM -> Xen -> missaligned
231           partition (63) -> DomU FS. Then you might see "bio would need to,
232           but cannot, be split:" in the Dom0's kernel log.
233
234           The best workaround is to proper align the partition within the VM
235           (E.g. start it at sector 1024). That costs 480 KiB of storage.
236           Unfortunately the default of most Linux partitioning tools is to
237           start the first partition at an odd number (63). Therefore most
238           distributions install helpers for virtual linux machines will end
239           up with missaligned partitions. The second best workaround is to
240           limit DRBD's max bvecs per BIO (i.e., the max-bio-bvecs option) to
241           1, but that might cost performance.
242
243           The default value of max-bio-bvecs is 0, which means that there is
244           no user imposed limitation.
245
246       -t, --disk-timeout disk_timeout
247           If the driver of the lower_device does not finish an IO request
248           within disk_timeout, DRBD considers the disk as failed. If DRBD is
249           connected to a remote host, it will reissue local pending IO
250           requests to the peer, and ship all new IO requests to the peer
251           only. The disk state advances to diskless, as soon as the backing
252           block device has finished all IO requests.
253
254           The default value of is 0, which means that no timeout is enforced.
255           The default unit is 100ms. This option is available since 8.3.12.
256
257   net
258       Sets up the device to listen on af:local_addr:port for incoming
259       connections and to try to connect to af:remote_addr:port. If port is
260       omitted, 7788 is used as default. If af is omitted ipv4 gets used.
261       Other supported address families are ipv6, ssocks for Dolphin
262       Interconnect Solutions' "super sockets" and sdp for Sockets Direct
263       Protocol (Infiniband).
264
265       On the TCP/IP link the specified protocol is used. Valid protocol
266       specifiers are A, B, and C.
267
268       Protocol A: write IO is reported as completed, if it has reached local
269       disk and local TCP send buffer.
270
271       Protocol B: write IO is reported as completed, if it has reached local
272       disk and remote buffer cache.
273
274       Protocol C: write IO is reported as completed, if it has reached both
275       local and remote disk.
276
277       -c, --connect-int time
278           In case it is not possible to connect to the remote DRBD device
279           immediately, DRBD keeps on trying to connect. With this option you
280           can set the time between two retries. The default value is 10
281           seconds, the unit is 1 second.
282
283       -i, --ping-int time
284           If the TCP/IP connection linking a DRBD device pair is idle for
285           more than time seconds, DRBD will generate a keep-alive packet to
286           check if its partner is still alive. The default value is 10
287           seconds, the unit is 1 second.
288
289       -t, --timeout val
290           If the partner node fails to send an expected response packet
291           within val tenths of a second, the partner node is considered dead
292           and therefore the TCP/IP connection is abandoned. The default value
293           is 60 (= 6 seconds).
294
295       -S, --sndbuf-size size
296           The socket send buffer is used to store packets sent to the
297           secondary node, which are not yet acknowledged (from a network
298           point of view) by the secondary node. When using protocol A, it
299           might be necessary to increase the size of this data structure in
300           order to increase asynchronicity between primary and secondary
301           nodes. But keep in mind that more asynchronicity is synonymous with
302           more data loss in the case of a primary node failure. Since 8.0.13
303           resp. 8.2.7 setting the size value to 0 means that the kernel
304           should autotune this. The default size is 0, i.e. autotune.
305
306       -r, --rcvbuf-size size
307           Packets received from the network are stored in the socket receive
308           buffer first. From there they are consumed by DRBD. Before 8.3.2
309           the receive buffer's size was always set to the size of the socket
310           send buffer. Since 8.3.2 they can be tuned independently. A value
311           of 0 means that the kernel should autotune this. The default size
312           is 0, i.e. autotune.
313
314       -k, --ko-count count
315           In case the secondary node fails to complete a single write request
316           for count times the timeout, it is expelled from the cluster, i.e.
317           the primary node goes into StandAlone mode. To disable this
318           feature, you should explicitly set it to 0; defaults may change
319           between versions.
320
321       -e, --max-epoch-size val
322           With this option the maximal number of write requests between two
323           barriers is limited. Typically set to the same as --max-buffers, or
324           the allowed maximum. Values smaller than 10 can lead to degraded
325           performance. The default value is 2048.
326
327       -b, --max-buffers val
328           With this option the maximal number of buffer pages allocated by
329           DRBD's receiver thread is limited. Typically set to the same as
330           --max-epoch-size. Small values could lead to degraded performance.
331           The default value is 2048, the minimum 32. Increase this if you
332           cannot saturate the IO backend of the receiving side during linear
333           write or during resync while otherwise idle.
334
335           See also drbd.conf(5)
336
337       -u, --unplug-watermark val
338           This setting has no effect with recent kernels that use explicit
339           on-stack plugging (upstream Linux kernel 2.6.39, distributions may
340           have backported).
341
342           When the number of pending write requests on the standby
343           (secondary) node exceeds the unplug-watermark, we trigger the
344           request processing of our backing storage device. Some storage
345           controllers deliver better performance with small values, others
346           deliver best performance when the value is set to the same value as
347           max-buffers, yet others don't feel much effect at all. Minimum 16,
348           default 128, maximum 131072.
349
350       -m, --allow-two-primaries
351           With this option set you may assign primary role to both nodes. You
352           only should use this option if you use a shared storage file system
353           on top of DRBD. At the time of writing the only ones are: OCFS2 and
354           GFS. If you use this option with any other file system, you are
355           going to crash your nodes and to corrupt your data!
356
357       -a, --cram-hmac-alg alg
358           You need to specify the HMAC algorithm to enable peer
359           authentication at all. You are strongly encouraged to use peer
360           authentication. The HMAC algorithm will be used for the challenge
361           response authentication of the peer. You may specify any digest
362           algorithm that is named in /proc/crypto.
363
364       -x, --shared-secret secret
365           The shared secret used in peer authentication. May be up to 64
366           characters.
367
368       -A, --after-sb-0pri asb-0p-policy
369           possible policies are:
370
371           disconnect
372               No automatic resynchronization, simply disconnect.
373
374           discard-younger-primary
375               Auto sync from the node that was primary before the split-brain
376               situation occurred.
377
378           discard-older-primary
379               Auto sync from the node that became primary as second during
380               the split-brain situation.
381
382           discard-zero-changes
383               In case one node did not write anything since the split brain
384               became evident, sync from the node that wrote something to the
385               node that did not write anything. In case none wrote anything
386               this policy uses a random decision to perform a "resync" of 0
387               blocks. In case both have written something this policy
388               disconnects the nodes.
389
390           discard-least-changes
391               Auto sync from the node that touched more blocks during the
392               split brain situation.
393
394           discard-node-NODENAME
395               Auto sync to the named node.
396
397       -B, --after-sb-1pri asb-1p-policy
398           possible policies are:
399
400           disconnect
401               No automatic resynchronization, simply disconnect.
402
403           consensus
404               Discard the version of the secondary if the outcome of the
405               after-sb-0pri algorithm would also destroy the current
406               secondary's data. Otherwise disconnect.
407
408           discard-secondary
409               Discard the secondary's version.
410
411           call-pri-lost-after-sb
412               Always honor the outcome of the after-sb-0pri algorithm. In
413               case it decides the current secondary has the correct data,
414               call the pri-lost-after-sb on the current primary.
415
416           violently-as0p
417               Always honor the outcome of the after-sb-0pri algorithm. In
418               case it decides the current secondary has the correct data,
419               accept a possible instantaneous change of the primary's data.
420
421       -C, --after-sb-2pri asb-2p-policy
422           possible policies are:
423
424           disconnect
425               No automatic resynchronization, simply disconnect.
426
427           call-pri-lost-after-sb
428               Always honor the outcome of the after-sb-0pri algorithm. In
429               case it decides the current secondary has the right data, call
430               the pri-lost-after-sb on the current primary.
431
432           violently-as0p
433               Always honor the outcome of the after-sb-0pri algorithm. In
434               case it decides the current secondary has the right data,
435               accept a possible instantaneous change of the primary's data.
436
437       -P, --always-asbp
438           Normally the automatic after-split-brain policies are only used if
439           current states of the UUIDs do not indicate the presence of a third
440           node.
441
442           With this option you request that the automatic after-split-brain
443           policies are used as long as the data sets of the nodes are somehow
444           related. This might cause a full sync, if the UUIDs indicate the
445           presence of a third node. (Or double faults have led to strange
446           UUID sets.)
447
448       -R, --rr-conflict role-resync-conflict-policy
449           This option sets DRBD's behavior when DRBD deduces from its meta
450           data that a resynchronization is needed, and the SyncTarget node is
451           already primary. The possible settings are: disconnect,
452           call-pri-lost and violently. While disconnect speaks for itself,
453           with the call-pri-lost setting the pri-lost handler is called which
454           is expected to either change the role of the node to secondary, or
455           remove the node from the cluster. The default is disconnect.
456
457           With the violently setting you allow DRBD to force a primary node
458           into SyncTarget state. This means that the data exposed by DRBD
459           changes to the SyncSource's version of the data instantaneously.
460           USE THIS OPTION ONLY IF YOU KNOW WHAT YOU ARE DOING.
461
462       -d, --data-integrity-alg hash_alg
463           DRBD can ensure the data integrity of the user's data on the
464           network by comparing hash values. Normally this is ensured by the
465           16 bit checksums in the headers of TCP/IP packets. This option can
466           be set to any of the kernel's data digest algorithms. In a typical
467           kernel configuration you should have at least one of md5, sha1, and
468           crc32c available. By default this is not enabled.
469
470           See also the notes on data integrity on the drbd.conf manpage.
471
472       -o, --no-tcp-cork
473           DRBD usually uses the TCP socket option TCP_CORK to hint to the
474           network stack when it can expect more data, and when it should
475           flush out what it has in its send queue. There is at least one
476           network stack that performs worse when one uses this hinting
477           method. Therefore we introduced this option, which disable the
478           setting and clearing of the TCP_CORK socket option by DRBD.
479
480       -p, --ping-timeout ping_timeout
481           The time the peer has to answer to a keep-alive packet. In case the
482           peer's reply is not received within this time period, it is
483           considered dead. The default unit is tenths of a second, the
484           default value is 5 (for half a second).
485
486       -D, --discard-my-data
487           Use this option to manually recover from a split-brain situation.
488           In case you do not have any automatic after-split-brain policies
489           selected, the nodes refuse to connect. By passing this option you
490           make this node a sync target immediately after successful connect.
491
492       -n, --dry-run
493           Causes DRBD to abort the connection process after the resync
494           handshake, i.e. no resync gets performed. You can find out which
495           resync DRBD would perform by looking at the kernel's log file.
496
497       -g, --on-congestion congestion_policy, -f, --congestion-fill
498       fill_threshold, -h, --congestion-extents active_extents_threshold
499           By default DRBD blocks when the available TCP send queue becomes
500           full. That means it will slow down the application that generates
501           the write requests that cause DRBD to send more data down that TCP
502           connection.
503
504           When DRBD is deployed with DRBD-proxy it might be more desirable
505           that DRBD goes into AHEAD/BEHIND mode shortly before the send queue
506           becomes full. In AHEAD/BEHIND mode DRBD does no longer replicate
507           data, but still keeps the connection open.
508
509           The advantage of the AHEAD/BEHIND mode is that the application is
510           not slowed down, even if DRBD-proxy's buffer is not sufficient to
511           buffer all write requests. The downside is that the peer node falls
512           behind, and that a resync will be necessary to bring it back into
513           sync. During that resync the peer node will have an inconsistent
514           disk.
515
516           Available congestion_policys are block and pull-ahead. The default
517           is block.  Fill_threshold might be in the range of 0 to 10GiBytes.
518           The default is 0 which disables the check.
519           Active_extents_threshold has the same limits as al-extents.
520
521           The AHEAD/BEHIND mode and its settings are available since DRBD
522           8.3.10.
523
524   syncer
525       Changes the synchronization daemon parameters of device at runtime.
526
527       -r, --rate rate
528           To ensure smooth operation of the application on top of DRBD, it is
529           possible to limit the bandwidth that may be used by background
530           synchronization. The default is 250 KiB/sec, the default unit is
531           KiB/sec.
532
533       -a, --after minor
534           Start resync on this device only if the device with minor is
535           already in connected state. Otherwise this device waits in
536           SyncPause state.
537
538       -e, --al-extents extents
539           DRBD automatically performs hot area detection. With this parameter
540           you control how big the hot area (=active set) can get. Each extent
541           marks 4M of the backing storage. In case a primary node leaves the
542           cluster unexpectedly, the areas covered by the active set must be
543           resynced upon rejoining of the failed node. The data structure is
544           stored in the meta-data area, therefore each change of the active
545           set is a write operation to the meta-data device. A higher number
546           of extents gives longer resync times but less updates to the
547           meta-data. The default number of extents is 127. (Minimum: 7,
548           Maximum: 3843)
549
550       -v, --verify-alg hash-alg
551           During online verification (as initiated by the verify
552           sub-command), rather than doing a bit-wise comparison, DRBD applies
553           a hash function to the contents of every block being verified, and
554           compares that hash with the peer. This option defines the hash
555           algorithm being used for that purpose. It can be set to any of the
556           kernel's data digest algorithms. In a typical kernel configuration
557           you should have at least one of md5, sha1, and crc32c available. By
558           default this is not enabled; you must set this option explicitly in
559           order to be able to use on-line device verification.
560
561           See also the notes on data integrity on the drbd.conf manpage.
562
563       -c, --cpu-mask cpu-mask
564           Sets the cpu-affinity-mask for DRBD's kernel threads of this
565           device. The default value of cpu-mask is 0, which means that DRBD's
566           kernel threads should be spread over all CPUs of the machine. This
567           value must be given in hexadecimal notation. If it is too big it
568           will be truncated.
569
570       -C, --csums-alg hash-alg
571           A resync process sends all marked data blocks form the source to
572           the destination node, as long as no csums-alg is given. When one is
573           specified the resync process exchanges hash values of all marked
574           blocks first, and sends only those data blocks over, that have
575           different hash values.
576
577           This setting is useful for DRBD setups with low bandwidth links.
578           During the restart of a crashed primary node, all blocks covered by
579           the activity log are marked for resync. But a large part of those
580           will actually be still in sync, therefore using csums-alg will
581           lower the required bandwidth in exchange for CPU cycles.
582
583       -R, --use-rle
584           During resync-handshake, the dirty-bitmaps of the nodes are
585           exchanged and merged (using bit-or), so the nodes will have the
586           same understanding of which blocks are dirty. On large devices, the
587           fine grained dirty-bitmap can become large as well, and the bitmap
588           exchange can take quite some time on low-bandwidth links.
589
590           Because the bitmap typically contains compact areas where all bits
591           are unset (clean) or set (dirty), a simple run-length encoding
592           scheme can considerably reduce the network traffic necessary for
593           the bitmap exchange.
594
595           For backward compatibilty reasons, and because on fast links this
596           possibly does not improve transfer time but consumes cpu cycles,
597           this defaults to off.
598
599           Introduced in 8.3.2.
600
601       -p, --c-plan-ahead plan_time, -s, --c-fill-target fill_target, -d,
602       --c-delay-target delay_target, -M, --c-max-rate max_rate
603           The dynamic resync speed controller gets enabled with setting
604           plan_time to a positive value. It aims to fill the buffers along
605           the data path with either a constant amount of data fill_target, or
606           aims to have a constant delay time of delay_target along the path.
607           The controller has an upper bound of max_rate.
608
609           By plan_time the agility of the controller is configured. Higher
610           values yield for slower/lower responses of the controller to
611           deviation from the target value. It should be at least 5 times RTT.
612           For regular data paths a fill_target in the area of 4k to 100k is
613           appropriate. For a setup that contains drbd-proxy it is advisable
614           to use delay_target instead. Only when fill_target is set to 0 the
615           controller will use delay_target. 5 times RTT is a reasonable
616           starting value.  Max_rate should be set to the bandwidth available
617           between the DRBD-hosts and the machines hosting DRBD-proxy, or to
618           the available disk-bandwidth.
619
620           The default value of plan_time is 0, the default unit is 0.1
621           seconds.  Fill_target has 0 and sectors as default unit.
622           Delay_target has 1 (100ms) and 0.1 as default unit.  Max_rate has
623           10240 (100MiB/s) and KiB/s as default unit.
624
625       -m, --c-min-rate min_rate
626           We track the disk IO rate caused by the resync, so we can detect
627           non-resync IO on the lower level device. If the lower level device
628           seems to be busy, and the current resync rate is above min_rate, we
629           throttle the resync.
630
631           The default value of min_rate is 4M, the default unit is k. If you
632           want to not throttle at all, set it to zero, if you want to
633           throttle always, set it to one.
634
635       -n, --on-no-data-accessible ond-policy
636           This setting controls what happens to IO requests on a degraded,
637           disk less node (I.e. no data store is reachable). The available
638           policies are io-error and suspend-io.
639
640           If ond-policy is set to suspend-io you can either resume IO by
641           attaching/connecting the last lost data storage, or by the drbdadm
642           resume-io res command. The latter will result in IO errors of
643           course.
644
645           The default is io-error. This setting is available since DRBD
646           8.3.9.
647
648   primary
649       Sets the device into primary role. This means that applications (e.g. a
650       file system) may open the device for read and write access. Data
651       written to the device in primary role are mirrored to the device in
652       secondary role.
653
654       Normally it is not possible to set both devices of a connected DRBD
655       device pair to primary role. By using the --allow-two-primaries option,
656       you override this behavior and instruct DRBD to allow two primaries.
657
658       -o, --overwrite-data-of-peer
659           Alias for --force.
660
661       -f, --force
662           Becoming primary fails if the local replica is not up-to-date. I.e.
663           when it is inconsistent, outdated of consistent. By using this
664           option you can force it into primary role anyway. USE THIS OPTION
665           ONLY IF YOU KNOW WHAT YOU ARE DOING.
666
667   secondary
668       Brings the device into secondary role. This operation fails as long as
669       at least one application (or file system) has opened the device.
670
671       It is possible that both devices of a connected DRBD device pair are
672       secondary.
673
674   verify
675       This initiates on-line device verification. During on-line
676       verification, the contents of every block on the local node are
677       compared to those on the peer node. Device verification progress can be
678       monitored via /proc/drbd. Any blocks whose content differs from that of
679       the corresponding block on the peer node will be marked out-of-sync in
680       DRBD's on-disk bitmap; they are not brought back in sync automatically.
681       To do that, simply disconnect and reconnect the resource.
682
683       If on-line verification is already in progress (and this node is
684       "VerifyS"), this command silently "succeeds". In this case, any
685       start-sector (see below) will be ignored, and any stop-sector (see
686       below) will be honored. This can be used to stop a running verify, or
687       to update/shorten/extend the coverage of the currently running verify.
688
689       This command will fail if the device is not part of a connected device
690       pair.
691
692       See also the notes on data integrity on the drbd.conf manpage.
693
694       -s, --start start-sector
695           Since version 8.3.2, on-line verification should resume from the
696           last position after connection loss. It may also be started from an
697           arbitrary position by setting this option. If you had reached some
698           stop-sector before, and you do not specify an explicit
699           start-sector, verify should resume from the previous stop-sector.
700
701           Default unit is sectors. You may also specify a unit explicitly.
702           The start-sector will be rounded down to a multiple of 8 sectors
703           (4kB).
704
705       -S, --stop stop-sector
706           Since version 8.3.14, on-line verification can be stopped before it
707           reaches end-of-device. This can be
708
709           Default unit is sectors. You may also specify a unit explicitly.
710           The stop-sector may be updated by issuing an additional drbdsetup
711           verify command on the same node while the verify is running.
712
713   invalidate
714       This forces the local device of a pair of connected DRBD devices into
715       SyncTarget state, which means that all data blocks of the device are
716       copied over from the peer.
717
718       This command will fail if the device is not either part of a connected
719       device pair, or disconnected Secondary.
720
721   invalidate-remote
722       This forces the local device of a pair of connected DRBD devices into
723       SyncSource state, which means that all data blocks of the device are
724       copied to the peer.
725
726       On a disconnected Primary device, this will set all bits in the out of
727       sync bitmap. As a side affect this suspends updates to the on disk
728       activity log. Updates to the on disk activity log resume automatically
729       when necessary.
730
731   wait-connect
732       Returns as soon as the device can communicate with its partner device.
733
734       -t, --wfc-timeout wfc_timeout, -d, --degr-wfc-timeout degr_wfc_timeout,
735       -o, --outdated-wfc-timeout outdated_wfc_timeout, -w, --wait-after-sb
736           This command will fail if the device cannot communicate with its
737           partner for timeout seconds. If the peer was working before this
738           node was rebooted, the wfc_timeout is used. If the peer was already
739           down before this node was rebooted, the degr_wfc_timeout is used.
740           If the peer was sucessfully outdated before this node was rebooted
741           the outdated_wfc_timeout is used. The default value for all those
742           timeout values is 0 which means to wait forever. In case the
743           connection status goes down to StandAlone because the peer appeared
744           but the devices had a split brain situation, the default for the
745           command is to terminate. You can change this behavior with the
746           --wait-after-sb option.
747
748   wait-sync
749       Returns as soon as the device leaves any synchronization into connected
750       state. The options are the same as with the wait-connect command.
751
752   disconnect
753       Removes the information set by the net command from the device. This
754       means that the device goes into unconnected state and will no longer
755       listen for incoming connections.
756
757   detach
758       Removes the information set by the disk command from the device. This
759       means that the device is detached from its backing storage device.
760
761       -f, --force
762           A regular detach returns after the disk state finally reached
763           diskless. As a consequence detaching from a frozen backing block
764           device never terminates.
765
766           On the other hand A forced detach returns immediately. It allows
767           you to detach DRBD from a frozen backing block device. Please note
768           that the disk will be marked as failed until all pending IO
769           requests where finished by the backing block device.
770
771   down
772       Removes all configuration information from the device and forces it
773       back to unconfigured state.
774
775   role
776       Shows the current roles of the device and its peer, as local/peer.
777
778   state
779       Deprecated alias for "role"
780
781   cstate
782       Shows the current connection state of the device.
783
784   dstate
785       Shows the current states of the backing storage devices, as local/peer.
786
787   status
788       Shows the current status of the device in XML-like format. Example
789       output:
790
791           <resource minor="0" name="s0" cs="SyncTarget" st1="Secondary" st2="Secondary"
792                    ds1="Inconsistent" ds2="UpToDate" resynced_precent="5.9" />
793
794
795   resize
796       This causes DRBD to reexamine the size of the device's backing storage
797       device. To actually do online growing you need to extend the backing
798       storages on both devices and call the resize command on one of your
799       nodes.
800
801       The --assume-peer-has-space allows you to resize a device which is
802       currently not connected to the peer. Use with care, since if you do not
803       resize the peer's disk as well, further connect attempts of the two
804       will fail.
805
806       When the --assume-clean option is given DRBD will skip the resync of
807       the new storage. Only do this if you know that the new storage was
808       initialized to the same content by other means.
809
810   check-resize
811       To enable DRBD to detect offline resizing of backing devices this
812       command may be used to record the current size of backing devices. The
813       size is stored in files in /var/lib/drbd/ named drbd-minor-??.lkbd
814
815       This command is called by drbdadm resize res after drbdsetup device
816       resize returned.
817
818   pause-sync
819       Temporarily suspend an ongoing resynchronization by setting the local
820       pause flag. Resync only progresses if neither the local nor the remote
821       pause flag is set. It might be desirable to postpone DRBD's
822       resynchronization after eventual resynchronization of the backing
823       storage's RAID setup.
824
825   resume-sync
826       Unset the local sync pause flag.
827
828   outdate
829       Mark the data on the local backing storage as outdated. An outdated
830       device refuses to become primary. This is used in conjunction with
831       fencing and by the peer's fence-peer handler.
832
833   show-gi
834       Displays the device's data generation identifiers verbosely.
835
836   get-gi
837       Displays the device's data generation identifiers.
838
839   show
840       Shows all available configuration information of the device.
841
842   suspend-io
843       This command is of no apparent use and just provided for the sake of
844       completeness.
845
846   resume-io
847       If the fence-peer handler fails to stonith the peer node, and your
848       fencing policy is set to resource-and-stonith, you can unfreeze IO
849       operations with this command.
850
851   events
852       Displays every state change of DRBD and all calls to helper programs.
853       This might be used to get notified of DRBD's state changes by piping
854       the output to another program.
855
856       -a, --all-devices
857           Display the events of all DRBD minors.
858
859       -u, --unfiltered
860           This is a debugging aid that displays the content of all received
861           netlink messages.
862
863   new-current-uuid
864       Generates a new current UUID and rotates all other UUID values. This
865       has at least two use cases, namely to skip the initial sync, and to
866       reduce network bandwidth when starting in a single node configuration
867       and then later (re-)integrating a remote site.
868
869       Available option:
870
871       -c, --clear-bitmap
872           Clears the sync bitmap in addition to generating a new current
873           UUID.
874
875       This can be used to skip the initial sync, if you want to start from
876       scratch. This use-case does only work on "Just Created" meta data.
877       Necessary steps:
878
879        1. On both nodes, initialize meta data and configure the device.
880
881           drbdadm -- --force create-md res
882
883        2. They need to do the initial handshake, so they know their sizes.
884
885           drbdadm up res
886
887        3. They are now Connected Secondary/Secondary
888           Inconsistent/Inconsistent. Generate a new current-uuid and clear
889           the dirty bitmap.
890
891           drbdadm -- --clear-bitmap new-current-uuid res
892
893        4. They are now Connected Secondary/Secondary UpToDate/UpToDate. Make
894           one side primary and create a file system.
895
896           drbdadm primary res
897
898           mkfs -t fs-type $(drbdadm sh-dev res)
899
900       One obvious side-effect is that the replica is full of old garbage
901       (unless you made them identical using other means), so any
902       online-verify is expected to find any number of out-of-sync blocks.
903
904       You must not use this on pre-existing data!  Even though it may appear
905       to work at first glance, once you switch to the other node, your data
906       is toast, as it never got replicated. So do not leave out the mkfs (or
907       equivalent).
908
909       This can also be used to shorten the initial resync of a cluster where
910       the second node is added after the first node is gone into production,
911       by means of disk shipping. This use-case works on disconnected devices
912       only, the device may be in primary or secondary role.
913
914       The necessary steps on the current active server are:
915
916        1. drbdsetup device new-current-uuid --clear-bitmap
917
918        2. Take the copy of the current active server. E.g. by pulling a disk
919           out of the RAID1 controller, or by copying with dd. You need to
920           copy the actual data, and the meta data.
921
922        3. drbdsetup device new-current-uuid
923
924       Now add the disk to the new secondary node, and join it to the cluster.
925       You will get a resync of that parts that were changed since the first
926       call to drbdsetup in step 1.
927

EXAMPLES

929       For examples, please have a look at the DRBD User's Guide[1].
930

VERSION

932       This document was revised for version 8.3.2 of the DRBD distribution.
933

AUTHOR

935       Written by Philipp Reisner <philipp.reisner@linbit.com> and Lars
936       Ellenberg <lars.ellenberg@linbit.com>
937

REPORTING BUGS

939       Report bugs to <drbd-user@lists.linbit.com>.
940
942       Copyright 2001-2008 LINBIT Information Technologies, Philipp Reisner,
943       Lars Ellenberg. This is free software; see the source for copying
944       conditions. There is NO warranty; not even for MERCHANTABILITY or
945       FITNESS FOR A PARTICULAR PURPOSE.
946

SEE ALSO

948       drbd.conf(5), drbd(8), drbddisk(8), drbdadm(8), DRBD User's Guide[1],
949       DRBD web site[2]
950

NOTES

952        1. DRBD User's Guide
953           http://www.drbd.org/users-guide/
954
955        2. DRBD web site
956           http://www.drbd.org/
957
958
959
960DRBD 8.3.2                        5 Dec 2008                      DRBDSETUP(8)
Impressum