First steps to create a ZFS mirror

Aug 2, 2020
20
2
23
68
So I have a PVE setup on an /dev/nvme1n0 (OS only) and two blank 1TB disks that I want to use for storage of VM's, templates etc.

Should I create an md (software raid) before adding the mounted mirror as a Directory?

Or would it be better to let PVE create a ZFS mirror from the two blank disks? If so, what are the steps to achieve this?

The third step that I see (for now) is to manually create and mount a dataset, and then use the GUI to add the mounted directory as new Storage

mkdir /mnt/zfs-vm
zpool create zfspool1 mirror /dev/sda /dev/sdb
zfs set mountpoint=/mnt/zfs-vm zfspool1


Any advice for a beginner?
 
Yes you can use Softwareraid (mdadm) too, but it is not official support. We recommend using a hardware raid controller or ZFS Raid [1].
For ZFS you can also use the WebUI, which will take care of all the steps for you. Here is an example with a mirror:

Screenshot_20241023_155131.png

If you want to create an extra dataset for the VMs, uncheck the “Add Storage” checkbox (create the pool only). Then create a new dataset on the CMD with “zfs create <pool>/<dataset>”.
After you are able ton add this as ZFS VM storage [2] under “Datacenter -> Storage”.

The third step that I see (for now) is to manually create and mount a dataset, and then use the GUI to add the mounted directory as new Storage
You can do this, but do not use the directory store (ZFS) for VMs or containers. You would be using cow on cow. For ISO images, backups... perfectly ok. You don't have to specify a mountpoint either, it is created automatically when you create a dataset. Unless you want to change it.


[1] https://pve.proxmox.com/pve-docs/pve-admin-guide.html#chapter_zfs
[2] https://pve.proxmox.com/pve-docs/pve-admin-guide.html#storage_zfspool
 

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!