drbd_resource* (string): drbd resource name
The name of the drbd resource from the drbd.conf file.
drbdconf (string, [/etc/drbd.conf]): Path to drbd.conf
Full path to the drbd.conf file.
Operations' defaults (advisory minimum):
start timeout=240
promote timeout=90
demote timeout=90
notify timeout=90
stop timeout=100
monitor_Slave interval=20 timeout=20 start-delay=1m
monitor_Master interval=10 timeout=20 start-delay=1m
drbd 需要同时运行在两个节点上,但只能有一个节点(primary/secondary 模型)是 Master,而另一个
节点为 Slave;因此,它是一种比较特殊的集群资源,其资源类型为多态(Multi-state)clone 类型,即
主机节点有 Master 和 Slave 之分,且要求服务刚启动时两个节点都处于 slave 状态。
[root@node1 ~]# crm
crm(live)# configure
crm(live)configure# primitive webdrbd ocf:linbit:drbd params drbd_resource=web
op monitor role=Master interval=50s timeout=30s op monitor role=Slave
interval=60s timeout=30s
crm(live)configure# master MS_Webdrbd webdrbd meta master-max="1" master-node-
max="1" clone-max="2" clone-node-max="1" notify="true"
crm(live)configure# show webdrbd
primitive webdrbd ocf:linbit:drbd \
params drbd_resource="web" \
op monitor interval="15s"
crm(live)configure# show MS_Webdrbd
ms MS_Webdrbd webdrbd \
meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1"
notify="true"
crm(live)configure# verify
crm(live)configure# commit
查看当前集群运行状态:
# crm status
============
Last updated: Fri Jun 17 06:24:03 2011
Stack: openais
Current DC: node2.a.org - partition with quorum
Version: 1.0.11-1554a83db0d3c3e546cfd3aaff6af1184f79ee87
2 Nodes configured, 2 expected votes
1 Resources configured.
============
Online: [ node2.a.org node1.a.org ]
Master/Slave Set: MS_Webdrbd
Masters: [ node2.a.org ]
Slaves: [ node1.a.org ]
由上面的信息可以看出此时的 drbd 服务的 Primary 节点为 node2.a.org,Secondary 节点为
评论