[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: bind9 startup problems: /var/cache /bind



On Wed, May 22, 2019 at 2:47 PM Richard Hector <richard@walnut.gen.nz> wrote:
>
> RequiresMountsFor=/absolute/path/of/mount
>
> .. to go in the unit file - or IIRC running:
>
> sudo systemctl edit bind9.service
>
> ... and putting in:
>
> -------8<--------
> [Unit]
> RequiresMountsFor=/var
> -------8<--------
>
> ... followed by:
> sudo systemctl daemon-reload
>
Thank you for the very clear instructions.  I wish README.Debian for
systemd said how you're supposed to handle /etc, since it's somewhat
non-standard.

I tried it.  Unfortunately, it didn't work.  After rebooting I still get
--------------------------
May 22 18:38:49 barley named[829]: loading configuration from
'/etc/bind/named.conf'
May 22 18:38:49 barley named[829]: /etc/bind/named.conf.options:2:
change directory to '/var/cache/bind' failed: file not found
May 22 18:38:49 barley named[829]: /etc/bind/named.conf.options:2:
parsing failed: file not found
May 22 18:38:49 barley named[829]: loading configuration: file not found
May 22 18:38:49 barley named[829]: exiting (due to fatal error)
------------------------------------------------
Again, when I restart the service it succeeds.
As a check to see if my options took, systemctl show bind9 does have
the lines (leaving in some resolvconf stuff because of my suspicions):
---------------------------------------------
Requires=sysinit.target -.mount var.mount system.slice
Wants=nss-lookup.target bind9-resolvconf.service
ConsistsOf=bind9-resolvconf.service
Before=bind9-resolvconf.service multi-user.target shutdown.target
nss-lookup.target
After=basic.target system.slice -.mount systemd-journald.socket
sysinit.target var.mount network.target
RequiresMountsFor=/var
-----------------------------------

Finally, ls -ld /var/cache/bind
drwxrwxr-x 2 root bind 4096 May 22 16:50 /var/cache/bind
The manual restart of bin began just before 18:50 local time.

Ross


Reply to: