zfsonlinux / pkg-zfs

Native ZFS packaging for Debian and Ubuntu
https://launchpad.net/~zfs-native/+archive/daily
308 stars 55 forks source link

ZFS on Ubuntu16 (booting from non-zfs volume) does not mount /var from ZFS-Dataset #235

Open typoworx-de opened 4 years ago

typoworx-de commented 4 years ago

I'm trying to migrate my disk to ZFS whereas I'm using an SSD-Drive (LVM for RootFS) and a Hard-Disk as Storage for my other Data setup with ZFS.

My RootFS relies on LVM-Volume (works). I want to have '/var' and some sub-folder (like /var/www) on ZFS.

I already tried this to fixup this issue:

  1. Adding the rpool/dataset for var to /etc/init/zfs 'ZFS_INITRD_ADDITIONAL_DATASETS'

  2. zfs set mountpoint=legacy rpool/var

  3. adding rpool/var to fstab:

  4. tried the workaround mentioned in #101

  5. tried to trigger '/usr/bin/zpool import -a' with own script in '/etc/initramfs-tools/scripts/init-top/' and '/etc/initramfs-tools/scripts/init-premount/' (my 'echo' inside the script not even got shown during boot ...)

So far I'm just able to boot into recovery. Manually doing 'zpool import -a' and 'mount -a' works! But on boot it stuck on local-premount and systemd begins to complain about missing mount for '/var'!

How can this be fixed or is this only working using zfs as root also?! As mentioned currently I'm afraid of moving RootFS to ZFS as there are already so much problems just trying to make '/var' mount from ZFS rPool in place at boot already!

c0dyhi11 commented 4 years ago

@typoworx-de I have this same issue. Did you ever find a solution?