Attach lvm2_member vhd to proxmox VM?

justjosh

Well-Known Member
Nov 4, 2019
103
2
58
59
Hello,

I have a VHD export from Xen that I extracted with 7zip. It has given me 3 files out of which the main file is a .lvm file. I have tried to mount it but I have gotten an error:

Code:
# mount 1.lvm /mnt/temp
mount: /mnt/temp: unknown filesystem type 'LVM2_member'.

How do I access the contents of this file (whether to attach directly to VM or copy the contents)

Thanks!
 
I was able to use kpartx to mount the volume and map the individual partitions to proxmox and manually copy all the files from it. But I'm unable to clean up mappings now and when I delete the image the space isn't reclaimed.
# kpartx -dv /dev/loop0
cloudlinux-home: is not a kpartx partition. Not removing
cloudlinux-root: is not a kpartx partition. Not removing
The image file is already "deleted" from the file system but df -h still shows that it's taking up the space

Probably something like this will help:
https://superuser.com/questions/1376690/how-to-mount-an-lvm-volume-from-a-dd-raw-vmdk-image


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Last edited: