Additional ZFS Volume and VM Snapshots

develi

New Member
May 29, 2018
2
0
1
Germany
I am currently using ZFS as my default storage solution for a one node PVE cluster. Each VM gets a RootFS- and SWAP-Volume from two different parts of the main pool.
If a VM stores data (e.g. personal cloud), it gets an additional ZFS volume by path, so I will pass a block device like "/dev/zvol/tank/data/myvmdata1".

Unfortunately I am not able to use the snapshot function although I checked "No Backup" for this volume. It seems that this option is only used by real backups.

How can I create a ZFS storage pool in PVE for VMs, which volumes will not be deleted if a VM is deleted? (custom naming would be a great feature, too)
If this is possible, I do not have to use the "block-device-way" and I would be able to use the snapshot functionality.

Thank you for helping!
 
ZFS dont have protection option from deleting zvol. But you may protect in other way.

Part 1 Snaps

How the Proxmox and Console do snapshots on ZFS?

Console -> zfs snap zvol@name
Proxmox -> zfs snap zvol@name -> put info in VM config file.

Looking snapshosts from console you can see all snaphosts. Proxmox shows only snaps who are in VM config file.

Part 2 Removing VM

You may be in love with GUI management but it have limits. Console don't.
If you want to remove VM but keep VM files then you can remove VM config file from /etc/pve/qemu-server/ and VM is 'gone'.
I`m just not sure about firewall. I don`t manage it from GUI.

Or you can
1. Stop VM
2. Rename zvol from console
3. Remove VM from GUI

Part 2 Supreme Console

Proxmox GUI is evolving but it still lack of dynamical way to use. Use more console (shell) to achieve what you want.
 
@Nemesiz Thank you for your long answer. I am currrently taking manual ZFS snapshots of my data volumes with Python scripts but it would be great to snapshot only specific disks with the GUI. You can do it via console (and I am currently have to do so) but it would be a nice idea to manage it with the GUI.

It seems that there is a bug report (feature request) for this, so I have to wait.
 

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!