Configuring the shared DISK and GFS volume

1.To set up the gfs/gfs2 volume, start all the gfs/gfs2 services on each machine. Before this, ensure that GFS/GFS2 and RHCS components are installed on them. If not, install the components:

GFS components: gfs-util, k-mod-gfs, Distributed Lock Manager (DLM)

RHCS components: OpenAIS, CCS, fenced, CMAN and CLVMD (Clustered LVM)

$yum install gfs-util kmod-gfs

or $yum install gfs2-util

2.Start gfs/gfs2, cman, and clvm services, and then enable cluster on all the nodes by using the following command:

$service gfs start (or $service gfs2 start)

$service cman start

$service rgmanager start $service clvmd start $lvmconf --enable-cluster

3.To create a shared volume in HA mode, execute the following commands on any one node: $pvcreate /dev/sd[bcde]1

Physical volume "/dev/sdb1" successfully created $vgcreate DP_Grp /dev/sd[bcde]1

Volume group "DP_Grp " successfully created $lvcreate -n DP_Vol -L 3G disk1

Logical volume "DP_Vol" created

4.Mount the created GFS Volume on the Master Node (any one node). The output of the command is as follows:

$gfs_mkfs -p lock_dlm -t home:mygfs -j 2 /dev/DP_Grp/DP_Vol

This will destroy any data on /dev/DP_Grp/DP_Vol.

It appears to contain a gfs filesystem. Are you sure you want to proceed? [y/n] y

Device:

/dev/DP_Grp/DP_Vol

Blocksize:

4096

Filesystem Size:

616384

Journals:

2

Resource Groups:

10

Locking Protocol:

lock_dlm

Lock Table:

home:mygfs

Syncing...

 

All Done

5.Check whether the gfs and cluster volume managers are running. Create the mount point folder, namely FileShare, on all the nodes.

$ chkconfig gfs on $ chkconfig clvmd on

Mount GFS in the cluster member by editing the /etc/fstab file with the device and mount point information.

$ vi /etc/fstab

3