# chroot bind var/named/dev mounted twice and init script's stop hanging



## fwyKKCkQze2z (Dec 20, 2017)

Hi

I am running bind in a chroot'ed environment on a FreeBSD 11 system.

# pkg version | grep bind
bind910-9.10.6

For some unknown reason, I sometimes see /var/named/dev mounted twice. This seems often (always?) to be the case after a reboot. Unfortunately this is a production system, so I cannot reboot it at will to test.


```
# mount -v
....
devfs on /var/named/dev (devfs, local, multilabel, fsid 04ff007171000000)
devfs on /var/named/dev (devfs, local, multilabel, fsid 05ff007171000000)
```

Whenever this happens, stopping named via `/usr/local/etc/rc.d/named restart` fails (the command hangs forever); but I can only find one `/usr/local/sbin/named -t /var/named` process.

It seems that DNS resolution is working just fine anyway.

Once I kill the one process I find, one of the mounts is gone. After `umount`ing the remaining one and restarting named (`/usr/local/etc/rc.d/named start` works just fine then), everything seems to be OK/as expected again.

Here is an excerpt from my /etc/rc.conf:

```
named_enable="yes"
named_chrootdir="/var/named"
```

Is someone able to shed some light onto the question why this might be happening?


----------



## SirDice (Dec 27, 2017)

fwyKKCkQze2z said:


> Is someone able to shed some light onto the question why this might be happening?


The only thing I can think off is a failed restart. For some reason it may have failed to shutdown completely and then started again causing devfs(5) to be mounted twice.


----------



## fwyKKCkQze2z (Mar 4, 2018)

Thank you for the reply and sorry for the late update. I have upgraded bind to 9.11 by now (because `pkg` told me that 9.10 will not be given much love any longer) and have not experienced the "double mount" any more since then. I am absolutely not sure if the upgrade really changed anything but I keep my fingers crossed for now.


----------

