Realization of NFS HA based on HeartBeat
Version: 1.0mAintainer: hutuwormupdate: 2003-09-30
※systems Manual
This system consists of two Dell PowerEdge 2650 (HUTUNFS1 & HUTUNFS2) and a disk array, and disk arrays are divided into LD0 & LD1 two RAID5 logic (Logical Disk). The operating system is Redhat 7.3 Linux. The purpose of setting NFS HA is that hutunfs2 is automatically taken when hutunfs1 fails.
1 Install HeartBeat 1.0.3 for redhat 7.3 http://www.ultramonkey.org/download/heartbeat/1.0.3/redhat_7.3/ HeartBeat-1.0.3-1.RH.7.3.1.i386.rpm HeartBeat- LDIRECTORD-1.0.3-1.RH.7.3.1.I386.3-1.RPM HeartBeat-Stonith-1.0.3-1.RH.7.386.3-1.RH.7.3. 1.i386.rpm
2 Setting the configuration file: hutunfs1 is Master, Hutunfs2 is Slave. 2.1 HUTUNFS1 192.168.0.30 /etc/ha.d/ha.cf # define nodes in cluster node hutunfs1 node hutunfs2 # time a system must be unreachable before considered dead (seconds) deadtime 5 # set up for the serial heartbeat pulse # If two The server between the servers is connected with heartbeat, and HeartBeat supports serial heartbeat monitoring. #Serial / dev / ttys0 #baud 19200 # Interface to run the network heartbeat Pulse UDP BOND0
/etc/ha.d/authkeys auth 3 3 md5 hutueworm
Of / dev / sdc1 :: / ld0 :: ext3 nfslock nfs hutunfs1 192.168.0.30 filesystem :: / dev / sdd1 :: / ld1 :: ext3 NFSlock NFS
/ etc / exports # # export the shared disk, allowing read / write access and no # synchronous I / O with no write delay. / ld0 192.168.0. * (rw, sync, no_wdelay) / ld1 192.168.0. * (RW Sync, NO_WDELAY)
/ Etc / hosts # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 hutunfs1 localhost.localdomain localhost 192.168.0.30 hutunfs1 192.168.0.31 hutunfs2
2.2 Hutunfs2 192.168.0.31 /etc/ha.d/ha.cf /etc/ha.d/AUTHKEYS / Etc/ha.d/HARESOURCES / ETC / EXPORTS above four files with hutunfs1 same / etc / hosts # do not Remove The Following Line, or Various Programs # That Require Network FunctionAlity Will Fail. 127.0.0.1 Hutunfs2 localhost.localdomain localhost 192.168.0.30 hutunfs1 192.168.0.0.31 hutunfs2
3. Run NTSYSV on Hutunfs1 & Hutunfs2, confirm that NFS service is turned off, and the HeartBeat service is turned on. The hutunfs1 will be restarted, and then hutunfs2, hutunfs1 is run as Master, and Hutunfs2 is run as a slave. When Hutunfs1 fails, Hutunfs2 will automatically take over 192.168.0.30 and open the NFS service at the same time.