RHCS HA Over NFS at BITS Pilani: Difference between revisions
Created page with "<center>'''HIGH AVAILABILITY OVER NFS'''</center> <center>'''NAVDEEP MATHUR'''</center> '''ISSUE''' * Need to set up highly available NFS * Need clients to connect to an ..." |
No edit summary |
||
| Line 1: | Line 1: | ||
<center>'''HIGH AVAILABILITY OVER NFS'''</center> | [[category:Bits pilani]] | ||
==<center>'''HIGH AVAILABILITY OVER NFS'''</center>== | |||
'''NAVDEEP MATHUR''' | |||
=='''ISSUE'''== | |||
'''ISSUE''' | |||
* Need to set up highly available NFS | * 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 | * 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''' | =='''CLUSTERING'''== | ||
* First ensure both servers are NTP sync'd and ensure that their hosts file contain entries of each other, and are the same. | * 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 | * We first install the cluster packages | ||
'''<nowiki>#</nowiki>'''yum groupinstall ‘Clustering’ ‘ClusterStorage’ | '''<nowiki>#</nowiki>'''yum groupinstall ‘Clustering’ ‘ClusterStorage’ | ||
'''FENCING''' | =='''FENCING'''== | ||
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.) | 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.) | ||
| Line 31: | Line 31: | ||
<nowiki><?xml version="1.0"?></nowiki> | <nowiki><?xml version="1.0"?></nowiki> | ||
<nowiki><cluster alias="nfs-cluster" config_version="19" name="nfs-cluster"></nowiki> | |||
<nowiki><cluster alias="nfs-cluster" config_version="19" name="nfs-cluster"></nowiki> | <nowiki><cman expected_votes="1" two_node="1"></nowiki> | ||
<nowiki></cman></nowiki> | |||
<nowiki><cman expected_votes="1" two_node="1"></nowiki> | <nowiki><clusternodes></nowiki> | ||
<nowiki><clusternode name="ibm-39.bits.ac" nodeid="1"></nowiki> | |||
<nowiki></cman></nowiki> | <nowiki><fence></nowiki> | ||
<nowiki><method name="1"></nowiki> | |||
<nowiki><clusternodes></nowiki> | <nowiki><device name="ibm-39_fence"/></nowiki> | ||
<nowiki></method></nowiki> | |||
<nowiki><clusternode name="ibm-39.bits.ac" nodeid="1"></nowiki> | <nowiki></fence></nowiki> | ||
<nowiki></clusternode></nowiki> | |||
<nowiki><fence></nowiki> | <nowiki><clusternode name="ibm-40.bits.ac" nodeid="2"></nowiki> | ||
<nowiki><fence></nowiki> | |||
<nowiki><method name="1"></nowiki> | <nowiki><method name="1"></nowiki> | ||
<nowiki><device name="ibm-40_fence"/></nowiki> | |||
<nowiki><device name="ibm-39_fence"/></nowiki> | <nowiki></method></nowiki> | ||
<nowiki></fence></nowiki> | |||
<nowiki></method></nowiki> | <nowiki></clusternode></nowiki> | ||
<nowiki></clusternodes></nowiki> | |||
<nowiki></fence></nowiki> | <nowiki><rm></nowiki> | ||
<nowiki><resources></nowiki> | |||
<nowiki></clusternode></nowiki> | <nowiki><ip address="172.20.4.43" monitor_link="on" sleeptime="10"/></nowiki> | ||
<nowiki><script file="/etc/init.d/nfs" name="nfs"/></nowiki> | |||
<nowiki><clusternode name="ibm-40.bits.ac" nodeid="2"></nowiki> | <nowiki></resources></nowiki> | ||
<nowiki><service autostart="1" name="nfs" recovery="relocate"></nowiki> | |||
<nowiki><fence></nowiki> | <nowiki><ip ref="172.20.4.43"/></nowiki> | ||
<nowiki><script ref="nfs"/></nowiki> | |||
<nowiki><method name="1"></nowiki> | <nowiki></service></nowiki> | ||
<nowiki></rm></nowiki> | |||
<nowiki><device name="ibm-40_fence"/></nowiki> | <nowiki><fencedevices></nowiki> | ||
<nowiki><fencedevice agent="fence_ipmilan" auth="password" ipaddr="172.20.4.41" login="fence_bits" name="ibm-39_fence" passwd="password"/></nowiki> | |||
<nowiki></method></nowiki> | <nowiki><fencedevice agent="fence_ipmilan" auth="password" ipaddr="172.20.4.42" login="fence_bits1" name="ibm-40_fence" passwd="password"/></nowiki> | ||
<nowiki></fencedevices></nowiki> | |||
<nowiki></fence></nowiki> | <nowiki><fence_daemon clean_start="0" post_fail_delay="0" post_join_delay="3"/></nowiki> | ||
<nowiki></cluster></nowiki> | |||
<nowiki></clusternode></nowiki> | |||
<nowiki></clusternodes></nowiki> | |||
<nowiki><rm></nowiki> | |||
<nowiki><resources></nowiki> | |||
<nowiki><ip address="172.20.4.43" monitor_link="on" sleeptime="10"/></nowiki> | |||
<nowiki><script file="/etc/init.d/nfs" name="nfs"/></nowiki> | |||
<nowiki></resources></nowiki> | |||
<nowiki><service autostart="1" name="nfs" recovery="relocate"></nowiki> | |||
<nowiki><ip ref="172.20.4.43"/></nowiki> | |||
<nowiki><script ref="nfs"/></nowiki> | |||
<nowiki></service></nowiki> | |||
<nowiki></rm></nowiki> | |||
<nowiki><fencedevices></nowiki> | |||
<nowiki><fencedevice agent="fence_ipmilan" auth="password" ipaddr="172.20.4.41" login="fence_bits" name="ibm-39_fence" passwd="password"/></nowiki> | |||
<nowiki><fencedevice agent="fence_ipmilan" auth="password" ipaddr="172.20.4.42" login="fence_bits1" name="ibm-40_fence" passwd="password"/></nowiki> | |||
<nowiki></fencedevices></nowiki> | |||
<nowiki><fence_daemon clean_start="0" post_fail_delay="0" post_join_delay="3"/></nowiki> | |||
<nowiki></cluster></nowiki> | |||
| Line 109: | Line 73: | ||
On both the servers simultaneously : | On both the servers simultaneously : | ||
<nowiki>#service cman start ; chkconfig cman on</nowiki> | <nowiki>#service cman start ; chkconfig cman on</nowiki> | ||
<nowiki># service rgmanager start ; chkconfig cman on</nowiki> | |||
<nowiki># service rgmanager start ; chkconfig cman on</nowiki> | <nowiki>#clustat</nowiki> | ||
<nowiki>#clustat</nowiki> | |||
[[Image:]] | [[Image:bits-2.png]] | ||
'''TROUBLESHOOTING''' | =='''TROUBLESHOOTING'''== | ||
| Line 124: | Line 86: | ||
<nowiki># clustat </nowiki> | <nowiki># clustat </nowiki> | ||
| Line 130: | Line 92: | ||
<nowiki># clusvcadm -e <cluster service name> -m <node hostname></nowiki> | <nowiki># clusvcadm -e <cluster service name> -m <node hostname></nowiki> | ||
Disabling cluster service: | Disabling cluster service: | ||
<nowiki># clusvcadm -d <cluster service name></nowiki> | <nowiki># clusvcadm -d <cluster service name></nowiki> | ||
Latest revision as of 14:06, 29 December 2012
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>
