How can I switch from HA-LVM tagging method to CLVM method on Red Hat Enterprise Linux 6?
Environment
-
Red Hat Enterprise Linux Server 6 (with the High Availability and Resilient Storage Add Ons)
-
2 or more nodes in a Red Hat Enterprise Linux 6 cluster
-
rgmanager to manage cluster resources and service groups
- At least one service is configured using HA-LVM tagging variant.
-
Issue
- We will proceed to change the current configuration from HA-LVM tagging variant to CLVM variant. How can we do that?
Resolution
To disable a previously configured HA-LVM tagging variant configuration:
1. Ensure that the service is stopped before beginning:
[root@node1]# clusvcadm -d <service_name>
2. Remove any uncommented volume_list entries in /etc/lvm/lvm.conf on all cluster nodes (commenting them out is fine) and rebuild initramfs RAM Disk:
[root@node1]# vim /etc/lvm/lvm.conf
<comment or delete volume_list lines>
[root@node1]# grep volume_list /etc/lvm/lvm.conf | grep -v \#
<no output expected>
[root@node1]# dracut -H /boot/initramfs-$(uname -r).img $(uname -r)
[root@node2]# vim /etc/lvm/lvm.conf
<comment or delete volume_list lines>
[root@node2]# grep volume_list /etc/lvm/lvm.conf | grep -v \#
<no output expected>
[root@node2]# dracut -H /boot/initramfs-$(uname -r).img $(uname -r)
3. Ensure there are no tags remaining on the volume groups or logical volumes:
[root@node1]# vgs -a -o +tags
[root@node1]# lvs -a -o +tags
Follow the documentation for the process to enable HA-LVM CLVM variant: HA-LVM CLVM method.
Root Cause
- There are currently 2 available variants of HA-LVM that can be configured: HA-LVM CLVM variant (preferred) and HA-LVM tagging variant
- Red Hat recommend that HA-LVM CLVM-variant is used with LVM resources in Red Hat High Availability clusters.
- The CLVM-variant of HA-LVM is not appropriate in the following situations:
- Stretch clusters
- Customers who do not have
Red Hat Enterprise Linux with Resilient Storage Add Ons(lvm2-cluster package is in resilient storage channels).
- The CLVM-variant of HA-LVM is not appropriate in the following situations:
- If you have previously set up tagging variant of HA-LVM, you may wish to switch to the CLVM-variant. This solution aims to help you do that.
Diagnostic Steps
-
This solution may be appropriate if you currently have HA-LVM tagging method configured on your cluster, and you want to switch to the HA-LVM CLVM method.
-
To check if you have HA-LVM tagging variant, you can check the following settings:
- Check if you have any LVM resources managed by your cluster? This is an indication that HA-LVM is configured, but not which variant:
# grep lvm /etc/cluster/cluster.conf <lvm lv_name="sanvol1" name="ha-lvm01" vg_name="sanvg1"/> <lvm lv_name="sanvol2" name="ha-lvm02" vg_name="sanvg2"/>- Check if you have an uncommented
volume_listentry in /etc/lvm/lvm.conf? If so, you're probably using HA-LVM tagging variant:
# grep volume_list /etc/lvm/lvm.conf | grep -v \# volume_list = [ "rootvg", "@node1" ]- Check the configured locking_type in /etc/lvm/lvm.conf. If
locking_type= 1, you're probably using using HA-LVM tagging variant. If the type is 3, you're probably using CLVM variant:
# grep locking_type /etc/lvm/lvm.conf | grep -v \# locking_type = 1- On the node that has your service activated, are there tags on your cluster-managed LVM volumes? The tags will be on the volume group if no lv_name is specified in /etc/cluster/cluster.conf, and on the logical volume if there is an lv_name specified in the resource definition. If there are tags on your logical volumes, it is very likely you are using HA-LVM tagging variant:
# vgs -a -o +tags # lvs -a -o +tags
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.