[DRBD-user] DRBD with RHCS

Chan Ching Yu, Patrick cychan at clustertech.com
Tue Jun 4 05:54:45 CEST 2013

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.

Hi all,

I’ve configured DRBD on two nodes running on CentOS6.3, it’s pretty good. The disks on two nodes can be synchronized succsssfully.

master1# cat /proc/drbd
0: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate C r-----
ns:204840 nr:2087836 dw:2292676 dr:1037 al:50 bm:128 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:0
master2# cat /proc/drbd
0: cs:Connected ro:Secondary/Primary ds:UpToDate/UpToDate C r-----
ns:2087836 nr:204840 dw:204840 dr:2087836 al:0 bm:128 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:0

However, I came across problem when I integrate RHCS (Redhat Cluster Suite) to DRBD.
I’ve added the DRBD-proivided script /usr/local/drbd/share/cluster/drbd.sh as the RHCS resource.

<ip address="" sleeptime="10"/>
<drbd name="mdisk" resource="ha"/>
<script file="/usr/local/drbd/share/cluster/drbd.sh" name="drbd_script"/>
<service domain="drbd_domain" name="mdisk_svc" recovery="relocate">
<ip ref=""/>
<script ref="drbd_script"/>

However,  when I relocate the service to another node, the script does not take any effect.

Then I tried to run this script manually. I guess the reason is the script does not know which device to promote/demote.

[root at master2 ~]# /usr/local/drbd/share/cluster/drbd.sh start

USAGE: drbdadm primary [OPTION...] {all|RESOURCE...}

  --stacked, -S
  --dry-run, -d
  --verbose, -v
  --config-file=..., -c ...
  --config-to-test=..., -t ...
  --drbdsetup=..., -s ...
  --drbdmeta=..., -m ...
  --drbd-proxy-ctl=..., -p ...
  --sh-varname=..., -n ...
  --peer=..., -P ...
  --version, -V
  --setup-option=..., -W ...
  --help, -h

OPTIONS FOR primary:

Version: 8.4.3 (api:1)
GIT-hash: 89a294209144b68adb3ee85a73221f964d3ee515 build by root at master2.local, 2013-06-01 07:29:10

No resource names specified

How to integrate this script (drbd.sh) to RHCS?  Should I feed the resource name to RHCS?
Thanks very much.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20130604/f39f3336/attachment.htm>

More information about the drbd-user mailing list