Copy lvm disks from HDD-1 to HDD-2

jgswinkels

Member
Jul 20, 2021
10
0
6
62
Hi All,
I have a non working Proxmox 7.1 installation after the latest upgrade to pve-manager/7.1-10/ Non production repo.
The disk is one SDD.
I spend 2 days debugging grub errors / boot errors .. I stop now fixing the original disk.
I ONLY need the vmdisks located in the lvm volumes.

Under ESX you attach a second HDD next to a new ESX installation and just copy all the VMdisk to other location.

My ProxMox steps:
I created a new Proxmox 7.1 installation on new SSD. Updated to latest pve-manager/7.1-10/ Non production repo. -> reboot -> OK working ..
What are the following steps if I attach the "old" disk next to the new installation.
I have already seen lvm errors

step 1: ??? something has to be done to be able to run the LVM to make the old disks available next to the new installation.
Step 2: attach the old hdd next to the new installed disk and copy the data -> how to do this ?

Thanks in advanced.
 
I found the solution from my old Unix Guru
If you have a non bootable Proxmox HDD you boot a Ubuntu live CD, Mount your Proxmox HDD .. Mount /mnt/nas towards a NAS.
lsblk -> you see the name of the disks and /dev/dm-<number>
then dd if=/dev/dm1 of=/dev/nas bs=1024 -> this will dump the lvm onto NAS.
Also save the /etc/pve/qemu-server VM configurations ...
Then re-install proxmox again
Restore the VM configurations or create new VM's incl. the disks.
Mount NAS again and DD in reverse order and overwrite the newly created lvm's
umount nas ..
Disks are restores again :-)