Considering to migrate away from Docker to get ZFS for my Nextcloud Server

Hello there. I’ve recently upgraded from a raspberry pi to a home server based on a Ryzen 1700x I got from eBay Kleinanzeigen (German website comparable to Craigslist). I run a couple of things, all in Docker containers, but the main show is Nextcloud. It runs in a Docker container with a volume for the data. There are also separate containers for the database and a NFS server. I’m using Debian 10 as the base System. Didn’t want to spend to much initially so I waited on buying hard drives until yesterday. Now that I have more than a small SSD I want to create a proper raid-z array to really start using it as a NAS. Besides the redundancy I would also like to use snapshots for file versioning. Nextcloud has a plugin to support that. While preparing to set things up today I realized that the abstraction Docker volumes provide won’t allow me to use ZFS’s advanced Features from inside the container. This combined with my continued ogling towards BSD gives me the following choices moving forward:

  1. The path of the lazy: Forget about versioning, just mount the zpool on the host and move the Docker volume onto it.
  2. The path of the ugly: Keep the current setup mostly as is, but copy the contents of the docker volume to the zpool, give the container the CAP_SYS_ADMIN capability and directly pass the zpool to it. This would give me what I want at the cost of giving up the isolation between container and host.
  3. The path of balance: Forget about the docker container for Nextcloud. Set up a FreeBSD VM, migrate the Nextcloud installation to it and mount the zpool from within the VM.
  4. The path of the brave: Abandon Linux as a host altogether and switch to FreeBSD as a host. Backup all the other docker containers and spin them back up in a Linux VM. Nextcloud runs either directly on the host or in a jail, using ZFS.
  5. The path of the foolish: The path of the brave but I try to shoehorn it onto TrueNAS Core.

I’d like to hear opinions about any of those options, especially cautionary tales or hymns of praise regarding BSD since I’ve never used any.

1 Like

Personally I’d go with either idea 2 or 5.

But what has to be said for idea 2 is that you do not need to add the ADMIN cap at all since the Add-on doesn’t do snapshotting on its own. You only have to mount the snapshot-directory into the container and make the snapshots externally!

SCALE is pretty nice btw. I have tried it out for some time now and it’s been pretty stable so far. But you’ll have to learn some k3s if you want to do it in there :wink:

As @modzilla mentioned, you only need to give it a path template for versions.

So the addon doesnt actually interact with any ZFS specific features? That makes things a lot easier, thanks. What is SCALE? Never heard of it.

SCALE basically is TrueNAS Core with a debian base plus better replication / clustering support with gluster + k3s. It’s not out yet but will be in beta in summer if I’m not mistaken. Might be worth the wait: TrueNAS SCALE DevNotes