[SOLVED] Get container data from old disk

dsh

Well-Known Member
Jul 6, 2016
45
3
48
35
I rent a dedicated server in remote datacenter and now hard disk is failing.

So hard disk is going to be replaced and old disk will be attached for few hours.

Since my storage is over 80% I can't backup my lxc container with biggest disk(about 3tb) on local disk.

For small containers, I already backed up offsite, and planning to restore on fresh proxmox server on new disk.

But I am not sure about biggest containerI. Is there a way to access container data on old disk?
 
On which storage type do you have your containers?
 
It seems I just can't mount.

lvscan show

inactive '/dev/pve/swap' [8.00 GiB] inherit
inactive '/dev/pve/root' [96.00 GiB] inherit
inactive '/dev/pve/data' [3.52 TiB] inherit
inactive '/dev/pve/vm-101-disk-0' [8.00 GiB] inherit
inactive '/dev/pve/vm-103-disk-0' [8.00 GiB] inherit
inactive '/dev/pve/vm-105-disk-0' [2.00 TiB] inherit
inactive '/dev/pve/vm-102-disk-0' [8.00 GiB] inherit
inactive '/dev/pve/vm-106-disk-0' [8.00 GiB] inherit
inactive '/dev/pve/vm-107-disk-0' [8.00 GiB] inherit
inactive '/dev/pve/vm-200-disk-0' [8.00 GiB] inherit
inactive '/dev/pve/vm-109-disk-0' [8.00 GiB] inherit
inactive '/dev/pve/vm-104-disk-0' [1000.00 GiB] inherit
inactive '/dev/pve/vm-100-disk-0' [200.00 GiB] inherit
ACTIVE '/dev/pve/swap' [8.00 GiB] inherit
ACTIVE '/dev/pve/root' [96.00 GiB] inherit
ACTIVE '/dev/pve/data' [<3.49 TiB] inherit

1. I'd like to access old disk's dump folder and get backed up images.

2. Ideally somehow migrate pct 105, 104, 100 to current proxmox.


UPDATE:

I downloaded all offsite backup and tried to restart but it won't allow because same lvm name.
So I changed with following command
vgrename "old disk's VG UUID" pve-old

So far, restored small containers.

After activating all LV, it looks like this.

ACTIVE '/dev/pve-old/swap' [8.00 GiB] inherit
ACTIVE '/dev/pve-old/root' [96.00 GiB] inherit
ACTIVE '/dev/pve-old/data' [3.52 TiB] inherit
ACTIVE '/dev/pve-old/vm-101-disk-0' [8.00 GiB] inherit
ACTIVE '/dev/pve-old/vm-103-disk-0' [8.00 GiB] inherit
ACTIVE '/dev/pve-old/vm-105-disk-0' [2.00 TiB] inherit
ACTIVE '/dev/pve-old/vm-102-disk-0' [8.00 GiB] inherit
ACTIVE '/dev/pve-old/vm-106-disk-0' [8.00 GiB] inherit
ACTIVE '/dev/pve-old/vm-107-disk-0' [8.00 GiB] inherit
ACTIVE '/dev/pve-old/vm-200-disk-0' [8.00 GiB] inherit
ACTIVE '/dev/pve-old/vm-109-disk-0' [8.00 GiB] inherit
ACTIVE '/dev/pve-old/vm-104-disk-0' [1000.00 GiB] inherit
ACTIVE '/dev/pve-old/vm-100-disk-0' [200.00 GiB] inherit
ACTIVE '/dev/pve/swap' [8.00 GiB] inherit
ACTIVE '/dev/pve/root' [96.00 GiB] inherit
ACTIVE '/dev/pve/data' [<3.49 TiB] inherit
ACTIVE '/dev/pve/vm-101-disk-0' [8.00 GiB] inherit
ACTIVE '/dev/pve/vm-102-disk-0' [8.00 GiB] inherit
ACTIVE '/dev/pve/vm-103-disk-0' [8.00 GiB] inherit
ACTIVE '/dev/pve/vm-106-disk-0' [8.00 GiB] inherit
ACTIVE '/dev/pve/vm-109-disk-0' [8.00 GiB] inherit
ACTIVE '/dev/pve/vm-200-disk-0' [8.00 GiB] inherit

Now how to restore vm 100, 104, 105 from it?
 
Last edited:
If you managed to activate the now renamed LV you can try the following:

Recreate the Containers in the new installation and use dd to copy the old container file system to the new one.

The LVs should show up as devices in /dev/mapper/ or alternatively in /dev/<VG name>/<disk name>.

Be careful though when doing this as you could destroy your data if you copy the wrong way!
 
If you managed to activate the now renamed LV you can try the following:

Recreate the Containers in the new installation and use dd to copy the old container file system to the new one.

The LVs should show up as devices in /dev/mapper/ or alternatively in /dev/<VG name>/<disk name>.

Be careful though when doing this as you could destroy your data if you copy the wrong way!
You are the best!
 
You're welcome!

Please mark this thread as solved if it all worked out for you.
 

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!