for my KVM guests I use only LVM disks, I find it easy to use and administer.
Every time you running out of space you can resize your lvn volume.
Bus some days ago I moved some virtual servers to another physical Dom0(Host) and was a little bit confused – how to move lvm – DD was not the best idea.
There is always another way, here is my:
Very important! Shut-down virtual machine.
Install kpartx to handle partitioned LVM:
1 | aptitude install kpartx |
To access LVM volumes, you must rescan LVM with vgscan and activate the volume group on the partition (called vg0 by default) by using the vgchange -ay command:
1 2 3 4 5 6 7 8 | kpartx -a /dev/vg0/guest56 vgscan #Reading all physical volumes . This may take a while... #Found volume group "vg0" using metadata type lvm2 vgchange -ay vg0now # 12 logical volume(s) in volume group vg0 now active. lvs mount /dev/vg0/guest56 /mnt/ |
After working on it – release it:
1 2 3 | umount /mnt/ vgchange -an vg0 kpartx -d /dev/vg0/guest56 |
Leave a Reply