Fix VG activity bug in heartbeat/LVM script #829
+6
−9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.