最後更新: 2021-02-11
目錄
- drbdadm
- drbdmon
- drbdmeta
- drbdsetup
drbdadm
drbdadm -call-> drbdsetup
drbdadm -call-> drbdmeta
Usage
drbdadm options command resource[/volume]...
options
-d # dry-run mode
Command
attach / detach
Attaches a local backing block device to the DRBD resource's device
/dev/sdb1 -> /dev/drbd1
connect / disconnect
If the peer device is already configured, the two DRBD devices will connect.
node1 <--> node2
up / down
shortcut for attach and connect
shortcut for disconnect and detach
primary / secondary
You need to do this before any access to the device,
such as creating or mounting a file system.
Info
dstate | cstate | role
adjust
根據 "/etc/drbd.conf" Update setting
dump
configure
Sync
syncer (Loads the resynchronization parameters into the device.)
pause-sync / resume-sync
Temporarily suspend an ongoing resynchronization by setting the local pause flag
verify
verify 之後須要再 disconnect, connect 去修復
outdate
mark the node's data as outdated
(Sets the outdated flag in the meta data)
invalidate / invalidate-remote
強制 re-sync 所有 data 一次
很少用的 command:
create-md (first time only)
new-current-uuid
resize
check-resize (Calls drbdmeta to eventually move internal meta data)
drbdmon
drbdmeta
drbdadm -call-> drbdmeta # Usually you do not want to use this command directly
Only works if
- DRBD resource is currently down or
- detached from its backing storage