have to reanimate VM-Disc after VMCrash

oefchen

Member
Apr 5, 2022
23
3
8
Hello to all, hope you can follow my bad english and i can follow you if you want to help me ;)

Here runs a cluster of 3 (8.2.7). Was a NAS-VM at PVE1(300)....it crashes. Vm300 was migratet to PVE2, cant start there and a migration back was not possible.
But at that 2 blue VM are importend data...and 4 sure i dont have a backup
root@pve1:~# ls -l /dev/mapper/
total 0
crw------- 1 root root 10, 236 Oct 6 05:31 control
lrwxrwxrwx 1 root root 8 Oct 6 05:31 HDD2-HDD2 -> ../dm-25
lrwxrwxrwx 1 root root 7 Oct 6 05:31 HDD2-HDD2_tdata -> ../dm-9
lrwxrwxrwx 1 root root 7 Oct 6 05:31 HDD2-HDD2_tmeta -> ../dm-8
lrwxrwxrwx 1 root root 8 Oct 6 05:31 HDD2-HDD2-tpool -> ../dm-24
lrwxrwxrwx 1 root root 8 Oct 6 05:31 HDD2-vm--100--disk--0 -> ../dm-27
lrwxrwxrwx 1 root root 8 Oct 6 05:31 HDD2-vm--300--disk--0 -> ../dm-26
lrwxrwxrwx 1 root root 8 Oct 6 05:31 HDD3-HDD3 -> ../dm-11
lrwxrwxrwx 1 root root 7 Oct 6 05:31 HDD3-HDD3_tdata -> ../dm-7
lrwxrwxrwx 1 root root 7 Oct 6 05:31 HDD3-HDD3_tmeta -> ../dm-6
lrwxrwxrwx 1 root root 8 Oct 6 05:31 HDD3-HDD3-tpool -> ../dm-10
lrwxrwxrwx 1 root root 8 Oct 6 05:31 NVMe1-NVMe1 -> ../dm-13
lrwxrwxrwx 1 root root 7 Oct 6 05:31 NVMe1-NVMe1_tdata -> ../dm-1
lrwxrwxrwx 1 root root 7 Oct 6 05:31 NVMe1-NVMe1_tmeta -> ../dm-0
lrwxrwxrwx 1 root root 8 Oct 6 05:31 NVMe1-NVMe1-tpool -> ../dm-12
lrwxrwxrwx 1 root root 8 Oct 6 05:31 NVMe1-vm--300--disk--0 -> ../dm-14
lrwxrwxrwx 1 root root 8 Oct 6 05:31 NVMe1-vm--302--disk--0 -> ../dm-15

Plan was to add mapping and mount it to a other VM or LXC...just to safe the data.
root@pve1:~# lvdisplay /dev/pve1/NVMe1-vm--300--disk--0
Volume group "pve1" not found
Cannot process volume group pve1
I was trying kpartx, but stop at that point. kpartx is installed, for lvdisplay i need some more packages ? now im a bid in fear ;)
When i try "root@pve1:~# kpartx -av /dev/mapper/NVMe1-vm--300--disk--0" i can crash the data at that VM ?

What will be the best way to read and copy that data away ?
 
ha !...get a mistake: lvdisplay search under /dev/mapper/....
root@pve1:~# lvdisplay /dev/mapper/HDD2-vm--300--disk--0
--- Logical volume ---
LV Path /dev/HDD2/vm-300-disk-0
LV Name vm-300-disk-0
VG Name HDD2
LV UUID zB0G1P-DBf9-XZ6T-cu0X-C28x-QyjY-Y3J8d9
LV Write Access read/write
LV Creation host, time pve1, 2023-01-25 19:44:54 +0100
LV Pool name HDD2
LV Status available
# open 0
LV Size 980.00 GiB
Mapped size 39.50%
Current LE 250880
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:26

root@pve1:~# lvdisplay /dev/mapper/NVMe1-vm--300--disk--0
--- Logical volume ---
LV Path /dev/NVMe1/vm-300-disk-0
LV Name vm-300-disk-0
VG Name NVMe1
LV UUID hEidQA-CMIW-1JyC-JfuK-EXRC-qy11-q1zAlP
LV Write Access read/write
LV Creation host, time pve1, 2023-01-25 20:17:26 +0100
LV Pool name NVMe1
LV Status available
# open 0
LV Size 1.96 TiB
Mapped size 38.74%
Current LE 514560
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:14
I think both VM-Disk are there and healthy. What is the best way to copy that data to a third HDD?