Provided by:
drbd0.7-utils_0.7.25-1.1_i386 
NAME
drbd.conf - Configuration file for DRBD’s devices
INTRODUCTION
The file /etc/drbd.conf is read by /etc/init.d/drbd and
/etc/ha.d/resource.d/drbddisk which are included in the DRBD
distribution.
The file format was designed as to allow to have a verbatim copy of the
file on both nodes of the cluster. It is highly recommended to do so
in order to keep your configuration manageable. The file /etc/drbd.conf
should be the same on both nodes of the cluster. Changes to
/etc/drbd.conf do not apply immediately.
A SMALL DRBD.CONF FILE
resource drbd0 {
protocol C;
incon-degr-cmd "halt -f";
on thost1 {
device /dev/drbd1;
disk /dev/hda7;
address 10.1.1.31:7789;
meta-disk internal;
}
on thost2 {
device /dev/drbd1;
disk /dev/hda7;
address 10.1.1.32:7789;
meta-disk internal;
}
}
In this example there is a single DRBD resource (called drbd0) which
uses protocol C for the connection between its devices. The device
which runs on host thost1 uses /dev/drbd1 as devices for its
application, and /dev/hda7 as low level storage for the data. The IP
addresses are used to specify the networking interfaces to use.
There may be multiple resource sections in a single drbd.conf file.
For more examples please have a look at the DRBD Quickstart Guide
<URL:http://www.linux-ha.org/DRBD/QuickStart07>.
FILE FORMAT
The file consists of sections and parameters. A section begins with a
keyword, sometimes an additional name, and an opening brace (‘‘{’’). A
section ends with a closing brace (‘‘}’’. The braces enclose the
parameters.
section [name] { parameter value; [...] }
A parameter starts with the identifier of the parameter followed by
whitespace. Every subsequent character is considered as part of the
parameters value. A special case are Boolean parameters which only
consist of the identifier. Parameters are terminated by a semicolon
(‘‘;’’).
Some parameter values have default units which might be overruled by K,
M or G. These units are defined in the usual way (K = 2^10 = 1024, M =
1024 K, G = 1024 M).
Comments may be placed into the configuration file and must begin with
a hash sign (‘‘#’’). Subsequent characters are ignored until the end of
the line.
SECTIONS
skip Comments out chunks of text, even spanning more than one line.
Characters between the keyword skip and the opening brace
(‘‘{’’)are ignored. Everything enclosed by the braces is
skipped. This comes in handy, if you just want to comment out
some ’resource [name] {...}’ section: just precede it with
’skip’.
global Configures some global parameters. Currently only minor-count,
dialog-refresh and disable-ip-verification are allowed here. You
may only have one global section, preferably as the first
section.
resource name
Configures a DRBD resource. Each resource section needs to have
two on host sections and may have a startup, a syncer, a net and
a disk section. Required parameter in this section: protocol.
Optional parameter: incon-degr-cmd.
on host-name
Carries the necessary configuration parameters for a DRBD device
of the enclosing resource. host-name is mandatory and must
match the linux hostname (uname -n) of one of the nodes.
Required parameters in this section: device, disk, address,
meta-disk.
disk This section is used to fine tune DRBD’s properties in respect
to the low level storage. Please refer to drbdsetup(8) for
detailed description of the parameters. Optional parameter: on-
io-error, size.
net This section is used to fine tune DRBD’s properties. Please
refer to drbdsetup(8) for detailed description of this section’s
parameters. Optional parameters: sndbuf-size, timeout, connect-
int, ping-int, max-buffers, max-epoch-size, unplug-watermark,
ko-count, on-disconnect.
startup
This section is used to fine tune DRBD’s properties. Please
refer to drbdsetup(8) for detailed description of this section’s
parameters. Optional parameters: wfc-timeout, degr-wfc-timeout.
syncer This section is used to fine tune the synchronisation daemon for
the device. Please refer to drbdsetup(8) for detailed
description of this section’s parameters. Optional parameters:
rate, group, al-extents.
PARAMETERS
minor-count count
count may be a number from 1 to 255.
Use minor-count if you want to define more resources later
without reloading the DRBD kernel module. Per default the module
loads with exactly as many devices as configured in this file.
Built-in default for module is 2, and 8 for monolithic kernel.
For monolithic kernel minor-count is ignored, and you have to
pass a kernel boot parameter drbd.minor_count=count to change
the default.
dialog-refresh time
time may be 0 or a positive number.
The user dialog redraws the second count every time seconds (or
does no redraws if time is zero). The default is 1.
disable-ip-verification
Use disable-ip-verification if, for some obscure reasons,
drbdadm can/might not use ip or ifconfig to do a sanity check
for the IP address, you can disable it with this this option.
protocol prot-id
On the TCP/IP link the specified protocol is used. Valid
protocol specifiers are A, B, and C.
Protocol A: write IO is reported as completed, if it has reached
local disk and local TCP send buffer.
Protocol B: write IO is reported as completed, if it has reached
local disk and remote buffer cache.
Protocol C: write IO is reported as completed, if it has reached
both local and remote disk.
incon-degr-cmd command
In case a node starts up in degraded mode (degr-wfc-timeout is
set) and its local replica of the data is inconsistent it
executes the command. If the command exits without error,
drbddisk expects the DRBD device to be in primary state.
device name
The name of the block device node of the resource being
described. You must use this device with your application (file
system) and you must not use the low level block device which is
specified with the disk parameter.
The device nodes must have the same major number as the DRBD
driver has. With the current implementation major 147 is used
and the corresponding device nodes are usually named /dev/drbd0,
/dev/drbd1, etc. ( All releases before drbd-0.7.1 used major 43
and the device files /dev/nb*. )
Installation scripts of the DRBD package provide, that
/dev/drbd0 to /dev/drbd8 are predefined in your system. To be
sure, issue something like ls /dev/drbd*.
disk name
DRBD uses this block device to actually store and retrieve the
data. Never access such a device while DRBD is running on top
of it. This holds also true for dumpe2fs(8) and similar
commands.
address IP:port
A resource needs one IP address per device, which is used to
wait for incoming connections from the partner device
respectively to reach the partner device.
Each DRBD resource needs a TCP port which is used to connect to
the node’s partner device. Two different DRBD resources may not
use the same IP:port combination on the same node.
meta-disk internal
meta-disk device [index]
internal means, that the last 128 MB of the lower device are
used to store the meta-data. You must not use [index] with
internal.
You can use a single block device to store meta-data of multiple
DRBD devices. E.g. use meta-disk /dev/hde6[0]; and meta-disk
/dev/hde6[1]; for two different resources. In this case the
meta-disk would need to be at least 256 MB in size.
on-io-error handler
handler is taken, if the lower level device reports io-error to
the upper layers.
handler may be pass_on, panic, or detach.
pass_on: Report the io-error to the upper layers. On Primary
report it to the mounted file system. On Secondary ignore it.
panic: The node leaves the cluster by doing a kernel panic.
detach: The node drops its low level device, and continues in
disk less mode.
sndbuf-size size
size is size of the TCP socket send buffer. Default is 128K.
You can specify smaller or larger values. Larger values are
appropriate for reasonable write throughput with protocol A over
high latency networks. Very large values like 1M may cause
problems. Even values below 32K do not make much sense.
timeout time
If the partner node fails to send an expected response packet
within time 10ths of a second, the partner node is considered
dead and therefore the TCP/IP connection is abandoned. This must
be lower than connect-int and ping-int. The default value is 60
= 6 seconds, the unit 0.1 seconds.
connect-int time
In case it is not possible to connect to the remote DRBD device
immediately, DRBD keeps on trying to connect. With this option
you can set the time between two tries. The default value is 10
seconds, the unit is 1 second.
ping-int time
If the TCP/IP connection linking a DRBD device pair is idle for
more than time seconds, DRBD will generate a keep-alive packet
to check if its partner is still alive. The default is 10
seconds, the unit is 1 second.
max-buffers number
Maximal number of requests to be allocated by DRBD. Unit is
PAGE_SIZE, which is 4 KB on most systems. The minimum is
hardcoded to 32 (=128 KB). For high performance installations
it might help, if you increase that number. These buffers are
used to hold datablocks while they are written to disk.
max-epoch-size number
The highest number of data blocks between two write barriers.
If you set this smaller than 10 you might decrease your
performance.
unplug-watermark number
When the number of pending write requests on the standby
(secondary) node exceeds the unplug-watermark, we trigger the
request processing of our backing storage device. Some storage
controllers deliver better performance with small values, other
deliver best performance when it is set to the same value as
max-buffers. Minimum 16, default 128, maximum 131072.
ko-count count
In case the secondary node fails to complete a single write
request for count times the timeout, it is expelled from the
cluster. (I.e. the primary node goes into StandAlone mode.)
The default is 0, which disables this feature.
on-disconnect handler
When the connection to the peer is lost, DRBD can either go into
standd alone mode, try to reconnect to the peer, or try to
reconnect and freeze application IO while not not connected.
Valid handler specifiers are stand_alone, reconnect and
freeze_io. The default handler is reconnect.
stand_alone: Do not reconnect, go into StandAlone state.
reconnect: Try to reconnect.
wfc-timeout time
Wait for connection timeout. The init script drbd(8) blocks the
boot process until the DRBD resources are connected. This is so
when the cluster manager starts later, it does not see a
resource with internal split-brain. In case you want to limit
the wait time, do it here. Default is 0, which means unlimited.
Unit is seconds.
degr-wfc-timeout time
Wait for connection timeout, if this node was a degraded
cluster. In case a degraded cluster (= cluster with only one
node left) is rebooted, this timeout value is used instead of
wfc-timeout, because the peer is less likely to show up in time,
if it had been dead before. Default is 60, unit is seconds.
Value 0 means unlimited.
rate rate
To ensure smooth operation of the application on top of DRBD, it
is possible to limit the bandwidth which may be used by
background synchronizations. The default is 250 KB/sec, the
default unit is KB/sec. Optional suffixes K, M are allowed.
Note that this is byte (octet) per second, not bit. We are
storage guys.
group number
Resynchronization of all devices in one group runs parallel.
Groups are serialized in ascending order. You should avoid, that
devices which lower devices share one and the same physical disk
sync in parallel. The default group is 0. I.e. per default all
devices sync parallel. Negative and positive numbers are
allowed.
al-extents extents
DRBD automatically performs hot area detection. With this
parameter you control how big the hot area (=active set) can
get. Each extent marks 4M of the backing storage (=low level
device). In case a primary node leaves the cluster unexpectedly
the areas covered by the active set must be resynced upon rejoin
of the failed node. The data structure is stored in the meta-
data area, therefore each change of the active set is a write
operation to the meta-data device. A higher number of extents
gives longer resync times but less updates to the meta-data. The
default number of extents is 127. (Minimum: 7, Maximum: 3833)
UPGRADE FROM DRBD VERSION 0.6.X
...
VERSION
This document is correct for version 0.7.20 of the DRBD distribution.
AUTHOR
Written by Philipp Reisner <philipp.reisner@linbit.com>. Man pages
were reviewed and rewritten by Helmut Wollmersdorfer
<helmut.wollmersdorfer@linbit.com>.
REPORTING BUGS
Report bugs to <drbd-user@lists.linbit.com>.
COPYRIGHT
Copyright (c) 2001-2006 Philipp Reisner. This is free software; see
the source for copying conditions. There is NO warranty; not even for
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
SEE ALSO
drbd(8), drbddisk(8), drbdsetup(8) drbdadm(8) DRBD Homepage
<URL:http://www.drbd.org/>
10 October 2007 DRBD.CONF(5)