This package contains kernel modules and userspace tools for OpenZFS.
The goal for this project was to host Apple macOS Time Machine backups on ZFS over Tailscale. General use as a replacement for btrfs/ext4 was not considered, although known incompatibilities can be found at GitHub Issues.
Due to restrictions on DiskStation Manager packages, a post-install script must be run manually as root. In addition, OpenZFS command-line tools are needed to configure pools and filesystems. You should only use this tool if you're comfortable using ssh and the commandline on your DiskStation.
Note that DiskStation Manager will want a non-ZFS storage pool. I have a 4-bay model, and used 2 drives for a mirrored non-ZFS pool, and 2 larger drives for a mirrored ZFS pool. You can put both types of pools on each drive, however this has not been tested.
See Synology Package Developer Guide for instructions on setting up your development environment.
Check out this repo into your toolkit environment (replacing "7.2" and "apollolake" with your DSM version and platform, and "2.2.5" with the desired OpenZFS release):
$ cd /toolkit/source
$ git clone https://github.com/jberkman/synozfs.git zfs
...
Download the desired release of OpenZFS:
$ cd /toolkit/source/zfs
$ wget https://github.com/openzfs/zfs/releases/download/zfs-2.2.5/zfs-2.2.5.tar.gz
...
Build the OpenZFS package:
$ sudo /toolkit/pkgscripts-ng/PkgCreate.py -v 7.2 -p apollolake -c zfs
...
The resulting package is found in /toolkit/result_spk/zfs-2.2.5-0001/zfs-x86_64-2.2.5-0001.spk
(or similar).
Install the package on your DiskStation:
- Open Package Center
- Click Manual Install in the upper right
- Select the package file built in the previous step
- A third-party developer warning dialog will appear
- Click Agree
- Check "I accept the terms of the license agreement" and click Next
- Click Done
To complete installation, run the post-installation script as root:
$ ssh diskstation
...
user@diskstation:~$ sudo /var/packages/zfs/scripts/postinst
...
Reboot, either using the command-line or the admin console.
Search the Web for existing tutorials on configuration of ZFS pools and filesystems.
I was not able to get the Synology Samba server to work well with ZFS, so made a Samba Docker package to provide the Time Machine SMB shares.