restarting bind

Nate Campi nate at campin.net
Sun Mar 24 06:23:55 UTC 2002


On Sun, Mar 24, 2002 at 04:43:03AM +0000, Will Yardley wrote:
> In article <a7jin1$1gk at pub3.rc.vix.com>, Doug Barton wrote:
> > Warwick Brown wrote:
> >> 
> >> is it better to use ndc restart or kill -HUP `cat /var/run/named.pid
> >> ` (which i currently use)?
> >> 
> >> my personal belief is that the 2nd option is the best coz it doesnt
> >> reload every single zone (only the ones that have changed)
>  
> > Personal beliefs rarely enter into technical matters. :) The two
> > things you described above are entirely different. Restarting the
> > server means to kill the one that is running, and start a new
> > instance. named responds to -HUP as if ndc had sent it a 'reload'
> > command. Reload does actually examine each zone file, but only reloads
> > the ones that have changed since the last reload. 
>
> either way, bind has to stat each file to see if it *has* changed.

At a fresh start it loads all the zones, period. There's nothing to 
compare file times to - it's starting from nothing. I think maybe you're
thinking of zones which are slaved to the BIND instance. In that case
they are immediately loaded from disk (if present), and soon compared 
to the serial on the designated master - to see if they need to be
transferred.

> bind v9 allows you to reload / refresh individual zones using rndc,
> which is really nice if you have a lot of zones on your machines.

So does BIND 8. I depend on that behavior at work.

> as doug said, i think a SIGHUP is pretty much the exact same thing as
> ndc reload.

Yes, actually ndc started as a shell script to automate sending signals 
to BIND. People can remember 'ndc stats' better than:

% kill -ILL `cat /var/bind.root/r/var/run/named.pid`

BIND 8 still reponds to signals to control it's behavior as well as
socket commnunications. It's not until BIND 9 that the signals are
ignored.

> with bind 9, it's generally suggested to use rndc for controlling named
> (except for starting it)

Same goes for BIND 8, usage of ndc is recommended for ease of 
administration, but the more masochistic out there can still send all
the signals manually. Using rndc with BIND 9 is not suggested, but
forced (if you want to reload, turn up/down debugging, or do much of
anything beside start and stop BIND).
-- 
Nate

Life is like sendmail: you're not sure you know how to handle it, but
you know it'll end in tears. -- Malcolm Ray 
.
Life is like sendmail: It's complicated and hard to understand,
but it sure beats the alternative. -- Paul Tomblin 



More information about the bind-users mailing list