This repository is archived and is not maintained anymore. Use at your own risks.
This RancherOS system service bootstraps a single ZFS pool and import it on system start.
sudo ros service enable zfs
sudo ros service up zfs
# It might take some time (10 to 20 minutes)
# You can follow the progress of the build, in another session, via:
sudo ros service logs --follow zfs
# Check ZFS is enabled
lsmod | grep zfs
sudo ros config set rancher.repositories.zfs-setup.url https://raw.githubusercontent.com/Evaneos/rancher-os-zfs-setup/v0.1.0
sudo ros service enable zfs-setup
sudo ros service up zfs-setup
# You can follow the progress of the setup, in another session, via:
sudo ros service logs --follow zfs-setup
This service has been created for docker-machine
in order to use ZFS and its snapshot and versioning capabilities on a local machine.
The official documentation about using ZFS on RancherOS is cumbersome and quite incomplete.
Furthermore, the specific needs of a local docker-machine
are not covered:
- creating a ZFS pool from a file (since we cannot use a block device)
- making the ZFS pool persistent across restarts
Note that, however, docker-machine
is in maintenance mode.
This service has 2 flows: the setup and the import/start.
The setup is run the first time to create the ZFS pool.
The import/start is run every time the machine starts in order to import and mount the ZFS pool.
You can customize a few element used by the service.
Note the Setup only column: if yes
, the configuration element will only be used when setting up the ZFS pool.
Path | Type | Default | Setup only |
---|---|---|---|
rancher.zfs_setup.pool_size |
numfmt compliant valueeg. 25Gi |
Left space - 2Gi | yes |
This service is solely thought for docker-machine
and does not aim to fit other needs for now.
# [...]
Detecting the provisioner...
Unable to verify the Docker daemon is listening: Maximum number of retries (10) exceeded
In general, you just have to wait a bit (30 seconds to 1 minute) and the docker daemon will then start.
Per RancherOS and its ZFS design, importing the ZFS pool and starting the docker service can take some time. As a matter of fact, if docker-machine
allowed 1 or 2 more retries, this would not be an issue.
- Using ZFS [official docs]
- System services [official docs]
- Rancher OS core services [github]
- Conflict between ZFS storage & overlay driver [github issue]