Issue mounting existing lvm-thin to a VM

psalet

Active Member
Jul 17, 2020
15
2
43
67
HI All

Newbie here,

I have a proxmox server that had an issue with a disk drive. It would throw up errors and caused the system to hang.
I figured I would try to get the old data off of the old disk.

My first thing I did was add new disks and image with the new 6.2 proxmox. Once it was done I added the first original drive back into the server.
When I rebooted the first time with the old disk in (not paying attention here) it asked to add the disk to the system and of course i said sure why not, go for it.....
Well I lost the .conf information in /etc/pve. and only have the lv's left. I mounted the old pve data onto the proxmox server as old.

I then created a new VM same as the old VM which it did with the vm-XXX-disk-0. I then modified the 106.conf file to add the unused drive old:vm-106-disk-1.
I then mounted the lv and tried to start the VM. It never starts but errors with the following:

"kvm: -drive file=/dev/pve-OLD-25F75AB6/vm-106-disk-1,if=none,id=drive-scsi1,format=raw,cache=none,aio=native,detect-zeroes=on: Could not open '/dev/pve-OLD-25F75AB6/vm-106-disk-1': No such file or directory
TASK ERROR: start failed: QEMU exited with code 1"

The logical volumes are there. I figure it is a conflict of resources.
root@pvetest:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
data pve twi-aotz-- <1.57t 0.07 0.15
root pve -wi-ao---- 200.00g
swap pve -wi-ao---- 10.00g
vm-106-disk-0 pve Vwi-aotz-- 32.00g data
data pve-OLD-25F75AB6 twi---tz-- 788.88g
root pve-OLD-25F75AB6 -wi-a----- 100.00g
swap pve-OLD-25F75AB6 -wi-a----- 10.00g
vm-106-disk-1 pve-OLD-25F75AB6 Vwi---tz-- 50.00g data

Can someone point in the right direction to fix this. All help is appreciated
--paul
 
Can you
Code:
qm importdisk
the old images and replace the scsi0 disks of the VMs with those imported ones?
 
I found the issue was that the logical volumes were in the "inactive state". Once I made the logical volumes ACTIVE I added the disk lv to the vm. Made sure it was the boot disk. They booted up fine. Thanks