Secondly is there anyway to check the state of this file.
The cron job is the best way to keep the filesize down. If your
filesystem simply cannot handle the size of the files then I do not
know a nice solution with NSD3.
With NSD4 there is a feature that saves disk space, the NSD4 version
in development (in code repository), has a feature where you can set
database: "" and then it does not use the nsd.db file on disk and this
may save you a lot of disk space. NSD4 would also not make ixfr.db,
but store similar contents in /tmp/nsd.<pid>/ , but also delete those
files when it has done working with them (which may save only a little
disk space).
I was more wondering if there was a command i could run which would
enable me to do something like the following.
if ixfr.db is corrupt
if disk full
stop nsd
rm ixfr.db
if we can delete some data
delete old data and decrease log rotation
start nsd
fi
else
stop nsd
rm ixfr.db
start nsd
fi
fi
Obliviously we have disk monitoring in place but there are occasions
where nodes are not able to reach us but they are still operating and
serving local regions. In these cases we want to try and heal as many
know issues as possible and if we are not able to do this then just shut
down services.
Secondly is there anyway to check the state of this file.
The cron job is the best way to keep the filesize down. If your
filesystem simply cannot handle the size of the files then I do
not know a nice solution with NSD3.
With NSD4 there is a feature that saves disk space, the NSD4
version in development (in code repository), has a feature where
you can set database: "" and then it does not use the nsd.db file
on disk and this may save you a lot of disk space. NSD4 would
also not make ixfr.db, but store similar contents in
/tmp/nsd.<pid>/ , but also delete those files when it has done
working with them (which may save only a little disk space).
I was more wondering if there was a command i could run which
would enable me to do something like the following.
if ixfr.db is corrupt if disk full stop nsd rm ixfr.db if we can
delete some data delete old data and decrease log rotation start
nsd fi else stop nsd rm ixfr.db start nsd fi fi
Obliviously we have disk monitoring in place but there are
occasions where nodes are not able to reach us but they are still
operating and serving local regions. In these cases we want to try
and heal as many know issues as possible and if we are not able to
do this then just shut down services.
The command: ./nsd-patch -l -c your-nsd.conf
prints a series of lines that summarizes the ixfr.db, and to do so it
reads through the entire file, and it checks the file structure. That
may fail if NSD happens to be writing to it at exactly that time.
The errors are the last line, incomplete zone transfer content packet,
or packet seq %d had bad length check bytes, or incomplete
commit/rollback packet or commit packet with bad length check bytes,
or bad part of type %x.
Valid output lines start with '^zone ' and '^ time '. So this
command could be scriptable, if you really wanted to.