Subject: Re: [vserver] For a period of 2 months, the server file system has switched three times into the readonly mode
From: Jon Bendtsen <jbendtsen@laerdal.dk>
Date: Thu, 29 Oct 2009 12:35:29 +0100

On 29/10/2009, at 12.17, Laurent Spagnol wrote:

[cuuuuuut]

> I think it is a hardware issue -> fs errors are caused by I/O errors  
> on the block device.
> This problem happens when the harddrive can't realocate a bad block  
> that kernel is trying to use.
> Linux-Vserver patch do nothing at this level.
>
> The "standard" comportement of kernel is to remount R/O the  
> filesystem when I/O errors happens on a "ext" filesystems.
> (XFS does not support this feature, and i don't know for others).
>
> You can have some problems, even with software RAID1: kernel may  
> remount R/O the filesystem before the physical device be set to  
> faulty.
>
> It may be changed in two ways: add option "errors= ...." to fstab,  
> or use tune2fs to write option directly on the filesystem.
>
> Possibles options are:
> errors=continue (very bad idea ...)
> errors=remount-ro (default)
> errors=panic (usefull for node fencing in HA/LB environment)
>
> errors=panic will cause a "kernel-panic"
> If you add some kernel parameters (kernel.panic_on_oops=1 and  
> kernel.panic=xxx), the kernel-panic will cause a reboot after "xxx"  
> seconds.
> -> sysctl -w parameter=value
> -> echo "parameter = value" >> /etc/sysctl.conf (Debian ?)
>
> ... and the best thing to do is to change the hard drive !

Or controller or cable between the controller and the harddrive.