* when read error ,where do we rewrite?
@ 2010-01-07 12:41 dong wu
2010-01-07 13:18 ` Robin Hill
0 siblings, 1 reply; 6+ messages in thread
From: dong wu @ 2010-01-07 12:41 UTC (permalink / raw)
To: linux-raid
when read error and can rewrite,where do we rewrite?
It can't be rewrited to the old block.
It should be rewrite to other place,where can we find the 'other place'?
In the source code,I don't find the place that should be rewrited to.
Dong Wu
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: when read error ,where do we rewrite?
2010-01-07 12:41 when read error ,where do we rewrite? dong wu
@ 2010-01-07 13:18 ` Robin Hill
2010-01-08 4:54 ` dong wu
0 siblings, 1 reply; 6+ messages in thread
From: Robin Hill @ 2010-01-07 13:18 UTC (permalink / raw)
To: linux-raid
[-- Attachment #1: Type: text/plain, Size: 710 bytes --]
On Thu Jan 07, 2010 at 08:41:20PM +0800, dong wu wrote:
> when read error and can rewrite,where do we rewrite?
> It can't be rewrited to the old block.
> It should be rewrite to other place,where can we find the 'other place'?
> In the source code,I don't find the place that should be rewrited to.
>
It's rewritten to the same block - it's up to the low-level device (the
disk) to attempt a write and transparently remap the block if the write
fails.
Cheers,
Robin
--
___
( ' } | Robin Hill <robin@robinhill.me.uk> |
/ / ) | Little Jim says .... |
// !! | "He fallen in de water !!" |
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: when read error ,where do we rewrite?
2010-01-07 13:18 ` Robin Hill
@ 2010-01-08 4:54 ` dong wu
2010-01-08 4:59 ` dong wu
0 siblings, 1 reply; 6+ messages in thread
From: dong wu @ 2010-01-08 4:54 UTC (permalink / raw)
To: linux-raid
If it is written to the same block,will it read error again?
when read error,the low-level attempts a write and remap the block if
the write fails.
where does it remap?
Is there any spare block in the disk for remap when read or write error occurs?
2010/1/7, Robin Hill <robin@robinhill.me.uk>:
> On Thu Jan 07, 2010 at 08:41:20PM +0800, dong wu wrote:
>
> > when read error and can rewrite,where do we rewrite?
> > It can't be rewrited to the old block.
> > It should be rewrite to other place,where can we find the 'other place'?
> > In the source code,I don't find the place that should be rewrited to.
> >
> It's rewritten to the same block - it's up to the low-level device (the
> disk) to attempt a write and transparently remap the block if the write
> fails.
>
> Cheers,
> Robin
> --
> ___
> ( ' } | Robin Hill <robin@robinhill.me.uk> |
> / / ) | Little Jim says .... |
> // !! | "He fallen in de water !!" |
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: when read error ,where do we rewrite?
2010-01-08 4:54 ` dong wu
@ 2010-01-08 4:59 ` dong wu
2010-01-08 6:35 ` Michael Evans
2010-01-08 10:03 ` Robin Hill
0 siblings, 2 replies; 6+ messages in thread
From: dong wu @ 2010-01-08 4:59 UTC (permalink / raw)
To: linux-raid
In the source code of raid5,when write error,it faulty the disk,not remap
the block. why do it use "remap the block"?
2010/1/8, dong wu <dongwucs@gmail.com>:
> If it is written to the same block,will it read error again?
> when read error,the low-level attempts a write and remap the block if
> the write fails.
> where does it remap?
> Is there any spare block in the disk for remap when read or write error occurs?
>
> 2010/1/7, Robin Hill <robin@robinhill.me.uk>:
> > On Thu Jan 07, 2010 at 08:41:20PM +0800, dong wu wrote:
> >
> > > when read error and can rewrite,where do we rewrite?
> > > It can't be rewrited to the old block.
> > > It should be rewrite to other place,where can we find the 'other place'?
> > > In the source code,I don't find the place that should be rewrited to.
> > >
> > It's rewritten to the same block - it's up to the low-level device (the
> > disk) to attempt a write and transparently remap the block if the write
> > fails.
> >
> > Cheers,
> > Robin
> > --
> > ___
> > ( ' } | Robin Hill <robin@robinhill.me.uk> |
> > / / ) | Little Jim says .... |
> > // !! | "He fallen in de water !!" |
> >
> >
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: when read error ,where do we rewrite?
2010-01-08 4:59 ` dong wu
@ 2010-01-08 6:35 ` Michael Evans
2010-01-08 10:03 ` Robin Hill
1 sibling, 0 replies; 6+ messages in thread
From: Michael Evans @ 2010-01-08 6:35 UTC (permalink / raw)
To: dong wu; +Cc: linux-raid
On Thu, Jan 7, 2010 at 8:59 PM, dong wu <dongwucs@gmail.com> wrote:
> In the source code of raid5,when write error,it faulty the disk,not remap
> the block. why do it use "remap the block"?
>
> 2010/1/8, dong wu <dongwucs@gmail.com>:
>> If it is written to the same block,will it read error again?
>> when read error,the low-level attempts a write and remap the block if
>> the write fails.
>> where does it remap?
>> Is there any spare block in the disk for remap when read or write error occurs?
>>
>> 2010/1/7, Robin Hill <robin@robinhill.me.uk>:
>> > On Thu Jan 07, 2010 at 08:41:20PM +0800, dong wu wrote:
>> >
>> > > when read error and can rewrite,where do we rewrite?
>> > > It can't be rewrited to the old block.
>> > > It should be rewrite to other place,where can we find the 'other place'?
>> > > In the source code,I don't find the place that should be rewrited to.
>> > >
>> > It's rewritten to the same block - it's up to the low-level device (the
>> > disk) to attempt a write and transparently remap the block if the write
>> > fails.
>> >
>> > Cheers,
>> > Robin
>> > --
>> > ___
>> > ( ' } | Robin Hill <robin@robinhill.me.uk> |
>> > / / ) | Little Jim says .... |
>> > // !! | "He fallen in de water !!"
>> >
>> >
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
Modern mass storage devices provide an /abstraction/ of a linear
storage device which needn't actually be so. On most of them data
plus some extra parity for recovery are stored; if the drive has
unusual trouble reading the data back, it will try to get a good
read/repair and then use another, spare (reserved), area on the device
in place of the one that 'went bad'. This is actually a major problem
for cryptographic/security concerns, and is one possible metric in
S.M.A.R.T. data that can indicate a failing drive.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: when read error ,where do we rewrite?
2010-01-08 4:59 ` dong wu
2010-01-08 6:35 ` Michael Evans
@ 2010-01-08 10:03 ` Robin Hill
1 sibling, 0 replies; 6+ messages in thread
From: Robin Hill @ 2010-01-08 10:03 UTC (permalink / raw)
To: linux-raid
[-- Attachment #1: Type: text/plain, Size: 941 bytes --]
On Fri Jan 08, 2010 at 12:59:26PM +0800, dong wu wrote:
> In the source code of raid5,when write error,it faulty the disk,not remap
> the block. why do it use "remap the block"?
>
There's two separate error cases - read error and write error.
If the RAID layer gets a read error from the disk, it uses the parity to
recalculate the data and then writes it back to the disk. If the disk
(internally) gets an error when writing this block, it should silently
mark it as faulty and map a spare block in to replace it, writing to
that instead,
If the RAID layer gets a write error from the disk, this indicates that
it's failed to do this remapping, so it marks the disk as faulty.
HTH,
Robin
--
___
( ' } | Robin Hill <robin@robinhill.me.uk> |
/ / ) | Little Jim says .... |
// !! | "He fallen in de water !!" |
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-01-08 10:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-07 12:41 when read error ,where do we rewrite? dong wu
2010-01-07 13:18 ` Robin Hill
2010-01-08 4:54 ` dong wu
2010-01-08 4:59 ` dong wu
2010-01-08 6:35 ` Michael Evans
2010-01-08 10:03 ` Robin Hill
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).