Background:
I am about to migrate my Nextcloud server from a TurnKey Linux LXC container to a Docker setup. I will create an LXC container that will run my docker setup. My reason for doing so is that the TurnKey LXC container I have been using so far has been a hassle to keep up to date, especially the “support” parts like MariaDB, PHP, etc.
Question:
What is the best practice for carving out ZFS Datasets on proxmox for a container set like this. I am planning to have differentiated datasets for different parts in order to be able to tune ZFS and the underlying storage layers to suit their uses. While this split is partly specific to Nextcloud, I am of the opinion, that it does have a wider use across other (self-hosted) server installations, like Immich, etc.
My planned datasets are:
| dataset | storage type | use | ZFS tuning |
|---|---|---|---|
| rpool/[…]/vmdatanvme/nextcloud | nvme | nextcloud parent dataset | compression=zstd, atime=off, recordsize=128K |
| rpool/[…]/vmdatanvme/nextcloud/rootfs(*) | nvme | nextcloud container boot disk | (inherited tuning) |
| rpool/[…]/vmdatanvme/nextcloud/db-mariadb | nvme | nextcloud database | (inherited tuning), recordsize=16K, logbias=throughput |
| rpool/[…]/vmdatanvme/nextcloud/redis | nvme | nextcloud redis database cache | (inherited tuning), recordsize=64K |
| tank/[…]/vmdatahdd/nextcloud/storage | hdd, possibly ssd | nextcloud file storage | (inherited tuning), recordsize=1M |
If I create all but the container rootfs dataset, they are all in a neat package, and I can add storage datasets for Collabora and other supporting server containers under the nextcloud dataset package(s)
creating the rootfs during LXC container creation, using the Web UI, it will create the rootfs dataset under rpool/[…]/vmdatanvme/subvol-1001-disk-0 and thus outside of my dataset “package”. I could create an extra zfs-based storage for rpool/[…]/vmdatanvme/nextcloud, but that scales badly to other hosts and other containers.
If I create the rootfs dataset upfront, i break the way proxmox sets up disks - will that give problems when I have a proxmox cluster?