resource-agents icon indicating copy to clipboard operation
resource-agents copied to clipboard

Fix VG activity bug in heartbeat/LVM script

Open cbf123 opened this issue 9 years ago • 0 comments

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// 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 " will leave the /dev/ directory with a dangling symlink in it.

This breaks the LVM_status() function in this OCF script, since the /dev/<volume_group> directory exists and is not empty even though the volume group is not active.

This commit changes the code to directly query lvm about the volume group activity rather than relying on side effects.

cbf123 avatar Jun 21 '16 18:06 cbf123