Cloudron on ZFS
-
I am a new Cloudron user and most everything I have uses the ZFS file system. I have a Docker install on my desktop and I had to create the following daemon.json:
{
"ip" : "127.0.0.1",
"storage-driver": "zfs"
}I am trying to install Cloudron on a new Ubuntu 20.04 install and there does not seem to be any method for selecting ZFS as the storage. The install process fails partway through with complaints about the file system type.
The invocation for the install seems to be this:
/etc/systemd/system/docker.service.d/cloudron.conf
I set storage-driver=zfs and tried to restart the install. This complains about pre-existing nginx packages. I guess my next step will be letting it install on ext4 and then trying to doctor it to use ZFS after the fact.
This is extremely clumsy and it's not clear to me why ZFS would not be directly supported.
-
@NetwarSystem Searching helps sometimes:
https://forum.cloudron.io/post/29375
https://forum.cloudron.io/post/4439 -
@necrevistonnezr The first one is very long and the author presumes readers may have heard about ZFS, but never used it. The second is much more sparse but still ... not 100% coverage.
When I installed Docker on my workstation I ran into trouble, finally found that Docker wants to know the underlying file system type. Once that was done it just runs and automatically uses ZFS features.
The steps to getting Cloudron using ZFS are as follows:
Install Cloudron as you normally would.
Stop Docker service & socket.
Move /var/lib/docker to var/lib/sinker.
Create ZFS dataset.
zfs set mountpoint=/var/lib/docker mydataset/whatever.
mv /var/lib/sinker/* /var/lib/docker
Edit this file, replacing "overlay2" with "zfs"
/etc/systemd/system/docker.service.d/cloudron.conf
And then restart Docker. You'll find a bunch of child datasets, in my case for onetb/docker, as well as a bunch of snapshots of those datasets.
Other than using the ZFS file system, I'm not sure what's going on here, but my setup is just for R&D, so I don't mind having spent a couple hours to get it going.
-
@NetwarSystem maybe to save some time, currently Cloudron only officially supports ext on the host and overlay2 for docker. The host file system is mostly just because that is what the majority of VPS provider have by default and thus limiting the complexity for a system like Cloudron to operate with as little side-effects as possible. Unless there is a real benefit for the Cloudron use-case I don't think we will support ZFS anytime soon.
-
ZFS is not supported/untested. I would say please open a feature request in the feature request category if this is required and we have to analyze the benefits/use case.
-
-