# named show crashed, won't umount chroot dirs

## Dr_b_

Need a bit of help trying to figure out why named won't start or stop correctly

```
~ # /etc/init.d/named start

 * Starting chrooted named ...

 * Mounting chroot dirs

 * Checking named configuration ...                                                                                   [ ok ]

 * start-stop-daemon: failed to start `/usr/sbin/named'                                                               [ !! ]

 * ERROR: named failed to start

~#ps ax | grep named     

 6678 ?        SNsl   0:00 /usr/sbin/named -u named -n 1 -t /named
```

```
~ # mount | grep named

/dev/nvme1n1p3 on /named/etc/bind type btrfs (rw,noatime,compress=lzo,ssd,space_cache,subvolid=5,subvol=/etc/bind)

/dev/nvme1n1p3 on /named/var/bind type btrfs (rw,noatime,compress=lzo,ssd,space_cache,subvolid=5,subvol=/var/bind)

/dev/nvme1n1p3 on /named/var/log/named type btrfs (rw,noatime,compress=lzo,ssd,space_cache,subvolid=5,subvol=/var/log/named)
```

Also named won't stop, thinks its crashed, and won't umount chroot dirs.  

DNS resolves fine and works both for zones and as a relay

Nothing shows up in messages or named.log that provides a clue

----------

## deagol

Not sure if it's related, but it may well be...

The openrc init script is broken and has some serious defects.

From what I remember I was unable to restart named correctly when using chroot on top of the selinux issues. There is an problem with the pid file location, which prevents named to shut down correctly when running in chroot. (The initial start works, but restarting it will not.)

So you may be interested in my attempt of a address the more obvious defects in this bug: https://bugs.gentoo.org/show_bug.cgi?id=601510

The script in the bug report is working for my setup at least. But it's far from fool-proof and unexpected setting can still cause problems...

----------

