How do you add a pre-existing raw disk file to a container?

doxyproxy

New Member
Dec 12, 2022
17
0
1
Not sure if I'm yet blind again but I could not find a way to simply add an existing .raw file disk to another container. I can "add" a new mount point in the resources for the container but that seems to create problems. Like what I did last time is I let it "add" create a new disk using the add button, and after that, behind the scenes, i SWAPPED the new empty disk in /var/lib/vz/images/container#, and swapped the names of the .raw files, giving my existing raw disk with data the name of the new empty .raw that the GUI created.

The PROBLEM with this, is it seems that Backup/Restore maybe uses hashes? Because upon Backup/Restore it seems to have taken back the original empty unused filename/drive created via GUI, when it did the backup even though it was "not" being used by the container. (for context see https://forum.proxmox.com/threads/b...-even-after-added-data-storage-for-it.135278/ )

I'm also really confused why when I did the "Restore" it deleted "anything" at all from /var/lib/vz/images/container# when I see now that the restore did NOT copy the backedup files back into /var/lib/vz/images/container# but after the Restore everything is running from my /Backups folder ...

I would have assumed the RESTORE was copying the .raw drives from the Backups folder back into the main /var/lib/vz/images/container# and that's why it said it was deleting/overwriting files there, but since apparently it setup the restored container to run off drives in the /Backups folder instead, why delete any of my files in the original location? Its pretty confusing...would appreciate some pointers or link to some docs explaining, thx
 
Last edited:

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!