I have built a VG named cinder-volumes. Within this VG, I created a PV named leader-volume. Then I mounted this PV as the root filesystem of a KVM Ubuntu installation. During the installation process, I selected LVM partition.
At last, I created a snapshot for the PV leader-volume.
Now I want to read some files within my Ubuntu installation… What shall I do?
I have built a VG named cinder-volumes. Within this VG, I created a PV
Share
Take a look at
kpartx– it’s especially useful for managing VMs where entire file systems are often packed into single volumes.kpartxcan create device nodes for partitions nested on a block device or disk image.Mount (one of the following):
Where
your_devicecould be an LVM partition. The-voption causeskpartxto display the devices it creates for nested partitions.Mount the appropriate /dev/mapper/loopXpX:
Unmount (after unmounting loop devices):
Remove the device mappings: