DRBDADM(8)
π NAME π
drbdadm β the administration tool for DRBD. she's the boss, she runs the whole situation. periodt. π
β¨ SYNOPSIS β¨
drbdadm [-d] [-c {file}] [-t {file}] [-s {cmd}] [-m {cmd}] [-S]
[-h {host}] [-- {backend-options}] {command} [{all} |
{resource[/volume>]...}]
π¦ DESCRIPTION π¦
okay so listen bestie. drbdadm is the high level tool of the DRBD program suite. think of it this way: drbdadm is to drbdsetup and drbdmeta what ifup/ifdown is to ifconfig. like, it's the vibe-y front end that handles everything for you. πΈ
what she does is read her configuration file and then perform whatever command you asked for by calling the drbdsetup and/or the drbdmeta program. she's not doing the heavy lifting herself, she's delegating, which is very main character of her honestly. π
she can operate on whole resources or on individual volumes in a resource. the sub commands that work on whole resources and on individual volumes are: attach, detach, primary, secondary, invalidate, invalidate-remote, outdate, resize, verify, pause-sync, resume-sync, role, csytate, dstate, create-md, show-gi, get-gi, dump-md, wipe-md. π«Ά
and the resource level only commands are: connect, disconnect, up, down, wait-connect and dump. those ones don't do the volume thing, no ma'am. π
π OPTIONS π
-d,--dry-runβ she just prints the calls ofdrbdsetupto stdout. that's it. she does not actually run the commands. it's giving "let's rehearse first" energy. π-c,--config-file_file_ β tells her which configuration file to use. if you don't say anything, she goes looking for/etc/drbd-84.conf,/etc/drbd-83.conf,/etc/drbd-08.confand/etc/drbd.conf, in that order. she's thorough like that. β¨-t,--config-to-test_file_ β specifies an additional configuration file fordrbdadmto check. heads up though: this option is only allowed with thedumpand thesh-nopcommands. that's the rule, don't fight it. π«-s,--drbdsetup_file_ β the full path to thedrbdsetupprogram. if you skip this, she looks for it beneath herself first, and then in thePATH. she checks her own pockets before asking around, lowkey relatable. π-m,--drbdmeta_file_ β same deal, but the full path to thedrbdmetaprogram. if omitted, she looks beneath herself first, then in thePATH. π¦-S,--stackedβ says this command should be performed on a stacked resource. stack it up bestie. π₯-P,--peerβ specifies which peer node to connect to. you only need this if there are more than twohostsections in the resource you're working on. (and yes, it's here even though the SYNOPSIS didn't mention it β she contains multitudes. π)--_backend-options_ β everything after the doubly hyphen counts as backend-options. these get passed straight through to the backend command. i.e. todrbdsetup,drbdmetaordrbd-proxy-ctl. so like, whatever you put after--is going to the other girl, not todrbdadmherself. π«‘
π₯ COMMANDS π₯
attachβ attaches a local backing block device to the DRBD resource's device. π§²detachβ removes the backing storage device from a DRBD resource's device. bye bestie πconnectβ sets up the network configuration of the resource's device. if the peer device is already configured, the two DRBD devices will connect. and if there are more than twohostsections in the resource, you need the--peeroption to pick which peer you're connecting to. choose wisely. π«disconnectβ removes the network configuration from the resource. the device will then go intoStandAlonestate. she's alone now, she's healing. πsyncerβ loads the resynchronization parameters into the device. πupβ a shortcut forattachandconnect. two birds, one iconic command. π¦downβ a shortcut fordisconnectanddetach. the reverse slay. π¦ββ¬primaryβ promotes the resource's device into the primary role. you need to do this before any access to the device, like creating or mounting a file system. she's the main character now, no cap. πsecondaryβ brings the device back into secondary role. this is needed because in a connected DRBD device pair, only one of the two peers may have primary role β unlessallow-two-primariesis explicitly set in the configuration file. one crown, one head. πinvalidateβ forces DRBD to consider the data on the local backing storage device as out-of-sync. so DRBD will copy each and every block from its peer to bring the local storage device back in sync. β οΈ to avoid races, you need an established replication link, or to be disconnected Secondary. don't skip that part fr.invalidate-remoteβ similar to theinvalidatecommand, except here the peer's backing storage is invalidated and hence rewritten with the data of the local node. β οΈ to avoid races, you need an established replication link, or to be disconnected Primary. notice how it's the opposite one this time. iykyk.resizeβ causes DRBD to re-examine all sizing constraints and resize the resource's device accordingly. so like, if you increased the size of your backing storage devices (on both nodes, of course, don't be messy), DRBD will adopt the new size after you call this command on one of your nodes. and since new storage space must be synchronised, this command only works if there is at least one primary node present. β¨
note that all of the following options are backend-options (i.e., separated via --).
- the
--sizeoption can be used to online shrink the usable size of a drbd device. β οΈ it's the users responsibility to make sure that a file system on the device is not truncated by that operation. example:
# drbdadm -- --size=10G resize r0
- the
--assume-peer-has-spacelets you resize a device which is currently not connected to the peer. π«£ use with care, since if you do not resize the peer's disk as well, further connect attempts of the two will fail. so like, don't. unless you know. but she warned you. - the
--assume-cleanlets you resize an existing device and avoid syncing the new space. this is useful when adding addtional blank storage to your device. example:
# drbdadm -- --assume-clean resize r0
- the options
--al-stripesand--al-stripe-size-kBmay be used to change the layout of the activity log online. in case of internal meta data this may invovle shrinking the user visible size at the same time (unsing the--size) or increasing the avalable space on the backing devices. π
check-resizeβ callsdrbdmetato 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 nextattachcommand can succeed. she's just tidying up, bestie. π§Ήcreate-mdβ initializes the meta data storage. this needs to be done before a DRBD resource can be taken online for the first time. if you hit issues with that command, have a look atdrbdmeta(8). π±get-giβ shows a short textual representation of the data generation identifiers. snack-sized. πshow-giβ prints a textual representation of the data generation identifiers, including explanatory information. the full meal. π½οΈdump-mdβ dumps the whole contents of the meta data storage, including the stored bit-map and activity-log, in a textual representation. everything. all of it. no crumbs left. πoutdateβ sets the outdated flag in the meta data. π©adjustβ synchronizes the configuration of the device with your configuration file. β οΈ you should always examine the output of the dry-run mode before actually executing this command. always. every time. fr fr.wait-connectβ waits until the device is connected to its peer device. she'll just be here. waiting. patiently. π°οΈroleβ shows the current roles of the devices (local/peer). e.g.Primary/Secondary. π―stateβ deprecated alias forrole, see above. old news but still here. πcstateβ shows the current connection state of the devices. πdumpβ just parses the configuration file and dumps it to stdout. may be used to check the configuration file for syntactic correctness. vibe check for your config. βoutdateβ used to mark the node's data as outdated. usually used by the peer'sfence-peerhandler. (and yes,outdatereally does show up twice in this list β that's not me glitching, that's just how she is. π)verifyβ starts online verify. during online verify, data on both nodes is compared for equality. see/proc/drbdfor online verify progress. if out-of-sync blocks are found, they are not resynchronized automatically β to do that,disconnectandconnectthe resource when verification has completed. see also the notes on data integrity on thedrbd.confmanpage. πpause-syncβ temporarily suspends an ongoing resynchronization by setting the local pause flag. resync only progresses if neither the local nor the remote pause flag is set. it might be desirable to postpone DRBD's resynchronization until after any resynchronization of the backing storage's RAID setup. βΈοΈresume-syncβ unsets the local sync pause flag. we're back, baby. βΆοΈnew-current-uuidβ generates a new currend UUID and rotates all other UUID values. this can be used to shorten the initial resync of a cluster. see thedrbdsetupmanpage for a more details. β¨πdstateβ shows the current state of the backing storage devices. (local/peer) πΎhidden-commandsβ shows all commands undocumented on purpose. π the secret menu. we don't talk about the secret menu.
π VERSION π
this document was revised for version 8.4.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>. tell them everything, they can handle it. π¬
π COPYRIGHT π
copyright 2001-2011 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. β οΈ so like, don't come for her if it breaks. she told you.
π¦ 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/
okay that's the whole thing bestie, go forth and slay π and just so you know β this was DRBD 8.4.0, dated 6 May 2011, DRBDADM(8). the original manual page footer, but make it cute. πβ¨π¦
π¦ 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