You are not logged in.

#1 2016-07-20 10:41:30

rosscosack
Member
Registered: 2016-07-20
Posts: 2

[SOLVED] ZFS Imports on reboot but does not mount

I installed ZFS using the arch wiki and everthing is working well accept when I reboot the zpool is not mounted automatically.
The zpool is imported and I can confirm this with

zpool status

When I export the zpool and then re-import, the zpool imports and mounts as expected.

The only clue I have is

# zpool get cachefile tank
NAME  PROPERTY   VALUE      SOURCE
tank  cachefile  -          default

 
where I would expect the value to be

/etc/zfs/zpool.cache

Trying to re-set with

# zpool set cachefile=/etc/zfs/zpool.cache tank

does not work.

The zpool cache file exists

# ls /etc/zfs/zpool.cache -l
-rw-r--r-- 1 root root 3888 Jul 20 20:06 /etc/zfs/zpool.cache

Is there something I am missing? How do I get the zpool to mount automatically on reboot?

Last edited by rosscosack (2016-07-21 00:39:38)

Offline

#2 2016-07-20 12:45:03

ukhippo
Member
From: Non-paged pool
Registered: 2014-02-21
Posts: 366

Re: [SOLVED] ZFS Imports on reboot but does not mount

I suggest using zfs-linux instead of zfs-linux-git. I don't know why the wiki page only points to zfs-linux-git; I use zfs-linux as that uses the released version of ZoL. The -git version is obviously the latest development version, so the potential for breakages is higher.

Offline

#3 2016-07-21 00:38:36

rosscosack
Member
Registered: 2016-07-20
Posts: 2

Re: [SOLVED] ZFS Imports on reboot but does not mount

yes, changing to the zfs-linux packages worked.
Thank you for your help

Offline

#4 2016-08-20 10:59:14

ukhippo
Member
From: Non-paged pool
Registered: 2014-02-21
Posts: 366

Re: [SOLVED] ZFS Imports on reboot but does not mount

With zfs-linux stuck on the old kernel, I decided to move to zfs-linux-git (building it myself against the latest kernel) and I got this problem. However I found out why this occurs — a change was made to zfs.target to not pull in the various zfs services (like zfs-mount). This was so you can choose which services you need. A preset file is provided to give the defaults, but that isn't used by the packages

The real solution is quite easy — just systemctl enable the services you want.

Offline

Board footer

Powered by FluxBB