DRBDADM(8)
πΈ NAME πΈ
drbdadm β the administration tool for DRBD, bestie. Like, the whole thing. π
β¨ SYNOPSIS β¨
drbdadm [-d] [-c {file}] [-t {file}] [-s {cmd}] [-m {cmd}] [-S]
[-h {host}] [-- {backend-options}] {command} [all | resource...]
π¦ DESCRIPTION π¦
Okay so, drbdadm is the high-level tool of the DRBD program suite. Think of it like this: drbdadm is to drbdsetup and drbdmeta what ifup/ifdown is to ifconfig. π«Ά
It reads its configuration file and then does the thing you asked for by calling the drbdsetup and/or the drbdmeta program. That's the whole vibe, no cap.
π OPTIONS π
-d,--dry-runβ just prints the calls ofdrbdsetupto stdout, but does not actually run the commands. It's giving rehearsal energy. π-c,--config-filefile β tellsdrbdadmwhich configuration file to use. If you don't pass this,drbdadmgoes looking for/etc/drbd-83.conf,/etc/drbd-08.confand/etc/drbd.conf. In that order, bestie. ποΈ-t,--config-to-testfile β specifies an additional configuration file fordrbdadmto check. Heads up: this option is only allowed with thedumpand thesh-nopcommands. Periodt.-s,--drbdsetupfile β the full path to thedrbdsetupprogram. Skip it anddrbdadmwill look for/sbin/drbdsetupand./drbdsetup. π-m,--drbdmetafile β the full path to thedrbdmetaprogram. Skip it anddrbdadmwill look for/sbin/drbdmetaand./drbdmeta. π-S,--stackedβ says this command should be performed on a stacked resource. π§-P,--peerβ says which peer node to connect to. Only necessary if there are more than two host sections in the resource you're working on. π«--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. β‘οΈ
π 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. π«³connectβ sets up the network configuration of the resource's device. If the peer device is already configured, the two DRBD devices will connect. If there are more than two host sections in the resource you need to use the--peeroption to pick which peer you want to connect to. π°οΈdisconnectβ removes the network configuration from the resource. The device will then go intoStandAlonestate. πͺsyncerβ loads the resynchronization parameters into the device. πupβ a shortcut forattachandconnect. Two-for-one, slay. β¨downβ a shortcut fordisconnectanddetach. Also two-for-one. π«primaryβ promotes the resource's device into primary role. You need to do this before any access to the device, such as creating or mounting a file system. Main character promotion fr fr. π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 β except ifallow-two-primariesis explicitly set in the configuration file. So like, don't be greedy. π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 be disconnectedSecondary. β οΈinvalidate-remoteβ similar to theinvalidatecommand, however 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 be disconnectedPrimary. β οΈresizeβ causes DRBD to re-examine all sizing constraints, and resize the resource's device accordingly. For example, if you increased the size of your backing storage devices (on both nodes, of course), then DRBD will adopt the new size after you called this command on one of your nodes. Since new storage space must be synchronised, this command only works if there is at least one primary node present. π
The --assume-peer-has-space allows you to 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. π¬
The --assume-clean allows you to 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
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. π§create-mdβ initializes the meta data storage. This needs to be done before a DRBD resource can be taken online for the first time. In case of issues with that command have a look atdrbdmeta(8). π±get-giβ shows a short textual representation of the data generation identifiers. π’show-giβ prints a textual representation of the data generation identifiers including explanatory information. πdump-mdβ dumps the whole contents of the meta data storage, including the stored bit-map and activity-log, in a textual representation. ποΈ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. πwait-connectβ waits until the device is connected to its peer device. β³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. πstatusβ shows the current status of all devices defined in the current config file, in XML-like format. Example output:
<drbd-status version="8.3.2" api="88">
<resources config_file="/etc/drbd.conf">
<resource minor="0" name="s0" cs="SyncTarget" st1="Secondary" st2="Secondary"
ds1="Inconsistent" ds2="UpToDate" resynced_precent="5.9" />
<resource minor="1" name="s1" cs="WFConnection" st1="Secondary"
st2="Unknown" ds1="Inconsistent" ds2="Outdated" />
<resource minor="3" name="dummy" cs="Unconfigured" />
<!-- resource minor="4" name="scratch" not available or not yet created -->
</resources>
</drbd-status>
dumpβ just parse the configuration file and dump it to stdout. May be used to check the configuration file for syntactic correctness. π§Ύoutdateβ used to mark the node's data as outdated. Usually used by the peer'sfence-peerhandler. π·οΈ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, disconnect and connect the resource when verification has completed. π
See also the notes on data integrity on the drbd.conf manpage.
pause-syncβ temporarily suspend 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β unset the local sync pause flag. βΆοΈ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β show the current state of the backing storage devices. (local/peer) πΎhidden-commandsβ shows all commands undocumented on purpose. π€«
β VERSION β
This document was revised for version 8.3.2 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>.
π COPYRIGHT π
Copyright 2001-2008 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.
π SEE ALSO π
drbd.conf(5), drbd(8), drbddisk(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 page bestie, you ate π
β¨ β this one's from the DRBD 8.3.2 era, dated 5 Dec 2008, and it lives in section DRBDADM(8) of the manual. go forth and admin, icon. πΈπ¦π
π¦ where this page comes from
- debian bookworm: drbd-utils 9.22.0-1 Β· GPL-2.0-or-later
- debian trixie: drbd-utils 9.22.0-1.1 Β· GPL-2.0-or-later
- ubuntu noble: drbd-utils 9.22.0-1build1 Β· GPL-2.0-or-later
- ubuntu questing: drbd-utils 9.22.0-1.2
- ubuntu resolute: drbd-utils 9.22.0-1.2build1 Β· GPL-2.0-or-later
- ubuntu stonking: drbd-utils 9.22.0-1.2build1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms