Let's say I have 2 BIND servers (master & slave), the master fail's. The slave still answer to the queries... However, they do not have the zone files on the file system...

If I reboot the slave, will it still be aware about the content of the zones ?

Is there a procedure to rewrite the zone file on that slave and then I just change the config to make it the master ?

  • how can a dns slave server not have the zone info? – natxo asenjo May 5 '16 at 13:44
  • @natxoasenjo You can have the zone data without storing it in a file. – Håkan Lindqvist May 5 '16 at 13:55
  • yes, but it must be available to the slave using ldap/sql. Otherwise it cannot serve any zones, right? ;-). So the OP must first explain (or understand) how his/her dns infrastructure is set up; then we can try to help him/her with the problems – natxo asenjo May 5 '16 at 13:58
  • 1
    @natxoasenjo It was available via AXFR/IXFR while the master was available. – Håkan Lindqvist May 5 '16 at 14:00
  • 1
    @natxoasenjo What the question says (and which is correct) is that if the slave only has the data in memory and the slave is restarted it would not be able to get the data again without the master. – Håkan Lindqvist May 5 '16 at 14:14

Provided that you specified a file in the definition of the slave zone (it's common practice to do so), the zone data will be stored in that file and will be available across restarts.

From the slave zone section of the manual:

If a file is specified, then the replica will be written to this file whenever the zone is changed, and reloaded from this file on a server restart. Use of a file is recommended, since it often speeds server startup and eliminates a needless waste of bandwidth.

However, it's worth noting that if the master is unavailable for an extended period of time the zone expiration timer will eventually come into play; the server with the slave zone will stop serving the zone after not being able to reach the master for the amount of time specified in the SOA EXPIRE field (usually weeks).

It is possible to change a slave zone to a master zone, but it's worth noting that modern BIND versions have different defaults for masterfile-format for master and slave zones (master zones are text, slave zones are raw), so your file may be in a different format than expected if you just switch type from slave to master.
Either override the masterfile-format setting or convert the zone file (eg named-compilezone -f raw example.com db.example.com).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.