[SOLVED] Proxmox 7.3 with ZFS also as backup location

NathanD

Member
Nov 29, 2019
16
3
23
Hi,

I've local NVME disks where Proxmox lives and have 2x 6TB as ZFS mirror. On ZFS I also want to store more than only VM's and containers, for example dumps or backups.

I found 2 threads:

https://forum.proxmox.com/threads/can-we-use-zfs-storage-as-backup-storage.100631/
https://forum.proxmox.com/threads/directories-under-zfs-pool.91796/

but can`t get it working.

zfs list shows the VM disks and these 2 datasets, where hdd_storage is created in the Proxmox GUI and hdd_storage/backup with zfs create on the commandline.
hdd_storage 46.4G 5.28T 96K /hdd_storage
hdd_storage/backup 96K 5.28T 96K /backup

On hdd_storage/backup I want to have the backups and dumps of VM's and found in the threads you need to do this and then add / check the /etc/pve/storage.cfg:

pvesm set STORAGE_NAME -is_mountpoint yes
I used as STORAGE_NAME different options: hdd_storage/backup, hdd_storage:backup, /backup and so on, but everything ended with a notice of illegal characters or update storage failed: xxxx does not exist.

How to get this working?
 
* You need to add a 'Directory' type storage (you can use the GUI for that or the appropriate `pvesm add` invocation - see `man pvesm`) pointing to the mountpoint of your backup directory - as far as I can see '/backup'
* on that Directory storage you need to enable 'backup' as content type)

That should be all.

If I misread your question please provide:
* `zfs list`
* `cat /etc/pve/storage.cfg`
* any concrete errors you run into
output in code tags as this should make things clearer for me

I hope this helps!
 
The problem is that when I use the GUI, it doesn`t let me create it, because there are no disks unused. For directories I think it is a strange message. I added all the requested info with also at last the pveversion.

Screenshot 2023-01-12 at 11-48-54 server1 - Proxmox Virtual Environment.png

Code:
root@server1:~# zfs list
NAME                        USED  AVAIL     REFER  MOUNTPOINT
hdd_storage                46.4G  5.28T       96K  /hdd_storage
hdd_storage/backup           96K  5.28T       96K  /backup
hdd_storage/vm-101-disk-0  15.5G  5.29T     3.53G  -
hdd_storage/vm-102-disk-0  15.5G  5.29T     3.21G  -
hdd_storage/vm-103-disk-0  15.5G  5.29T     3.79G  -


Code:
root@server1:~# cat /etc/pve/storage.cfg
dir: local
    path /var/lib/vz
    content backup,images,iso,snippets,vztmpl,rootdir
    prune-backups keep-all=1

zfspool: hdd_storage
    pool hdd_storage
    content images,rootdir
    mountpoint /hdd_storage
    nodes server1

Some of the tries and errors:
Code:
root@server1:~# pvesm set backup -is_mountpoint yes
update storage failed: storage 'backup' does not exist

root@server1:~# pvesm set hdd_storage/backup -is_mountpoint yes
400 Parameter verification failed.
storage: invalid format - storage ID 'hdd_storage/backup' contains illegal characters

pvesm set <storage> [OPTIONS]


root@server1:~# pvesm set /backup -is_mountpoint yes
400 Parameter verification failed.
storage: invalid format - storage ID '/backup' contains illegal characters

pvesm set <storage> [OPTIONS]
Code:
root@server1:~# pveversion
pve-manager/7.3-4/d69b70d4 (running kernel: 5.15.83-1-pve)
 
The problem is that when I use the GUI, it doesn`t let me create it,
You need to go to GUI->Datacenter->Storage - not GUI->Datacenter->node->Disks

I get that this is confusing at first - but the Disks panel is for automatically creating the needed filesystems on you physical disks, the Storage panel is for configuring existing "storages" for use within PVE - and since the storage-view is clusterwide it's under the Datacenter not under the individual node

I hope this explains it!
 
  • Like
Reactions: bentrevor
Your explanation makes it logical, but without it, it was confusing.
And now I know that my software raid1 was also good for that 2 disks, when I used the Datacenter part instead of server.
Thank you for your help!
 
  • Like
Reactions: Stoiko Ivanov

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!