It can be a pain as the kernel doesn't recognize the devices without a few extra commands.
For quick refence here they are:
To mount an LVM partition:
- kpartx -a /var/lib/libvirt/images/CentOSGuest.img
- pvscan
- vgchange -ay vg_centguest
- mount /dev/mapper/vg_centguest-lv_root /mnt
Then to un-mount:
- umount /mnt
- vgchange -an vg_centguest
- kpartx -d /var/lib/libvirt/images/CentGuesst.img
Behind the scenes, this will create a loop device /dev/loop0 so you may want to increase the number of available devices by editing /etc/modules.conf and add the following line:
options loop max_loop=64
No comments:
Post a Comment