CentOS Icon CentOS Logo
CentOS Text
   
  
www.centos.org Forum Index
   CentOS 6 - General Support
   Fencing issue

 

  Bottom    Previous Topic    Next Topic
  •  Rate Thread
      Rate this Thread
      Excellent
      Good
      Average
      Bad
      Terrible
Poster Thread
  •  aink99
      aink99
Fencing issue
#1
Newbie
Joined: 2011/6/21
From
Posts: 4
Hi I'm using centos 6.2 and I have issue with the fenced deamon. When using a custom fencing bash script with fence_node command no problem it is working.
But when I pull a network cable to simulate an issue the message says ex: fence web01 success but it is not working. I even put some logging in the script and when it's used by the fenced there;s nothing in the log.

Here's the script :

cat /sbin/fence_vbox
#!/bin/bash
logfile="/var/log/vboxfence.log"
exec &>$logfile

date
echo "success: myfence $2"
ssh vbox@192.168.2.31 "vboxmanage controlvm web01 poweroff > /dev/null 2>&1"
sleep 5
ssh vbox@192.168.2.31 "nohup vboxheadless -s web01 >/dev/null &"
exit 0


Here my cluster config :

cat /etc/cluster/cluster.conf
<?xml version="1.0"?>
<cluster config_version="37" name="drbd_cluster">
        <clusternodes>
                <clusternode name="web01" nodeid="1">
                        <fence>
                                <method name="vbox">
                                        <device name="fence_web01"/>
                                </method>
                        </fence>
                </clusternode>
                <clusternode name="web02" nodeid="2">
                        <fence>
                                <method name="vbox">
                                        <device name="fence_web02"/>
                                </method>
                        </fence>
                </clusternode>
        </clusternodes>
        <cman expected_votes="1" two_node="1"/>
        <rm>
                <resources>
                        <drbd name="rs_share_drbd1" resource="share_drbd1"/>
                        <fs device="/dev/drbd0" force_fsck="on" fsid="9926" fstype="ext4" mountpoint="/share" name="rs_drbd_fs" quick_status="on" self_fence="on"/>
                        <ip address="192.168.2.210" monitor_link="on" sleeptime="10"/>
                        <nfsserver name="rs_nfs_server"/>
                        <nfsclient allow_recover="on" name="rs_web_nfs_client" options="rw,sync,no_root_squash,subtree_check" target="192.168.2.0/24"/>
                        <nfsexport name="rs_nfs_export_drd_share"/>
                </resources>
                <failoverdomains>
                        <failoverdomain name="drbd_nfs" nofailback="1" ordered="0" restricted="0"/>
                </failoverdomains>
                <service domain="drbd_nfs" max_restarts="1" name="nfs_drbd_share" recovery="restart" restart_expire_time="5">
                        <ip ref="192.168.2.210"/>
                        <drbd ref="rs_share_drbd1">
                                <fs ref="rs_drbd_fs">
                                        <nfsexport ref="rs_nfs_export_drd_share">
                                                <nfsclient ref="rs_web_nfs_client"/>
                                        </nfsexport>
                                </fs>
                        </drbd>
                </service>
        </rm>
        <fence_daemon post_fail_delay="12" post_join_delay="12"/>
        <fencedevices>
                <fencedevice agent="fence_ilo" ipaddr="1.2.1.2" login="login" name="ilo-test" passwd="1234"/>
                <fencedevice agent="fence_vbox" name="fence_web02"/>
                <fencedevice agent="fence_vbox" name="fence_web01"/>
        </fencedevices>
        <logging>
                <logging_daemon debug="on" logfile_priority="debug" name="fenced" syslog_priority="debug"/>
        </logging>
</cluster>
[Moderator edit: Added code tags to preserve formatting.]
Posted on: 2012/2/6 20:46
Create PDF from Post Print
Top
Subject Poster Date
 Top   Previous Topic   Next Topic

 


 You cannot start a new topic.
 You can view topic.
 You cannot reply to posts.
 You cannot edit your posts.
 You cannot delete your posts.
 You cannot add new polls.
 You cannot vote in polls.
 You cannot attach files to posts.
 You cannot post without approval.




"Linux" is a registered trademark of Linus Torvalds. | All other trademarks are property of their respective owners. | All other content is Copyright @ 2004-2009 by the CentOS Project or "each individual contributor (forums, comments, etc.) unless otherwise assigned".| Theme based on a theme by 7dana.com