<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt">
<DIV>Hi all,</DIV>
<DIV>&nbsp;</DIV>
<DIV>I¡¯ve configured DRBD on two nodes running on CentOS6.3, it¡¯s pretty good. 
The disks on two nodes can be synchronized succsssfully.</DIV>
<DIV>&nbsp;</DIV>
<DIV>master1# cat /proc/drbd</DIV>
<DIV>0: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate C r-----</DIV>
<DIV>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</DIV>
<DIV></DIV>
<DIV>master2# cat /proc/drbd</DIV>
<DIV>0: cs:Connected ro:Secondary/Primary ds:UpToDate/UpToDate C r-----</DIV>
<DIV>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</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>However, I came across problem when I integrate RHCS (Redhat Cluster Suite) 
to DRBD.</DIV>
<DIV>I¡¯ve added the DRBD-proivided script /usr/local/drbd/share/cluster/drbd.sh 
as the RHCS resource.</DIV>
<DIV>&nbsp;</DIV>
<DIV>&lt;rm&gt;</DIV>
<DIV>&lt;resources&gt;</DIV>
<DIV>&lt;ip address="192.168.129.190" sleeptime="10"/&gt;</DIV>
<DIV>&lt;drbd name="mdisk" resource="ha"/&gt;</DIV>
<DIV>&lt;script file="/usr/local/drbd/share/cluster/drbd.sh" 
name="drbd_script"/&gt;</DIV>
<DIV>&lt;/resources&gt;</DIV>
<DIV>&lt;service domain="drbd_domain" name="mdisk_svc" 
recovery="relocate"&gt;</DIV>
<DIV>&lt;ip ref="192.168.129.190"/&gt;</DIV>
<DIV>&lt;script ref="drbd_script"/&gt;</DIV>
<DIV>&lt;/service&gt;</DIV>
<DIV>&lt;/rm&gt;</DIV>
<DIV>&nbsp;</DIV>
<DIV>However,&nbsp; when I relocate the service to another node, the script does 
not take any effect.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Then I tried to run this script manually. I guess the reason is the script 
does not know which device to promote/demote.</DIV>
<DIV>&nbsp;</DIV>
<DIV>[root@master2 ~]# /usr/local/drbd/share/cluster/drbd.sh start</DIV>
<DIV>&nbsp;</DIV>
<DIV>USAGE: drbdadm primary [OPTION...] {all|RESOURCE...}</DIV>
<DIV>&nbsp;</DIV>
<DIV>GENERAL OPTIONS:</DIV>
<DIV>&nbsp; --stacked, -S</DIV>
<DIV>&nbsp; --dry-run, -d</DIV>
<DIV>&nbsp; --verbose, -v</DIV>
<DIV>&nbsp; --config-file=..., -c ...</DIV>
<DIV>&nbsp; --config-to-test=..., -t ...</DIV>
<DIV>&nbsp; --drbdsetup=..., -s ...</DIV>
<DIV>&nbsp; --drbdmeta=..., -m ...</DIV>
<DIV>&nbsp; --drbd-proxy-ctl=..., -p ...</DIV>
<DIV>&nbsp; --sh-varname=..., -n ...</DIV>
<DIV>&nbsp; --peer=..., -P ...</DIV>
<DIV>&nbsp; --version, -V</DIV>
<DIV>&nbsp; --setup-option=..., -W ...</DIV>
<DIV>&nbsp; --help, -h</DIV>
<DIV>&nbsp;</DIV>
<DIV>OPTIONS FOR primary:</DIV>
<DIV>&nbsp; --force[=...]</DIV>
<DIV>&nbsp;</DIV>
<DIV>Version: 8.4.3 (api:1)</DIV>
<DIV>GIT-hash: 89a294209144b68adb3ee85a73221f964d3ee515 build by 
root@master2.local, 2013-06-01 07:29:10</DIV>
<DIV>&nbsp;</DIV>
<DIV>No resource names specified</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>How to integrate this script (drbd.sh) to RHCS?&nbsp; Should I feed the 
resource name to RHCS?</DIV>
<DIV>Thanks very much.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Regards,</DIV>
<DIV>CY</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV></DIV></DIV></BODY></HTML>