ZFS type does not allow backup storage

Jan 31, 2014
113
10
38
I try to add ZFS storage, and want to write backups there. But only allowed contents are Disk Image and Container. Where do I put the backups?

Code:
cat /etc/pve/storage.cfg
dir: local
    path /var/lib/vz
    content snippets,vztmpl,images,backup,rootdir
    maxfiles 0
    shared 0

zfspool: vmpool
    pool rottank/vm-pool
    content images,rootdir
    nodes ns1234567
    sparse 1
The local is on SSD disk, I do not want to use that for vzdump backups.
 
Hi,

You could create a new dataset in roottank:

zfs create roottank/backup

Then go in datacenter storage an add this dataset as type directory(like local storage). After that you can use it for backup.

Good luck and many successful backups for you ;)
 
Hi,

You could create a new dataset in roottank:

zfs create roottank/backup

Then go in datacenter storage an add this dataset as type directory(like local storage). After that you can use it for backup.

Good luck and many successful backups for you ;)

I've tried this and what ends up happening is that proxmox thinks the size of the backup directory is the same as the local directory. So if local is small then the backups will fail because it thinks it's filling up the location even though there is plenty of space.

Has anybody got this working successfully?
 
I've tried this and what ends up happening is that proxmox thinks the size of the backup directory is the same as the local directory. So if local is small then the backups will fail because it thinks it's filling up the location even though there is plenty of space.

Has anybody got this working successfully?

I figured out what was going on. It's mentioned in other threads, but many of them recommend the solution without mentioning this issue. The problem is that proxmox will create the mount directory before the zfs mount happens and that ends up blocking the zfs mount. There is an option you can add to the storage called is_mountpoint, IIRC, that prevents proxmox from creating the directory itself.

I'm not sure I understand why proxmox would be creating the main directory in the first place. It seems like this is something that should be done when the storage is configured and not done otherwise. I get why it would auto create the sub directories out of convenience, but I'm not sure I see the point of creating the main directory other than at setup if appropriate. I'm sure I'm missing something, but it would seem to be a more obvious failure mode if the directory just isn't there than to have it there in the wrong spot.

Anyway, sorry for the noise. Hopefully others trying to use ZFS raids as backup storage will be able to find the solution here in the future. Might be nice to update the wiki to explain this. I think that would have saved me a good bit of time.
 
  • Like
Reactions: SamTzu

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!