RHCS HA Over NFS at BITS Pilani
HIGH AVAILABILITY OVER NFS [edit]
NAVDEEP MATHUR
ISSUE[edit]
- Need to set up highly available NFS
- Need clients to connect to an NFS service that can gracefully fail over to another system should the node providing the NFS service fail
CLUSTERING[edit]
- First ensure both servers are NTP sync'd and ensure that their hosts file contain entries of each other, and are the same.
- We first install the cluster packages
#yum groupinstall ‘Clustering’ ‘ClusterStorage’
FENCING[edit]
We now change cluster.conf manually to define our fencing devices for the base machines. (While luci-ricci can be used, I personally prefer editing the conf file directly due to the random bugs that keep popping up in luci-ricci , this time error occurred when adding fencing devices or resources/services.)
The fence that we are using is IBM’s IPMILAN v2.
We need the IP address, username and password for access the Management interface.
Management Interface (IPMI) By default username and password is “USERID” and “PASSWORD”
So first, we shall put the base machines on a cluster. We modify 'cluster.conf' to include the fencing agents, 'fence_bits' and 'fence_bits1', as shown:
<?xml version="1.0"?> <cluster alias="nfs-cluster" config_version="19" name="nfs-cluster"> <cman expected_votes="1" two_node="1"> </cman> <clusternodes> <clusternode name="ibm-39.bits.ac" nodeid="1"> <fence> <method name="1"> <device name="ibm-39_fence"/> </method> </fence> </clusternode> <clusternode name="ibm-40.bits.ac" nodeid="2"> <fence> <method name="1"> <device name="ibm-40_fence"/> </method> </fence> </clusternode> </clusternodes> <rm> <resources> <ip address="172.20.4.43" monitor_link="on" sleeptime="10"/> <script file="/etc/init.d/nfs" name="nfs"/> </resources> <service autostart="1" name="nfs" recovery="relocate"> <ip ref="172.20.4.43"/> <script ref="nfs"/> </service> </rm> <fencedevices> <fencedevice agent="fence_ipmilan" auth="password" ipaddr="172.20.4.41" login="fence_bits" name="ibm-39_fence" passwd="password"/> <fencedevice agent="fence_ipmilan" auth="password" ipaddr="172.20.4.42" login="fence_bits1" name="ibm-40_fence" passwd="password"/> </fencedevices> <fence_daemon clean_start="0" post_fail_delay="0" post_join_delay="3"/> </cluster>
Then Rsync this file to the other machine as well.
On both the servers simultaneously :
#service cman start ; chkconfig cman on # service rgmanager start ; chkconfig cman on #clustat
TROUBLESHOOTING[edit]
Checking cluster service:
# clustat
Enabling cluster service:
# clusvcadm -e <cluster service name> -m <node hostname>
Disabling cluster service:
# clusvcadm -d <cluster service name>
