Last Updated:

OMV7 with ZFS

Tane Harre
Tane Harre OMV 7

Open Media Vault 7 is a rock solid favorite of mine and the file-system ZFS is perfect for a backup server especially since in mirror mode it can check and correct data corruption. So this post is how to setup up a ZFS mirror on OMV7.

There are a couple of other things that have finalised my decision to use ZFS. I was using BTRFS which was fine but every now and then it would use a lot of resources, usually at the wrong time. Additionally, I have 8GB of RAM in my server so I don't have to worry about ZFS and RAM usage.

Finally though, I went to set it up the other day using EXT4 in a MD mirror and it took 8 hours to re-sync the disks and about 15 hours to copy the old data over. With ZFS there is no re-sync and, as it is caching to RAM, the 15 hours of data transfer becomes around 5?

OMV 7 Installation

There are already good installation documents at omv-extras.org so I won't duplicate them. You can find them for amd64 here

Before disconnecting the monitor and keyboard (if you are going headless) it is a good idea to login as root,

apt update && apt upgrade

Reboot and login again then use omv-firstaid to set your static IP address and the password for the admin user to be used with the web-page workbench,

omv-firstaid

Shutdown, disconnect all the wiring except the network and the power and then boot.

First login

Go to System/Certificates/SSL and generate a new cert by clicking the + sign and then Create. 

Apply pending change...

Go to System Workbench and enable SSL/TLS, choose your Certificate and Force SSL/TLS. 

Change Auto logout to 60mins if wanted.

Apply pending change...

Accept cert and log back in.

OMV Extras

OMV extras is a set of community maintained plugins and documentation outside the core functions of OMV7. To install them ssh into your server and enter the command,

wget -O - https://github.com/OpenMediaVault-Plugin-Developers/packages/raw/master/install | bash

Then use ctrl + shift + r to refresh the workbench afterwards. The only changes will be a new System/omv-extras tab and a lot more plugins available under System/Plugins.

Install Proxmox kernels and openmediavault-zfs

Proxmox kernels

Go to System/Plugins and search openmediavault-kernel. Install it. The page should then auto-refresh but if not then ctrl + shift + r to refresh it.

Go to System/Kernel and then click on the promox icon and install one. Then install another as a fall back. I tend to choose the oldest and the second newest. It may take some time to generate the initramfs for each of them.

Make the second newest kernel the default kernel and reboot.

Do not remove the non-proxmox kernels until you have tested the proxmox kernel boots on your hardware!

After rebooting, logging in, etc...Go to System/Kernel again and choose remove non-proxmox kernels. It is in the same menu for installing the Proxmox kernels.

ZFS

Go to System/Plugins and search openmediavault-zfs. Select and install it. After a page refresh you should have a new entry under Storage/Disks called ZFS. Click on that and then choose Pools. 

To create a new pool click on the + sign, and select add pool. Give it a name (do not choose a root file system name), raid type (mirror in my case), add your devices (/dev/sda and /dev/sdb) and I choose compression.

Apply pending change...

And now you should have a ZFS pool mounted under the name you gave it. For instance, if you called it data then it will be mounted under /data.

The next step is probably to create some users and some shares under Storage/Shared Folders. Or, in my case, to import my old data from the other backup.