Mounting partition stored inside Logical Volume

On a KVM Virtual machine using LVM storage, the LVM disk is partitioned as follows.

I want to mount partition number 2 on the host machine.

To make the partition available to mount, you need to use kpartx utility. Install kpartx with

To make the partitions inside the Logical volume available to mount, use the command

In this case, I used

Now lvscan command will display the new device

To mount the device, you can use the command

IMPORTANT: do not mount the device on the host if it is used in the guest VM as it will result in data corruption. I mounted the disk on the host machine and created some files, but it did not show in the guest. After I reboot the guest VM, it did not boot back, I had to do fsck to get the VM to work again.

Back to LVM

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *