ZFS Datasets dissappear on reboot

Solution 1:

Please make sure the zfs service (target) is enabled. That's what handles pool import/export on boot/shutdown.

zfs.target loaded active active ZFS startup target

You should never have to struggle with this. If you have a chance, run an update on your zfs distribution, as I know the startups services have improved over the last few releases:

[root@zfs2 ~]# rpm -qi zfs
Name        : zfs
Version     :
Release     : 1.el7.centos

Solution 2:

ok, so the pool is there, which means the problem is with your zfs.cache, it is not persistent and that is why it looses its config when your reboot. what I'd suggest to do is to run:

      zpool import zfsPool 
      zpool list 

And check if the if it is available. Reboot the server and see if it comes back, if it doesn't then perform the same steps and run:

      zpool scrub

Just to make sure everything is alright with your pool etc.

Pls also post the content of:


Alternatively, if you are looking for workaround to this issue you can set it of course as follow.

Change the value in from 1 to 0:


and add the following to your /etc/rc.local:

    zfs mount -a

That will do the trick.

Solution 3:

I also had the problem of the zfs disappearing after a reboot. Running CentOS 7.3 and ZFS Reimporting brought it back (zpool import zfspool) only until the next reboot.

Here's the command that worked for me (to make it persist through reboots):

systemctl preset zfs-import-cache zfs-import-scan zfs-mount zfs-share zfs-zed zfs.target

(Found this at: https://github.com/zfsonlinux/zfs/wiki/RHEL-%26-CentOS )