Setup shared NFS storage.#

On the primary headnode, in the HA setup screen, select Shared Storage from the cmha-setup menu and then select SELECT.

In this final HA configuration step, cmha-setup will copy the /cm/shared and /home directories to the shared storage and configure both head nodes and all cluster nodes to mount it.

image

Choose NAS and then select SELECT.

image

Choose both /cm/shared and /home and then select NEXT.

image

Provide the IP address of the NFS host and the NFS Shared paths for /cmshared and /home folders and then select NEXT.

Refer to the site survey for the details.

_images/nfs-image3.png

The wizard shows a summary of the information that it has collected. Select EXIT to continue.

image

When asked to proceed with the NAS setup, select Yes to continue.

This will initiate a copy and update the NFS mount on the head nodes.

image

The cmha-setup wizard proceeds with its work.

image

When setup completes, select ENTER to finish HA setup.

The progress is shown here:

Copying NAS data................................... [ OK ]
Mount NAS storage.................................. [ OK ]
Remove old fsmounts................................ [ OK ]
Add new fsmounts................................... [ OK ]
Remove old fsexports............................... [ OK ]
Write NAS mount/unmount scripts.................... [ OK ]
Copy mount/unmount scripts......................... [ OK ]
Press any key to continue

cmha-setup is now complete. EXIT the wizard to return to the shell prompt on the primary headnode

image

Run the cmha status command to verify that the failover configuration is correct and working as expected.

The active head node is indicated by an asterisk. Here is an example of a working HA configuration.

# cmha status
Node Status: running in active mode
bcm-head-01* -> bcm-head-02
failoverping [ OK ]
mysql [ OK ]
ping [ OK ]
status [ OK ]
bcm-head-02 -> bcm-head-01*
failoverping [ OK ]
mysql [ OK ]
ping [ OK ]
status [ OK ]

Verify that the /cm/shared and /home directories are mounted from the NAS server. On the BCM head-node, run the following command.

 root@bcm10-headnode1:~# mount | grep nfs
 . . . some output omitted . . .
  10.130.122.252:/var/nfs/general/cmshared on /cm/shared type nfs4
(rw,relatime,vers=4.2,rsize=32768,wsize=32768,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=10.130.122.253,local_lock=none,addr=10.130.122.252)
 10.130.122.252:/var/nfs/general/home on /home type nfs4
(rw,relatime,vers=4.2,rsize=32768,wsize=32768,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=10.130.122.253,local_lock=none,addr=10.130.122.252)