Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Solved] Start Zoneminder after zfs-mount.service

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
troffasky
Posts: 37
Joined: 2017-11-05 11:00
Has thanked: 1 time
Been thanked: 1 time

[Solved] Start Zoneminder after zfs-mount.service

#1 Post by troffasky »

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.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Start Zoneminder after zfs-mount.service

#2 Post by Head_on_a_Stick »

Try Wants= and use the journal to investigate.
deadbang

troffasky
Posts: 37
Joined: 2017-11-05 11:00
Has thanked: 1 time
Been thanked: 1 time

Re: Start Zoneminder after zfs-mount.service

#3 Post by troffasky »

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!

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Start Zoneminder after zfs-mount.service

#4 Post by Head_on_a_Stick »

OK, good, please add [SOLVED] to the thread title to help others with this problem.
deadbang

Post Reply