Fix LVM Thin Snapshot Creation Errors
From time to time you might see errors like the following:
~]# lvcreate -s -n foo-snap data/foo
Can’t create snapshot bar-snap as origin bar is not suspended.
Failed to suspend vg01/pool0 with queued messages.
You will note that foo and bar have nothing to do with each other, but the error message prevents creating additional thin volumes. While the cause is unknown, the fix is easy. Something caused LVM to try to create an LVM that it was unable to complete, so it generates this in its metadata:
create = "bar-snap"
- deactivate the thinpool
- dump the VG metadata
- backup the file
- remove the message1 section
- restore the metadata.
- vgcfgbackup -f /tmp/pool0-current vg01
- cp /tmp/pool0-current /tmp/pool0-current-orig # backup the file before making changes
- vim /tmp/pool0-current # remove the message1 section in vg01 -> logical_volumes -> pool0
- vgcfgrestore -f /tmp/pool0-current vg01 –force
Hopefully this works for you, and hopefully whatever causes this gets fixed upstream.