High-Availability Storage with HA-LVM

On all servers, restart the cman service to enable the new configuration:

$ sudo /etc/rc.d/init.d/cman restart

Also, on all servers, start the rgmanager and clvmd services:

$ sudo /etc/rc.d/init.d/rgmanager start
Starting Cluster Service Manager:           [  OK  ]

$ sudo /etc/rc.d/init.d/clvmd start
Starting clvmd:                             [  OK  ]

Assuming that no errors were observed, you now should have a running cluster configured in an active/passive configuration. You can validate this by checking the accessibility of the shared volume on all servers. It should be seen, enabled and mounted on serv-0001 and not on serv-0002. Now comes the moment of truth—that is, testing the failover. Manually power down serv-0001. You will notice the rgmanager kicking in and enabling/mounting the volume on serv-0002.


To enable these services automatically on reboot, use chkconfig to start the services on all appropriate runlevels.


In an ideal configuration, fencing agents will need to be configured in the /etc/cluster/cluster.conf file. The purpose of the fencing agent is to handle a problematic node before it causes noticeable issues to the cluster. For example, if a server suffers from a kernel panic, is not communicating with the other servers in the cluster, or something else just as devastating, the IPMI utilities can be configured to reboot the server in question:

<clusternode name="serv-0001" nodeid="1">
         <method name="1">
             <device name="ipmirecover1"/>
 <clusternode name="serv-0002" nodeid="2">
         <method name="1">
             <device name="ipmirecover2"/>

[ ... ]

       <fencedevice agent="fence_ipmilan" ipaddr="" 
        ↪login="ADMIN" passwd="ADMIN" name="ipmirecover1"/>
       <fencedevice agent="fence_ipmilan" ipaddr="192.168.10" 
        ↪login="ADMIN" passwd="ADMIN" name="ipmirecover2"/>

The primary objective of HA-LVM is to provide the data center with enterprise-class fault tolerance at a fraction of the price. No one ever wants to experience server downtimes, and with an appropriate configuration, no one has to. From the data center to your home office, this solution can be deployed almost anywhere.


clvmd(8): Linux man page

Appendix F. High Availability LVM (HA-LVM): https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Cluster_Administration/ap-ha-halvm-CA.html


Petros Koutoupis is a software developer at IBM for its Cloud Object Storage division (formerly Cleversafe). He is also the creator and maintainer of the RapidDisk Project. Petros has worked in the data storage industry for more than a decade.