Let me apologize in advance for asking yet another noob question.
I installed zfs (AUR) on a Raspberry Pi with pools/volumes being mounted by systemd. After an update three weeks ago my system was temporarily missing the zfs kernel module. So, the systemd services zfs-import-cache.service
and zfs-import-cache.service
failed as expected.
Now even after the zfs kernel modules have back in place for weeks, the systemd services zfs-import-cache.service
and zfs-import-cache.service
will not start when booting. As a reason the failed condition from three weeks ago is listed. However, both services will happily start manually. How can I fix this?
A little background
After rebooting the Raspberry Pi the two services do not show up as failed even though they have not been started and are marked as failed in systemctl status
. See here…
[root@myraspi ~]# systemctl list-units --failed
UNIT LOAD ACTIVE SUB DESCRIPTION
0 loaded units listed.
[root@myraspi ~]# systemctl list-units --state failed
UNIT LOAD ACTIVE SUB DESCRIPTION
0 loaded units listed.
[root@myraspi ~]# systemctl status zfs-import-cache.service
â—‹ zfs-import-cache.service - Import ZFS pools by cache file
Loaded: loaded (/usr/lib/systemd/system/zfs-import-cache.service; enabled; preset: enabled)
Active: inactive (dead)
Condition: start condition failed at Wed 2022-08-10 01:29:31 CEST; 3 weeks 0 days ago
└─ ConditionPathIsDirectory=/sys/module/zfs was not met
Docs: man:zpool(8)
Aug 10 01:29:31 myraspi systemd[1]: Import ZFS pools by cache file was skipped because of a failed condition check (ConditionPathIsDirectory=/sys/module/zfs).
[root@myraspi ~]# systemctl status zfs-mount.service
â—‹ zfs-mount.service - Mount ZFS filesystems
Loaded: loaded (/usr/lib/systemd/system/zfs-mount.service; enabled; preset: enabled)
Active: inactive (dead)
Condition: start condition failed at Wed 2022-08-10 01:29:31 CEST; 3 weeks 0 days ago
└─ ConditionPathIsDirectory=/sys/module/zfs was not met
Docs: man:zfs(8)
Aug 10 01:29:31 myraspi systemd[1]: Mount ZFS filesystems was skipped because of a failed condition check (ConditionPathIsDirectory=/sys/module/zfs).
As aforementioned, a manual start will succeed flawlessly and the zfs pool become available right away.
[root@myraspi ~]# systemctl start zfs-import-cache.service
[root@myraspi ~]# systemctl status zfs-import-cache.service
â—Ź zfs-import-cache.service - Import ZFS pools by cache file
Loaded: loaded (/usr/lib/systemd/system/zfs-import-cache.service; enabled; preset: enabled)
Active: active (exited) since Wed 2022-08-31 17:55:10 CEST; 9s ago
Docs: man:zpool(8)
Process: 839 ExecStart=/usr/bin/zpool import -c /etc/zfs/zpool.cache -aN $ZPOOL_IMPORT_OPTS (code=exited, status=0/SUCCESS)
Main PID: 839 (code=exited, status=0/SUCCESS)
CPU: 366ms
Aug 31 17:54:56 myraspi systemd[1]: Starting Import ZFS pools by cache file...
Aug 31 17:55:10 myraspi systemd[1]: Finished Import ZFS pools by cache file.
[root@myraspi ~]# systemctl start zfs-mount.service
[root@myraspi ~]# systemctl status zfs-mount.service
â—Ź zfs-mount.service - Mount ZFS filesystems
Loaded: loaded (/usr/lib/systemd/system/zfs-mount.service; enabled; preset: enabled)
Active: active (exited) since Wed 2022-08-31 17:56:00 CEST; 4s ago
Docs: man:zfs(8)
Process: 997 ExecStart=/usr/bin/zfs mount -a (code=exited, status=0/SUCCESS)
Main PID: 997 (code=exited, status=0/SUCCESS)
CPU: 77ms
Aug 31 17:56:00 myraspi systemd[1]: Starting Mount ZFS filesystems...
Aug 31 17:56:00 myraspi systemd[1]: Finished Mount ZFS filesystems.
I tried systemctl reset-failed zfs-mount.service
which did not make any difference. Neither did reinstalling/recompiling zfs-utils (AUR). Still the failed condition from Aug 10 comes up after rebooting the Raspberry Pi.
[root@myraspi ~]# systemctl status zfs-import-cache.service
â—‹ zfs-import-cache.service - Import ZFS pools by cache file
Loaded: loaded (/usr/lib/systemd/system/zfs-import-cache.service; enabled; preset: enabled)
Active: inactive (dead)
Condition: start condition failed at Wed 2022-08-10 01:29:31 CEST; 3 weeks 0 days ago
└─ ConditionPathIsDirectory=/sys/module/zfs was not met
Docs: man:zpool(8)
Aug 10 01:29:31 myraspi systemd[1]: Import ZFS pools by cache file was skipped because of a failed condition check (ConditionPathIsDirectory=/sys/module/zfs).
How can get rid of that failed condition from August 10? If you have any hints for me, please do let me know. Not having the volumes mounted after a reboot is somewhat uncomfortable.