Getting Information About DRBD Options
Different ways to get information such as default values, units of measurement, and accepted value ranges, for DRBD® configuration file options
If you are using DRBD**®** 9, you can use the man drbd.conf-9.0
command to get detailed information about options that you can use
within DRBD configuration files.
An example entry from the manual page for the ping interval option is:
ping-int interval
When the TCP/IP connection to a peer is idle for more than
ping-int seconds, DRBD will send a keep-alive packet to make
sure that a failed peer or network connection is detected
reasonably soon. The default value is 10 seconds, with a
minimum of 1 and a maximum of 120 seconds. The unit is seconds.
Another way that you can get information, such as default values, value
ranges, and units of
measurement, for DRBD options, is by using the drbdsetup
command.
The drbdsetup xml-help
command is used to generate output for manual
pages. You can use it as an alternative way to see information about
DRBD options, in XML format. This can be useful if you want to quickly
get default values, units of measurement, and value ranges, for DRBD
options, without having to examine surrounding text in the manual page.
However, this way will not show you the context for using DRBD options
that the manual page might show.
The xml-help
command is available for the following types of DRBD
configuration file options:
# drbdsetup xml-help resource-options
# drbdsetup xml-help peer-device-options
# drbdsetup xml-help net-options
# drbdsetup xml-help disk-options
For example:
# drbdsetup xml-help net-options
[...]
<option name=ping-int type=numeric>
<min>1</min>
<max>120</max>
<default>10</default>
<unit_prefix>1</unit_prefix>
<unit>seconds</unit>
</option>
[...]
If you have already configured a DRBD resource, either manually or by
using LINSTOR®, you can get the resource’s DRBD options values by
using the drbdsetup show ~-~-show-defaults
command. You can run the
command and add a configured DRBD resource’s name as an argument to show
the resource’s running configuration, including DRBD options and their
default values (if the options were not specified in the DRBD
configuration file itself). If you enter the command without specifying
a DRBD resource, then the command will show configuration files for
all configured DRBD resources on the node.
This command is useful to learn which DRBD options are implicitly
configured along with their default values. The command output will also
show in which section of the DRBD configuration file options occur:
options (global*)*, disk, or net. Unlike the other ways of getting
DRBD options information mentioned in this article, the drbdsetup show ~-~-show-defaults
will not show the range of acceptable values for the
DRBD options.
For example:
# drbdsetup show --show-defaults testres
resource testres {
options {
cpu-mask ; # default
on-no-data-accessible io-error; # default
auto-promote yes; # default
peer-ack-window 4096s; # bytes, default
peer-ack-delay 100; # milliseconds, default
twopc-timeout 300; # 1/10 seconds, default
twopc-retry-timeout 1; # 1/10 seconds, default
auto-promote-timeout 20; # 1/10 seconds, default
max-io-depth 8000; # default
quorum majority;
on-no-quorum io-error;
quorum-minimum-redundancy off; # default
on-suspended-primary-outdated disconnect; # default
}
_this_host {
node-id 0;
volume 0 {
device minor 1000;
disk /dev/drbdpool/testres_00000;
meta-disk internal;
disk {
size 0s; # bytes, default
on-io-error detach; # default
disk-barrier no; # default
disk-flushes yes; # default
disk-drain yes; # default
md-flushes yes; # default
[...]
}
[...]
}
If you are using LINSTOR, you can use the output from the linstor <LINSTOR_object> drbd-options ~-~-help
(or drbd-peer-options ~-~-help
) command to get information about DRBD options.
For example:
# linstor resource-definition drbd-options --help
[...]
--ping-int PING_INT Range: [1, 120]; Default: 10; Unit: seconds
[...]
TIP: The command
linstor <LINSTOR_object> opt ~-~-help
shows the same output aslinstor <LINSTOR_object> drbd-options ~-~-help
, if you are interested in saving some keystrokes.
For the LINSTOR ~-~-help
and the drbdsetup
commands, it is useful to
pipe the output through the less
command. You can then use the forward
slash key (/
) to search for keywords to find the DRBD option that you
are interested in.
Created by MAT, 2023-03-13
Reviewed by DJV 2023-03-14