drbd cli四, 11/02/2021 - 11:25 的修訂版本

修訂版本可以讓你追蹤文章的多個版本的不同之處。

最後更新: 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

 

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