Disabling a DRBD resource takes that resource out of the local kernel configuration while leaving its resource file and metadata in place. Use it before node maintenance, storage work, or a temporary handoff where DRBD must stop exposing the replicated block device on one node.
drbdadm down removes the live resource, volumes, and peer connections for the node where the command runs. It does not delete /etc/drbd.d/webdata.res, wipe metadata, or disable a cluster manager that might bring the resource back.
Any application, filesystem, mount unit, Pacemaker resource, LINSTOR assignment, or systemd target above the resource must release it first. A resource that is still Primary, mounted, or controlled by another manager can fail to go down or return after the command finishes.
Related: How to delete a DRBD resource
Steps to disable a DRBD resource:
- Check the current local and peer state for the resource.
$ sudo drbdadm status webdata webdata role:Secondary disk:UpToDate peer-node role:Secondary replication:Established peer-disk:UpToDateReplace webdata with the resource name from the matching /etc/drbd.d/ resource file.
Related: How to check DRBD resource status
- Stop the service that writes to the DRBD-backed filesystem.
$ sudo systemctl stop webapp.service
Use the service, cluster, or application command that owns the mounted filesystem. If Pacemaker or LINSTOR manages the resource, stop or disable it at that layer first so it does not restart DRBD.
- Check whether the DRBD device is mounted.
$ findmnt --source /dev/drbd0 TARGET SOURCE FSTYPE OPTIONS /srv/webdata /dev/drbd0 xfs rw,relatime
Use the device path from the resource file when the resource does not use /dev/drbd0.
- Unmount the filesystem that uses the DRBD device.
$ sudo umount /srv/webdata
Unmounting stops access through that filesystem on the local node. Confirm that applications have stopped writing before running umount.
- Demote the resource if the local node is still Primary.
$ sudo drbdadm secondary webdata
drbdadm secondary fails while the DRBD device is still open for writes, which usually means a process, mount, or cluster manager still owns it.
- Preview the low-level disable action.
$ sudo drbdadm --dry-run down webdata drbdsetup down webdata
--dry-run shows the drbdsetup action without changing the live resource.
- Disable the resource on the local node.
$ sudo drbdadm down webdata
No output normally means drbdadm accepted the request. The resource file and metadata remain available for a later drbdadm up webdata.
- Verify that the resource is no longer present in the live DRBD state.
$ sudo drbdsetup status webdata webdata: resource not foundThe exact wording can vary by distribution and drbd-utils version. The resource should not show live volumes, connections, role, or disk state after it is down.
- Repeat the disable sequence on each peer that must stay down.
Running drbdadm down webdata on one node only removes the local node's live DRBD resource. Peer nodes keep their own resource state until the command is run there or a higher-level manager changes it.
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.