lkml.org 
[lkml]   [2008]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: writing file to disk: not as easy as it looks
On Wed, 3 Dec 2008, Pavel Machek wrote:

> > > CRC errors, lost IRQs and the like are retried by the midlayer and
> > > drivers and the error handling strategies will also try things like
> > > reducing link speeds on repeated CRC errors.
> >
> > I meant for example loose cable or so --- does it make sense to retry
> > indefinitely (until the admin plugs the cable or unmounts the filesystem)
> > or return error to the filesystem after few retries?
>
> It is quite non-trivial to detect if it is "disk plugged back in"
> vs. "faulty disk unplugged, new one plugged in"... so I suppose
> automatic retry after failure of connection to disk is quite hard to
> get right.

Unless the SATA controller has the plug interrupt (very few have), there
is no way for the kernel to detect that an old SATA disk was unplugged and
a new one was plugged in.

So the answer is that the admin must not hot-swap disk unless unmounting
the filesystem or notifying the RAID layer about it. If you hot-swap
softraid1/4/5 disk, you definitely damage data, because the softraid layer
has no way to find out about the hotswap.

Mikulas


\
 
 \ /
  Last update: 2008-12-03 19:37    [W:0.093 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site