Cannot check "backup" for pseudo shared ZFS storage

buco

New Member
Feb 22, 2023
19
5
3
Hi,

I just reconfigured 2 local NVME disks to be ZFS ~pseudo shared storage across 2 hosts. I know it's not ideal but I'd also like these zpools to be a temporary backup location. But in Datacenter > Backup > sharedzfs > edit > drop down "content" I cannot select "backup". It's not visible. Also if I add it to /etc/pve/storage.cfg, I cannot use it as a target location for backups. in Datacenter > backup > some config.

This is my storage.cfg. Even if I add ,backup manually to sharedzfs (which I thought might not be the best idea), does not seem to have an effect.
Code:
root@hades:~# cat /etc/pve/storage.cfg 
dir: local
    path /var/lib/vz
    content snippets,images,vztmpl,iso,rootdir,backup
    shared 0

lvm: sabnzb
    vgname pve
    content rootdir,images
    nodes hades
    shared 0

zfspool: sharedzfs
    pool sharedzfs
    content rootdir,images
    mountpoint /sharedzfs
    nodes pve2,hades
 
It is not possible to write directly to ZFS with vzdump. It only works if you create the backup mount as a directory.
 
  • Like
Reactions: buco
Correct, I also created a Directory on /sharedzfs where the zpool is mounted and now it works.
 
I currently have 2 hosts with 2 NVME disks in them that have a ZPOOL with exactly the same name. Then I put up a replication task to the other node. I still need to add another host to get quorum (you need 3 hosts at least) but the end idea would be that I have High Availability without a NAS or SAN. I can also migrate faster since most of the data is already on the other host.

Possible downside is that I might lose some data. ZFS replication uses cron I guess, and the minimum resolution is one minute. So if you have eg. a live database that cannot afford to lose even one second of work, this is not a good solution. I have eg. my DNS/DHCP/intranet server replicate every day. If one host fails it would restart from the newest snapshot which is max 24h old. That's no problem for me at home here.

The difference with a NAS/SAN as shared storage is that if one host would fail, it would take down the VM and immediately restart on another host, virtually losing no data except for the time between it crashing and being back up on another host.

The reason I use ZFS pseudo shared storage is I want to avoid the complexity and extra power consumption of handling a NAS/SAN in my home network. That with I don't mind losing a bit of data on said VMs. I have one influxdb server which keeps track of the power consumption at home. That replication is schedule is set to 5 minutes. I can live with losing 5 minutes.