Open jgoerzen opened 10 years ago
@jgoerzen Any idea how can this be accomplished with systemd?
I have this issue on Ubuntu as well. I have to restart most of my services after boot, since they failed to start due to their ZFS partitions not being mounted yet.
I have this issue on Ubuntu as well.
The packages for Utopic now have a /etc/init/zpool-import.conf
enhancement that should generally resolve this kind of issue on Ubuntu. Feedback would be appreciated, especially with nested block device configurations like DM or LUKS.
In my dailies (0.6.3+) I added the ZFS_INITRD_ADDITIONAL_DATASETS
to mount, in the initrd, any filesystem other than the root fs.
# List of additional datasets to mount after the root
# dataset is mounted.
# The init script will use the mountpoint specified in
# the 'mountpoint' property value in the dataset to
# determine where it should be mounted.
#ZFS_INITRD_ADDITIONAL_DATASETS="rpool/ROOT/usr_local"
This is also part of my #2087 pull request.
This is on Debian wheezy.
I have datasets like so:
When the system boots, /etc/init.d/zfs-mount is running too late. Other things are running first, such as syslog, LVM, etc. They are creating directories under /var. When zfs-mount runs, /var is no longer empty, and it refuses to mount it. This results in a non-working system.
The workaround I have documented at http://wiki.complete.org/ConvertingToZFS#zfs_mounting_workaround_.28for_separate_.2BAC8-usr.2C_.2BAC8-var.29 is:
Edit /etc/insserv.conf, and at the end of the $local_fs line, add zfs-mount (without a plus).
And, edit /etc/init.d/zfs-mount and change the three lines near the top to:
Additionally, for people that have a zpool atop dm-crypt, this will not work well. They need to set Required-Start: cryptdisks-early and add zpool import -a one line before zpool mount -a in /etc/init.d/zfs-mount. They also must edit mountall-bootclean.sh to set "Required-Start: mountall zfs-mount".
These are probably not the correct fixes for going in this package, but I am documenting them here as a starting point anyhow.