Re: Filesystem corruption after unreachable storage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 09, 2020 at 04:33:52PM +0100, Jean-Louis Dupond wrote:
> On 9/03/2020 16:18, Theodore Y. Ts'o wrote:
> > Did the panic happen immediately, or did things hang until the storage
> > recovered, and*then*  it rebooted.  Or did the hard reset and reboot
> > happened before the storage network connection was restored?
> 
> The panic (well it was just frozen, no stacktrace or automatic reboot) did
> happen *after* storage came back online.
> So nothing happens while the storage is offline, even if we wait until the
> scsi timeout is exceeded (180s * 6).
> It's only when the storage returns that the filesystem goes read-only /
> panic (depending on the error setting).

So I under why the scsi timeout isn't sufficient to keep the panic
from hanging.

> If we do reset the VM before storage is back, the filesystem check just goes
> fine in automatic mode.
> So I think we should (in some cases) not try to update the superblock
> anymore on I/O errors, but just go read-only/panic.
> Cause it seems like updating the superblock makes things worse.

The problem is that from the file system's perspective, we don't know
why the I/O error has happened.  Is it because of timeout, or is it
because of a media error?

In the case where an SSD really was unable to write to a metadata
block, we *do* want to update the superblock.

There is a return status that the block device could send back,
BLK_STS_TIMEOUT, but it's not set by the SCSI layer.  It is by the
network block device (nbd), but it looks like the SCSI layer just
returns BLK_STS_IOERR if I'm reading the code correctly.

> Or changes could be made to e2fsck to allow automatic repair of this kind of
> error for example?

The fundamental problem is we don't know what "kind of error" has
taken place.  If we did, we could theoretically have some kind of
mount option which means "in case of timeout, reboot the system
without setting some kind of file system error".  But we need to know
that the I/O error was caused by a timeout first.

     	     	       	      	 - Ted



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux