2 standalone nodes and one shared NFS share - backup & restore question

m3a2r1

Active Member
Feb 23, 2020
162
5
38
47
Both nodes use NFS as vm disks storage.
What will happen if I create on first node vm with id e.g. 120, backup it and try restore it on the second node with id 101 (first node has vm 101 with hdd file on that same nfs share already). Will it overwrite my working machine?
 
I'd guess that it will at least try to overwrite the existing file. If it fails or not depends likely if file-locking etc. are in place.
Anyways it is risky and I'd recommend to use a different solution / approach.
I would recommend to have segregated ID-Pools (e.g. 100 onwards for Server1, 200 onwards for server 2, etc...)
The ID itself can easily be changed later on by renaming the VM configuration. The corresponding disk names / images take a little more effort.
once you have it done your are strategically set for a better place.
An alternative would be to use different NFS datastores or use separate folders within the same NFS store.
 
I don't want to do such operations intentionally, rather I thought about what will happen if I'll do that accidentally. I've tested it and I know now. Proxmox checks if any files exist, then creates new hard disk files with incremented number in name so it doesn't try to overwrite existing files.
But if I purge vm on one node with file deleting, it deletes all files - of course with the other machine files and whole directory.
 
sharing a shared storage between two clusters is not supported and will lead to issues like you describe. you can always just use two exports and use one for cluster A and the other for cluster B..
 
I did it for test only, deleted machine wasn't important , it was unused but backed up.
 

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!