Discussion:
[linux-lvm] Correct way to remove LVM Snapshot
Jaco van Niekerk
2018-09-26 04:50:16 UTC
Permalink
Hi

I will like to confirm the correct way to remove an LVM snapshot?

Create my Logical Volume and snapshot:
lvcreate --addtag pacemaker --name lv_iscsi_lun1 --size 100G vg_iscsi --config 'activation { volume_list = [ "@pacemaker" ]}'
lvcreate --addtag pacemaker --name lv_iscsi_lun1_snap --snapshot --size 10G /dev/vg_iscsi/lv_iscsi_lun1 --config 'activation { volume_list = [ \"@pacemaker\" ]}'

Do I have to Merge the Snapshot first before I can remove it?
lvremove /dev/vg_iscsi/lv_iscsi_lun1_snap

More Info:
lv_iscsi_lun1 is a ISCSI target for a KVM virtual server.

Trouble experienced:
I lost my hole Volume Group after removing the Logical Volume Snapshot.

Regards

--

Jaco van Niekerk
Heinz Mauelshagen
2018-09-26 16:00:28 UTC
Permalink
Post by Jaco van Niekerk
Hi
I will like to confirm the correct way to remove an LVM snapshot?
lvcreate --addtag pacemaker --name lv_iscsi_lun1 --size 100G vg_iscsi
lvcreate --addtag pacemaker --name lv_iscsi_lun1_snap --snapshot
--size 10G /dev/vg_iscsi/lv_iscsi_lun1 --config 'activation {
Do I have to Merge the Snapshot first before I can remove it?
lvremove /dev/vg_iscsi/lv_iscsi_lun1_snap
Depends on your use case:

- if you need the data as of your snapshot and wnat to keep it in the
origin, you have to merge

- if you used the snapshot temorarily (e.g. for backup, fsck, ...), just
lvremove it.
Post by Jaco van Niekerk
lv_iscsi_lun1 is a ISCSI target for a KVM virtual server.
I lost my hole Volume Group after removing the Logical Volume Snapshot.
Can you provide any logs and "lvremove -vvvv ..." output (lvmdump
preferred)?

Heinz
Post by Jaco van Niekerk
Regards
--
Jaco van Niekerk
_______________________________________________
linux-lvm mailing list
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO athttp://tldp.org/HOWTO/LVM-HOWTO/
Loading...