I need to configure 3-node cluster with shared GFS2 filesystem. GFS2 needed as common Documentroot for apache behind the balancer. Can you suggest some guide on how to configure corosync+pacemaker+GFS2 on RHEL/SL 6.1? BTW I don't need DRBD as I have iSCSI as a shared block device.
2 Answers
I haven't seen how 6.1 changes things, I've only done it with 6.0, but this is what worked for me:
- Install the following patterns:
- Scalable File Systems
- Resilient Storage
- High Availability
- On each node, start the ricci service (
service start ricci
), entering a password when prompted - Start the luci service (
service start luci
) on one node - Go to port :8084 on the node you started luci on
- Go to "Manage Clusters"
- Click Create.
- Enter the cluster name
- For each node in the cluster, enter the node name, and the password you entered when you started the ricci service. Click create.
At this point you have a cluster. Ensuring the cluster services come on after a reboot is a very good idea at this point.
chkconfig ricci on
chkconfig cman on
chkconfig rgmanager on
chkconfig clvmd on (if you're using LVM under the GFS volume)
Now for the GFS side.
- In whatever shared storage system you have, present one LUN to each of your cluster nodes.
- Rescan your storage bus so each node at least sees the storage, don't do anything with it yet (depending on your specific circumstances, a reboot may be needed for this to take effect everywhere).
- On one node, create the filesystem,
mkfs.gfs -p lock_dlm -t ClusterName:ResourceName -j # /dev/your/device
- "Clustername" is the name of the cluster you specified in the cluster setup.
- "ResourceName" is the name of the cluster resource you want to create.
- "-j #" where # is the number of nodes in your cluster
- "/dev/your/device" is the path to the shared storage you presented in step 1.
When mounting the GFS device, ensure that "netdev" is listed in the options in fstab since GFS can't mount until after the network and cluster is established.

- 133,124
- 18
- 176
- 300
-
Yeah. Things changed since 6.1. SL repo in particular doesn't have gfs-pcmk package and I'm starting to thing pacemaker becomes unsupported solution... – Dmytro Leonenko Oct 10 '11 at 18:04
-
Furthermore I've done just as you described but 5 hours earlier and system looks working properly. I'm not quite sure if it would be somehow better or more reliable with pacemaker – Dmytro Leonenko Oct 10 '11 at 18:06
I updated Clusters from Scratch a couple of days ago to reflect the removal of gfs-pcmk. Just ignore the parts about drbd since you have iSCSI.
In particular, you'll want the section starting at: http://www.clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Clusters_from_Scratch/ch08.html which details how to use the 'standard' cman versions of gfs_controld and dlm_control with Pacemaker.
Also keep an eye out for package updates in 6.2, the Pacemaker/CMAN integration gets another boost.

- 131
- 1