How to configure DRBD with High Availability (HA)
January 18th, 2007The following will configure DRBD with HA for a primary/secondary node configuration.
- Once you have a fully functional DRBD and HA cluster you need to add the following configuration to the /etc/ha.d/haresources file
|
node1 \ 192.168.2.240 drbddisk::r0 |
- Ensure the /etc/ha.d/haresources file is replicated through the cluster
- Restart the heartbeat service
- service heartbeat restart
- If you require the DRBD file system mounted once failover occurs we suggest making modifications to the autofs file system mounting too to automatically mount the file system once it notices its available (this is outside of the scope of this document)
Assumptions
- That the guidelines in the document How to install and configure DRBD for file system replication and How to configure High Availability have been followed and completed and you have a working DRBD configuration and HA cluster
Notes
- We stress that because you’re dealing with file system information (that can get corrupted or lost) that you have auto_failback off configured in your /etc/ha.d/ha.cf configuration file!
- You may notice depending on your /etc/ha.d/ha.cf configuration that it takes several seconds for the DRBD disk to be available, this is HA not the DRBD configuration, check your timeout values
