[fedora-virt] [OT] LVM2 snapshot for a VM disk question
Gianluca Cecchi
gianluca.cecchi at gmail.com
Wed Jun 29 09:57:16 UTC 2011
Hello,
I'm in this situation and would like to be certain before doing bad things...
Thanks in advance for your help and sorry for off topic
rh el 6.1 host and a vm with one disk that is LVM based
- shutdown guest
- lock exclusively the lv (it is actually a cluster of two rh el 6.1)
on one node:
# lvchange -an /dev/VG_VIRT01/zensrv_002
on the other one:
# lvchange -aey /dev/VG_VIRT01/zensrv_002
- create snapshot
# lvcreate --size 5G --snapshot --name zensrv_002_snap /dev/VG_VIRT01/zensrv_002
Logical volume "zensrv_002_snap" created
- power on vm and going ahead doing some intrusive tests
Note that I maintained the original LV as the disk for the VM
- At the end of my work the situation I have changed about 1.7Gb of my
original disk:
# lvs /dev/VG_VIRT01/zensrv_002*
LV VG Attr LSize Origin Snap% Move Log
Copy% Convert
zensrv_002 VG_VIRT01 owi-ao 10.00g
zensrv_002_snap VG_VIRT01 swi-a- 5.00g zensrv_002 34.77
- Now I'm confident with the changes..
Is it ok to simply remove the snapshot?
- What if I'm not confident with the changes and would like to revert?
Will
lvconvert --merge /dev/VG_VIRT01/zensrv_002_snap
Or did I make it totally wrong and had to work with the snapshot and
not with the original LV????
Keep on reading docs, both rhel and general but I'm sort of confused....
Probably someone on this list already went through this way...
Gianluca
BTW: any plan to integrate a sort of snapshotting feature for lvm
based disks in virt-manager?
More information about the virt
mailing list