DRBDADM(8)

πŸ“¦
version 9.34.0 Β· 3 versions
, in alpine 3.23, alpine 3.24, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable

πŸ’– 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 of drbdsetup to 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.conf and /etc/drbd.conf, in that order. she's thorough like that. ✨
  • -t, --config-to-test _file_ β€” specifies an additional configuration file for drbdadm to check. heads up though: this option is only allowed with the dump and the sh-nop commands. that's the rule, don't fight it. 🚫
  • -s, --drbdsetup _file_ β€” the full path to the drbdsetup program. if you skip this, she looks for it beneath herself first, and then in the PATH. she checks her own pockets before asking around, lowkey relatable. πŸ’…
  • -m, --drbdmeta _file_ β€” same deal, but the full path to the drbdmeta program. if omitted, she looks beneath herself first, then in the PATH. πŸ¦‹
  • -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 two host sections 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. to drbdsetup, drbdmeta or drbd-proxy-ctl. so like, whatever you put after -- is going to the other girl, not to drbdadm herself. 🫑

πŸ”₯ 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 two host sections in the resource, you need the --peer option to pick which peer you're connecting to. choose wisely. πŸ’«
  • disconnect β€” removes the network configuration from the resource. the device will then go into StandAlone state. she's alone now, she's healing. 😭
  • syncer β€” loads the resynchronization parameters into the device. πŸ”„
  • up β€” a shortcut for attach and connect. two birds, one iconic command. 🐦
  • down β€” a shortcut for disconnect and detach. 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 β€” unless allow-two-primaries is 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 the invalidate command, 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 --size option 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-space lets 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-clean lets 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-stripes and --al-stripe-size-kB may 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 β€” calls 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. 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 at drbdmeta(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 for role, 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's fence-peer handler. (and yes, outdate really 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/drbd for online verify progress. if out-of-sync blocks are found, they are not resynchronized automatically β€” to do that, disconnect and connect the resource when verification has completed. see also the notes on data integrity on the drbd.conf manpage. πŸ”
  • 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 the drbdsetup manpage 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 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 πŸ“

  1. 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. πŸŽ€βœ¨πŸ¦‹