From ab7f9c1f98d63c9e39008a8a2ab138093c82ce12 Mon Sep 17 00:00:00 2001 From: Dominik Honnef Date: Wed, 25 May 2016 20:38:48 +0200 Subject: Import and mount ZFS at boot time (#46) --- core-services/03-filesystems.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'core-services/03-filesystems.sh') diff --git a/core-services/03-filesystems.sh b/core-services/03-filesystems.sh index c07dfd1..9bb3db4 100644 --- a/core-services/03-filesystems.sh +++ b/core-services/03-filesystems.sh @@ -30,6 +30,22 @@ if [ -e /etc/crypttab ]; then fi fi +if [ -e /etc/zfs/zpool.cache -a -x /usr/bin/zfs ]; then + msg "Activating ZFS devices..." + zpool import -c /etc/zfs/zpool.cache -N -a + + msg "Mounting ZFS file systems..." + zfs mount -a + + msg "Sharing ZFS file systems..." + zfs share -a + + # NOTE(dh): ZFS has ZVOLs, block devices on top of storage pools. + # In theory, it would be possible to use these as devices in + # dmraid, btrfs, LVM and so on. In practice it's unlikely that + # anybody is doing that, so we aren't supporting it for now. +fi + [ -f /fastboot ] && FASTBOOT=1 [ -f /forcefsck ] && FORCEFSCK="-f" for arg in $(cat /proc/cmdline); do -- cgit 1.4.1