mouting domU lvm in dom0
Requirement - to mount a LVM based Xen VBD file on dom0 for any reason (or for the heck of it):
kpartx
-
apk add multipath-tools
installs kpartx.
kpartx -v -a /dev/mapper/lvmVolName
ls -l /dev/mapper/lvmVolNamePartition*
<-- will show all partitions now ... as devices
mount /dev/mapper/lvmVolNamePartitionx <mount point>
kpartx -d /dev/mapper/lvmVolName
fdisk -l /dev/mapper/sataAB_data-xen_VG2_P_alpineServer
losetup /dev/loop0 /dev/mapper/sataAB_data-xen_VG2_P_alpineServer
partprobe /dev/loop0
dharra [~/Alpine_3.3.3_64]# ls -l /dev/loop0*
dharra [~/Alpine_3.3.3_64]#
the paritions loop0p1 etc can now be mounted..
mount /dev/loop0p3 /mnt
Once finished:
umount /mnt
losetup -d /dev/loop0
HOWEVER, this leaves the /dev/loop0p1 etc hanging out there ...these devices are not deleted. As suggested here:
http://superuser.com/questions/805735/how-to-delete-partition-device-from-loop-device
reboot will solve the problem.