[Solved] Start Zoneminder after zfs-mount.service

Kernels & Hardware, configuring network, installing services

[Solved] Start Zoneminder after zfs-mount.service

Postby troffasky » 2019-10-11 13:34

I have Zoneminder writing to /home/zoneminder and /home is a ZFS mount. If /home/zoneminder doesn't exist, Zoneminder creates it. If anything exists in /home, zfs-mount refuses to mount it. So I want Zoneminder to start after zfs-mount.

I have tried:

After=network.target mysql.service zfs.target
and
After=network.target mysql.service zfs-mount.service

SystemD doesn't seem to take any notice of this, Zoneminder starts before zfs-mount and so /home/ doesn't get mounted.

Requires=zfs-mount.service

SystemD very much takes notice of this. This change causes the system to boot in emergency mode, but I've no idea why. Is there a way to see why emergency mode was chosen?
Last edited by troffasky on 2019-10-14 20:32, edited 1 time in total.
troffasky
 
Posts: 15
Joined: 2017-11-05 11:00

Re: Start Zoneminder after zfs-mount.service

Postby Head_on_a_Stick » 2019-10-12 11:39

Try Wants= and use the journal to investigate.
Don't break DebianHow to report bugs

SharpBang GNU/Linux — a pre-configured Openbox/Tint2 desktop running on Debian stable
User avatar
Head_on_a_Stick
 
Posts: 10599
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Start Zoneminder after zfs-mount.service

Postby troffasky » 2019-10-12 22:03

Problem here is actually a bind mount appearing to create the directories, not Zoneminder itself. Bind mounts don't play well with ZFS during boot so special handling is needed. I added "x-systemd.requires=zfs-mount.service" to the bind mount entries in /etc/fstab and now everything is peachy!
troffasky
 
Posts: 15
Joined: 2017-11-05 11:00

Re: Start Zoneminder after zfs-mount.service

Postby Head_on_a_Stick » 2019-10-13 08:48

OK, good, please add [SOLVED] to the thread title to help others with this problem.
Don't break DebianHow to report bugs

SharpBang GNU/Linux — a pre-configured Openbox/Tint2 desktop running on Debian stable
User avatar
Head_on_a_Stick
 
Posts: 10599
Joined: 2014-06-01 17:46
Location: /dev/chair


Return to System configuration

Who is online

Users browsing this forum: No registered users and 10 guests

fashionable