This section highlights changes to the configuration syntax. It
affects the DRBD configuration files in /etc/drbd.d, and
/etc/drbd.conf.
![]() | Important |
|---|---|
The |
drbd.conf supports a variety of boolean configuration options. In
pre DRBD 8.4 syntax, these boolean options would be set as follows:
Pre-DRBD 8.4 configuration example with boolean options.
resource test {
disk {
no-md-flushes;
}
}
This led to configuration issues if you wanted to set a boolean
variable in the common configuration section, and then override it
for individual resources:
Pre-DRBD 8.4 configuration example with boolean options in common section.
common {
no-md-flushes;
}
resource test {
disk {
# No facility to enable disk flushes previously disabled in
# "common"
}
}
In DRBD 8.4, all boolean options take a value of yes or no, making
them easily configurable both from common and from individual
resource sections:
DRBD 8.4 configuration example with boolean options in common section.
common {
md-flushes no;
}
resource test {
disk {
md-flushes yes;
}
}
Prior to DRBD 8.4, the configuration syntax allowed for a syncer
section which has become obsolete in 8.4. All previously existing
syncer options have now moved into the net or disk sections of
resources.
Pre-DRBD 8.4 configuration example with syncer section.
resource test {
syncer {
al-extents 3389;
verify-alg md5;
}
...
}
The above example is expressed, in DRBD 8.4 syntax, as follows:
DRBD 8.4 configuration example with syncer section replaced.
resource test {
disk {
al-extents 3389;
}
net {
verify-alg md5;
}
...
}
In prior DRBD releases, the protocol option was awkwardly (and
counter-intuitively) required to be specified on its own, rather than
as part of the net section. DRBD 8.4 removes this anomaly:
Pre-DRBD 8.4 configuration example with standalone protocol option.
resource test {
protocol C;
...
net {
...
}
...
}
The equivalent DRBD 8.4 configuration syntax is:
DRBD 8.4 configuration example with protocol option within net section.
resource test {
net {
protocol C;
...
}
...
}
DRBD 8.4 introduces a new options section that may be specified
either in a resource or in the common section. The cpu-mask
option has moved into this section from the syncer section in which
it was awkwardly configured before. The on-no-data-accessible option
has also moved to this section, rather than being in disk where
it had been in pre-8.4 releases.
Pre-DRBD 8.4 configuration example with cpu-mask and on-no-data-accessible.
resource test {
syncer {
cpu-mask ff;
}
disk {
on-no-data-accessible suspend-io;
}
...
}
The equivalent DRBD 8.4 configuration syntax is:
Pre-DRBD 8.4 configuration example with options section.
resource test {
options {
cpu-mask ff;
on-no-data-accessible suspend-io;
}
...
}