[ClusterLabs Developers] bug? in heartbeat/LVM OCF script
Chris Friesen
chris.friesen at windriver.com
Mon Jun 20 23:50:56 UTC 2016
Hi,
The heartbeat/LVM OCF script uses the following logic for the LVM_status() routine:
if [ -d /dev/$1 ]; then
test "`cd /dev/$1 && ls`" != ""
rc=$?
if [ $rc -ne 0 ]; then
ocf_exit_reason "VG $1 with no logical volumes is not supported by this RA!"
fi
fi
I recently discovered that there is currently an issue in the lvm2 package where
if you create an LVM thin pool, then create a thin volume in the pool, then the
udev rule doesn't think there should be a /dev/<volume-group>/<logical-volume>
symlink for the thin pool, but "vgmknodes" and "vgscan --mknodes" both think that
there should be such a symlink. This is a bug, but it's in the field in CentOS 7 at
least and likely elsewhere.
The end result of this is that on such a system running either "vgscan --mknodes" or
"vgmknodes" and then running "vgchange -an <volume-group>" will leave the
/dev/<volume-group> directory with a dangling symlink in it.
This in turn breaks /usr/lib/ocf/resource.d/heartbeat/LVM, since the /dev/<volume_group>
directory exists and is not empty even though the volume group is not active.
I think it would be better to query the activity directly, using something like
"lvs -o name,selected -S lv_active=active,vg_name=<volume_group>"
Chris
More information about the Developers
mailing list