March 7, 20233 yr So I was able to import my ZFS pools from Truenas Scale successfully with the ZFS plugin (excited and patiently waiting for 6.12), which is awesome. The way you do it in Scale (after disabling their horrible apps and running docker bare-metal) is basically set up a pool (NVME for me) with a /docker dataset and /docker_volumes dataset (appdata I guess). I was able to replicate this in UNRAID after importing my ZFS pools, by setting the docker directory to directory mode and pointing at my existing docker and docker_volumes datasets as shown below. I then installed portainer and everything came right up. I'm pretty sure I could even dual boot into Scale and it would still work since the data structure is untouched (haven't tried, but pretty cool/interesting). My question is that I don't see a /etc/docker/daemon.json file. I may have read it's because UNRAID runs off RAM that /etc/ gets wiped. I'm guessing there must still be a docker daemon.json file somewhere? Where does it reside, and/or how do I make sure "storage-driver" is set to overlay2? Overlay2 is important when running docker on ZFS because other drivers have bad performance and/or generate tons of snapshot/image files. What storage driver is the docker daemon set to right now? Thanks in advance.
November 23, 20232 yr Not sure if you've got anywhere with this, came here googling and ended up figuring out a solution. Unraid sets all the parameters it uses for docker directly on the flags in the service file in /etc/rc.d/rc.docker (symlink to /usr/local/etc/rc.d/rc.docker), which is where it chooses the storage driver: The issue here is that even if you were to persist the daemon.json by putting it in /boot/config and creating a script to copy it back on boot, you'd still not be able to change the storage driver as docker does not allow you to override the flags (and won't even start at all): From what I can tell the service file is actually kept in /boot/bzfirmware, which unpacks to the /usr directory on boot. To modify the original file, you'd need to change the file within the bzfirmware archive, then update the checksum (assuming that's possible). Not great, and your changes would get overridden when updating unraid! A slightly more practical solution would be to modify the unpacked file during boot, using a script something like the below which you'd execute from /boot/config/go: # Comment out existing BACKINGFS line, and add BACKINGFS=xfs sed -i "s/^BACKINGFS=.*$/#&\nBACKINGFS=xfs/" /etc/rc.d/rc.docker Which results in this, and a happy docker: Overall not that big of a hassle, but shame unraid doesn't let you configure this yourself.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.