Follow the below steps to create Volume Group in RHEL Cluster
1. Add the disk to the server.
2. Pvcreate the new partitions
3. Create the VG’s
vgcreate -c n -s 32M HAVG_<vg_name> /dev/mapper/mpath#p#
-s : Sets the physical extent size on physical volumes of this volume group
-c : If clustered locking is enabled, this defaults to y indicating that this Volume Group is shared with other nodes in the cluster
Creating a new Logical volume to a HA Volume group
To create a LV to a newly created volume group you have to add the hostname tag to the VG. This will permit one server in the cluster to have access to the volume group at a given time.
1. vgchange --addtag <hostname>.testdomain.com HAVG_<vg_name>
2. lvcreate –L ##M –n lv-<lvname> HAVG_<vg_name>
3. mke2fs –j /dev/HAVG_<vg_name>/lv-<lvname>
Create mountpoints on all nodes in the cluster. Do not add to /etc/fstab
1. mkdir <mount_point>
2. mount /dev/HAVG_<vg_name>/lv-<lvname> <mount_point>
3. Change permissions on mountpoint.
No comments:
Post a Comment