Bind is a great piece of open source software that unfortunately, isn't that intuitive when it comes to re-configuring servers in the event of upstream outages. It'll give you a certain amount of time for the upstream to be dead but at some point if the primary nameserver barfs, your secondaries will as well. Murphy's Law dictates the amount of time to route around such a problem is equivalent to the amount of time the outage will take. Here's a way to hedge your bet by instantly turning a secondary nameserver into a primary with a simple script:
master-secondary.sh:
#!/bin/sh cd /etc/namedb cp named.conf-secondary named.conf-master cp named.conf-secondary named.conf-secondary.0 perl -p -i.bak -e 's/ masters \{ ###\.###\.###\.###; \}\;//g' named.conf-master perl -p -i.bak -e 's/type slave\;/type master\;/g' named.conf-master rm named.conf ln -s named.conf-master named.conf rndc reloadReplace the ###.###.###.### above with your upstream name server IP. This script modifies the secondary zone files to be primary. As youc an see I have two versions of my named.conf and I use a symlink to point to either named.conf-master or named.conf-secondary.
Depending upon the exact format of your named.conf, the scripts may need some slight tweaking but in my file, I have one entry per line per host.