[SOLVED] ZFS volume not shown anymore after restoring backup

maturos

Member
Apr 26, 2022
34
3
13
I have an lxc container running nextcloud. It has two volumes. This screenshot is taken before restoring a backup:
1707308327775.png
The mount point contains the nextcloud data (excluded from backup), the root disk contains the os and the software system.
After restoring backup it looks like this:
1707308402010.png
My 2TB volume which was not backed up is not shown anymore. Instead i have my 2TB volume on my 400GB local-zfs storage. Before moving from a VM to lxc and zfs i was used to have a disk that is unused and that i have to reattach.

So now i called `zfs list` and i see that ma 2000TB volume has 96Kbyte used space.
1707308597121.png

I am woundering what happened to my 2TB on hdd-data and how do i fix this?
 
Okay i found disturbing logs:
Code:
2024-02-07.13:07:01 [txg:2811345] destroy hdd-data/subvol-103-disk-1 (11084) (bptree, mintxg=1) [on pve]
2024-02-07.13:07:04 zfs destroy -r hdd-data/subvol-103-disk-1 [user 0 (root) on pve:linux]
I tried to follow this instructions: https://endlesspuzzle.com/how-to-recover-a-destroyed-dataset-on-a-zfs-pool/
But exporting the pool causes an immediate import by an unknown party.
1707310293347.png
I'm really getting angry now on the system. What do i need to disable to prevent some proxmox script from reimporting the pool?
 
Last edited:
Is it really intended by Proxmox to delete a volume which is excluded from backup and creating an empty new one on the same pool as the backed up volumes are restored to?
That is indeed what Proxmox does. If your restore a VM over an existing VM, it first deletes everything and then restores the backup (which does not contain virtual disk that have not been backed up). Proxmox does not do something different if the VMID of the VM is the same as the backup. I cannot comment on why or the intention of the developers.
Best to restore to a new VMID. If you want drives that are not under control of Proxmox (and therefore not backuped up or deleted) , create them separatly from Proxmox with very different names.
 
Okay. But on my system before i had only VMs and a directory storage. If i restored a VM disks that haven't been backuped were still available but unmounted and marked as "unused". This is very confusing.
 

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!