Mailing List Archive

Problems when PRImary hangs ...
Hi,

We had a power-supply failure on our primary machine a couple of days ago,
and when I tried to bring up the secondary, the FSCK showed heaps of problems.

Since we had a spare power supply, we quickly changed the power supply and
brought the primary back up, however, it is obvious that there are still
problems.

Since then I have added a nightly script on the secondary to do an fsck -n
of /dev/nb0, and it is clear that there are times when the buffer cache has
not been flushed on the primary that there are problems ...

If I run sync on the primary a couple of times and then do the fsck -n
/dev/nb0 on the seconday, it reports no errors, but without doing that, I
can get lots of errors.

I use the B protocol.

What can I do to minimize the possibility that the secondary will have
these problems?

Regards
-------
Richard Sharpe, sharpe@example.com
Samba (Team member, www.samba.org), Ethereal (Team member, www.zing.org)
Contributing author, SAMS Teach Yourself Samba in 24 Hours
Author, Special Edition, Using Samba
Re: Problems when PRImary hangs ... [ In reply to ]
On Fri, 24 Nov 2000, Richard Sharpe wrote:

> Hi,
>
> We had a power-supply failure on our primary machine a couple of days ago,
> and when I tried to bring up the secondary, the FSCK showed heaps of problems.
>
> Since we had a spare power supply, we quickly changed the power supply and
> brought the primary back up, however, it is obvious that there are still
> problems.
>
> Since then I have added a nightly script on the secondary to do an fsck -n
> of /dev/nb0, and it is clear that there are times when the buffer cache has
> not been flushed on the primary that there are problems ...
>
> If I run sync on the primary a couple of times and then do the fsck -n
> /dev/nb0 on the seconday, it reports no errors, but without doing that, I
> can get lots of errors.
>
> I use the B protocol.
>
> What can I do to minimize the possibility that the secondary will have
> these problems?

1 - Journalling is the best solution.

2 - Use the "sync" mount option with ext2 (enables synchronous writes to
the filesystem, which are slower than async ones)

3 - Decrease the number of maximum dirty buffers (read
/usr/src/linux/Documentation/sysctl/vm.txt). With this you only minimize
the chance of having consistency problems, but there is no guarantee.