Restoring LXC container - dislocated mount

SDMDS

Member
Jan 24, 2022
14
0
6
35
Hi,
I've got a really simple LXC container (VM-101-disk-0) that runs in my local-lvm storage.
Mounted (mp0) is a second container (VM-101-disk-1) that runs on my local-extra storage.

When destroying the LXC container, both are deleted. Then when recreating VM-101-disk-0 it also recreates VM-101-disk-1. However both end up on local-lvm

This becomes a bit problematic as disk 0 is a small light weight container and disk 1 is a large file storage.

Any suggestion on what might be wrong?
 
you are mixing up terminology a bit - I'll try to clear things up..

you have a container (101) with two mountpoints (rootfs, small, on local-lvm, and mp0, large, on local-extra). you are correct that when you destroy a container, all volumes are destroyed as well. when you recreate it (from a backup) the GUI only gives you the choice of selecting a single target storage.

if you want a more advanced restore, you can use the CLI/API (pct restore ...): https://pve.proxmox.com/pve-docs/pve-admin-guide.html#_backup_and_restore . alternatively, you could restore to your large storage and move the rootfs to the smaller storage afterwards (while the container is not running ;)) - this can be done on the GUI ("Move Volume" button in the container 'Resources' view).
 
  • Like
Reactions: Merkurs and SDMDS
you are mixing up terminology a bit - I'll try to clear things up..

you have a container (101) with two mountpoints (rootfs, small, on local-lvm, and mp0, large, on local-extra). you are correct that when you destroy a container, all volumes are destroyed as well. when you recreate it (from a backup) the GUI only gives you the choice of selecting a single target storage.

if you want a more advanced restore, you can use the CLI/API (pct restore ...): https://pve.proxmox.com/pve-docs/pve-admin-guide.html#_backup_and_restore . alternatively, you could restore to your large storage and move the rootfs to the smaller storage afterwards (while the container is not running ;)) - this can be done on the GUI ("Move Volume" button in the container 'Resources' view).
Thank you fabian, sorry for the terminology mix. The GUI tools should be sufficient, even though the CLI is probably more powerful. I think a lot of admins are moving more and more towards GUI-tools as there is no way to intuitively remember all command line tools.