Configuring RHEL6.1 GFS cluster

clustercorosyncgfs2pacemakerrhel6

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.

Best Answer

I haven't seen how 6.1 changes things, I've only done it with 6.0, but this is what worked for me:

  1. Install the following patterns:
    • Scalable File Systems
    • Resilient Storage
    • High Availability
  2. On each node, start the ricci service (service start ricci), entering a password when prompted
  3. Start the luci service (service start luci) on one node
  4. Go to port :8084 on the node you started luci on
  5. Go to "Manage Clusters"
  6. Click Create.
  7. Enter the cluster name
  8. 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.

  1. In whatever shared storage system you have, present one LUN to each of your cluster nodes.
  2. 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).
  3. 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.

Related Topic