DRBDADM(8)
π DRBDADM π β the drbdadm(8) page, bestie edition
okay so welcome to drbdadm, section 8 of the manual, filed under System Administration. yes it's a whole vibe, yes it's important, let's get into it π«Ά
β¨ NAME β¨
drbdadm β the utility for DRBD administration, aka your new bestie for wrangling DRBD π
πΈ SYNOPSIS πΈ
drbdadm [options...] [-- [backend-options...]] {command} {context...}
π¦ DESCRIPTION π¦
so drbdadm is the utility you use to manage DRBD based on its config files (peep drbd.conf(5) for those). what it actually does is translate high-level commands into one or more lower-level commands for the drbdsetup and drbdmeta utilities β and those two are the ones actually controlling the kernel module and manipulating the on-disk metadata. so drbdadm is like the group chat admin, and drbdsetup/drbdmeta are the ones doing the work. team effort, no cap π
depending on which command you run, drbdadm operates on one or more resources, devices, connections, or peer devices. here are the command contexts that are defined:
- resource β a resource specified by name, or the keyword
allfor all defined resources. - device β a device, specified by minor number (
minor-minornumber, e.g.minor-0) or by resource and volume number (resource/volume). if you only specify a resource, the command iterates over all devices of that resource. β¨ - connection β a connection, specified by resource and connection name (
resource:connection-name). if you only specify a resource, the command iterates over all connections of that resource. - peer_device β a peer device, specified by resource, connection name, and volume number (
resource:connection-name/volume). if you only specify a resource, device, or connection, the command iterates over all peer devices of that resource, device, or connection.
and here's the lil trick you need to know: every option that comes after a double-dash gets passed straight through to the lower-level utilities, exactly as specified. plus, drbdadm understands most of the options of drbdsetup too, and will pass those through even without the double-dash. iykyk π
π OPTIONS π
-d,--dry-runβ show which commandsdrbdadmwould execute instead of actually executing them (for example,drbdadm -d up resource). this is literally such a useful way to learn howdrbdsetupanddrbdmetaare used. peak study method fr fr π-c,--config-filefile β use an alternative configuration file. by default,drbdadmwill use the first of the following files that exists:/etc/drbd-90.conf,/etc/drbd-84.conf,/etc/drbd-83.conf,/etc/drbd-82.conf,/etc/drbd-08.conf,/etc/drbd.conf.-t,--config-to-testfile β check an additional configuration file. heads up bestie, this option is only allowed with thedumpand thesh-nopcommands.-s,--drbdsetupfile β specifies the full path to thedrbdsetupprogram. if you omit this option,drbdadmwill look for it beneath itself first, and then in thePATH.-m,--drbdmetafile β specifies the full path to thedrbdmetaprogram. if you omit this option,drbdadmwill look for it beneath itself first, and then in thePATH.-S,--stackedβ perform the command on a stacked resource. π
π₯ COMMANDS π₯
okay this is the big one, buckle up. every single one, in order, no skips π
adjust {resource}
adjust the configuration of the kernel module so that it matches the configuration files. the result should be the same as stopping and restarting all resources (drbdadm down all followed by drbdadm up all), but without the interruptions. slay.
β οΈ but note that theadjustcommand can misinterpret the configuration change in some cases. to be safe, check what the command would do (with the--dry-runoption) before running the actual command. pls pls pls do this, bestie π
adjust-with-progress {resource}
the same as adjust, but with some more information about the command's progress. same vibe, more updates π
apply-al {device}
apply the activity log of the specified device. see drbdmeta(8) for details.
repair-md {device}
check and repair metadata of the specified device. see drbdmeta(8) for details.
attach {device}
attach a lower-level device to an existing replicated device. see drbdsetup(8) for details.
check-resize {device}
call drbdmeta to eventually move internal meta data. if the backing device was resized while DRBD was not running, meta data has to be moved to the end of the device, so that the next attach command can succeed. β¨
connect {connection}
activate an existing connection to a peer. the connection needs to be created first with the new-peer command, and have at least one path created with the new-path command. see drbdsetup(8) for details.
create-md {device}
initialize the metadata of a device. this is necessary before a device can be attached; see drbdmeta(8) for details.
cstate {connection}
show the current state of a connection. see drbdsetup(8) for details.
detach {device}
detach the lower-level device of a replicated device. see drbdsetup(8) for details.
disconnect {connection}
remove a connection to a peer host. see drbdsetup(8) for details.
disk-options {device}
change the disk options of an attached lower-level device. see drbdsetup(8) for details.
down {resource}
take a resource down by removing all volumes, connections, and the resource itself. see drbdsetup(8) for details.
dstate {device}
show the current disk state of a lower-level device. see drbdsetup(8) for details.
dump {resource}
parse the configuration file and dump it to stdout. this will fail if the configuration file is syntactically incorrect. π«Ά
dump-md {device}
dump the metadata of a device in text form, including the bitmap and activity log. see drbdmeta(8) for details.
get-gi {peer_device}
show the data generation identifiers for a device on a particular connection. uses drbdsetup for attached devices and drbdmeta for unattached devices. see drbdsetup(8) for details.
hidden-commands
shows all commands which are not explicitly documented. π secret menu energy.
invalidate {peer_device}
replace the local data of a device with that of a peer. see drbdsetup(8) for details.
invalidate-remote {peer_device}
replace a peer device's data of a resource with the local data. see drbdsetup(8) for details.
net-options {connection}
change the network options of an existing connection. see drbdsetup(8) for details.
new-current-uuid {device}
generate a new current UUID. see drbdsetup(8) for details.
outdate {device}
mark the data on a lower-level device as outdated. see drbdsetup(8) for details.
pause-sync {peer_device}
stop resynchronizing between a local and a peer device by setting the local pause flag. see drbdsetup(8) for details.
primary {resource}
change the role of a node in a resource to primary. see drbdsetup(8) for details.
resize {device}
resize the lower-level devices of a replicated device on all nodes. this combines the check-resize and resize lower-level commands; see drbdsetup(8) for details.
resource-options {resource}
change the resource options of an existing resource. see drbdsetup(8) for details.
resume-sync {peer_device}
allow resynchronization to resume by clearing the local sync pause flag. see drbdsetup(8) for details.
role {[resource] | [connection]}
show the current role of a resource, or the role of a resource on a peer.
secondary {resource}
change the role of a node in a resource to secondary. this command fails if the replicated device is in use. not a drill bestie π
show-gi {peer_device}
show the data generation identifiers for a device on a particular connection. in addition, explain the output. see drbdsetup(8) for details.
state {resource}
this is an alias for drbdsetup role. Deprecated. π₯ she's retired.
up {resource}
bring up a resource by applying the activity log of all volumes, creating the resource, creating the replicated devices, attaching the lower-level devices, and connecting to all peers. see the apply-al drbdmeta command and the new-resource, new-device, new-minor, attach, and connect drbdsetup commands.
verify {peer_device}
start online verification, change which part of the device will be verified, or stop online verification. see drbdsetup(8) for details.
wait-connect {[device] | [connection] | [resource]}
wait until a device on a peer, all devices over a connection, or all devices on all peers are visible. see drbdsetup(8) for details.
wait-sync {[device] | [connection] | [resource]}
wait until a device is connected and has finished eventual resync operation. also available on connection and resource level. see drbdsetup(8) for details.
wipe-md {device}
wipe out the DRBD metadata of a device. see drbdmeta(8) for details.
forget-peer {connection}
completely remove any reference to an unconnected peer from meta-data. see drbdmeta(8) for details.
β VERSION β
this document was revised for version 9.0.0 of the DRBD distribution.
π AUTHOR π
written by Philipp Reisner <philipp.reisner@linbit.com> and Lars Ellenberg <lars.ellenberg@linbit.com>. legends, honestly π
π REPORTING BUGS π
report bugs to <drbd-user@lists.linbit.com>. found a gremlin? tell the group chat.
π COPYRIGHT π
copyright 2001-2018 LINBIT Information Technologies, Philipp Reisner, Lars Ellenberg. this is free software; see the source for copying conditions. there is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. yeah fr, no warranty bestie, read the fine print π
π SEE ALSO π
drbd.conf(5), drbd(8), drbdsetup(8), drbdmeta(8) and the DRBD project web site[1]
π§ NOTES π§
- DRBD project web site β
http://www.drbd.org/
and that's the whole page, bestie π this one shipped as part of DRBD 9.0.x and was dated 17 January 2018. go forth and drbdadm responsibly, mwah π
β¨
π¦ where this page comes from
- alpine 3.23: drbd-utils-doc 9.33.0-r0 Β· GPL-2.0-or-later
- alpine 3.24: drbd-utils-doc 9.34.0-r0 Β· GPL-2.0-or-later
- fedora 43: drbd-utils 9.32.0-1.fc43 Β· GPL-2.0-or-later
- fedora 43: drbd-utils 9.34.0-2.fc43 Β· GPL-2.0-or-later
- fedora 44: drbd-utils 9.34.0-1.fc44 Β· GPL-2.0-or-later
- fedora 44: drbd-utils 9.34.0-2.fc44 Β· GPL-2.0-or-later
- nixos 26.05: drbd 9.33.0
- nixpkgs unstable: drbd 9.34.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms