Copy lvm disks from HDD-1 to HDD-2

jgswinkels

Member
Jul 20, 2021
10
0
6
61
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 :)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!