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:
RHCS components: OpenAIS, CCS, fenced, CMAN and CLVMD (Clustered LVM)
$yum install | or $yum install |
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
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
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
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