linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mdadm and disk failures
@ 2011-06-16  3:37 Mike Power
  2011-06-16  4:39 ` Brad Campbell
  2011-06-16  4:59 ` Roman Mamedov
  0 siblings, 2 replies; 5+ messages in thread
From: Mike Power @ 2011-06-16  3:37 UTC (permalink / raw)
  To: linux-raid

I was looking around the wiki and I could not find the answer.

I wanted to know if the raid system will recover bad blocks lost on the 
one device when the copies of those blocks are available on another.  
 From what I understand when a hard drive loses a block it replaces it 
with another block but it can not recover the data.  At this point I do 
not know what the raid system does.  At one point in the past my 
understanding is, the raid system did nothing.  If it read from the disk 
that had the block it gets garbage for data.  Conceptually the raid 
system could read the data from one disk and write it to the copy on the 
other and restore the data.

Is the raid system capable of recovering and restoring bad blocks?

Mike Power

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mdadm and disk failures
  2011-06-16  3:37 mdadm and disk failures Mike Power
@ 2011-06-16  4:39 ` Brad Campbell
  2011-06-16  4:59 ` Roman Mamedov
  1 sibling, 0 replies; 5+ messages in thread
From: Brad Campbell @ 2011-06-16  4:39 UTC (permalink / raw)
  To: Mike Power; +Cc: linux-raid

On 16/06/11 11:37, Mike Power wrote:
> Is the raid system capable of recovering and restoring bad blocks?
>
Yes, and it does so admirably. You will see a message in your system log to the effect that it had 
recovered the (or those) bad sector(s).

Brad

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mdadm and disk failures
  2011-06-16  3:37 mdadm and disk failures Mike Power
  2011-06-16  4:39 ` Brad Campbell
@ 2011-06-16  4:59 ` Roman Mamedov
  2011-06-16  5:29   ` Mikael Abrahamsson
  2011-06-16 15:34   ` Mike Power
  1 sibling, 2 replies; 5+ messages in thread
From: Roman Mamedov @ 2011-06-16  4:59 UTC (permalink / raw)
  To: Mike Power; +Cc: linux-raid

[-- Attachment #1: Type: text/plain, Size: 727 bytes --]

On Wed, 15 Jun 2011 20:37:31 -0700
Mike Power <mpower@dodtsair.com> wrote:

>  From what I understand when a hard drive loses a block it replaces it 
> with another block but it can not recover the data.
> If it read from the disk that had the block it gets garbage for data.

This is not true, an HDD will never return garbage data just because it needed
to remap a bad sector. And that's the reason why bad sectors will return I/O
error (unreadable) instead, and are not remapped anywhere until you try to
WRITE into these sectors. At that moment, when the hard disk has new user data
for that sector, it can finally do the remap and put it somewhere else on a
remapped good sector.

-- 
With respect,
Roman

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mdadm and disk failures
  2011-06-16  4:59 ` Roman Mamedov
@ 2011-06-16  5:29   ` Mikael Abrahamsson
  2011-06-16 15:34   ` Mike Power
  1 sibling, 0 replies; 5+ messages in thread
From: Mikael Abrahamsson @ 2011-06-16  5:29 UTC (permalink / raw)
  To: Roman Mamedov; +Cc: Mike Power, linux-raid

On Thu, 16 Jun 2011, Roman Mamedov wrote:

> At that moment, when the hard disk has new user data for that sector, it 
> can finally do the remap and put it somewhere else on a remapped good 
> sector.

Just to be clear, it won't necessarily remap the sector. It might succeed 
in writing the new data to it and determine the sector isn't really bad, 
and not remap it.

-- 
Mikael Abrahamsson    email: swmike@swm.pp.se

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mdadm and disk failures
  2011-06-16  4:59 ` Roman Mamedov
  2011-06-16  5:29   ` Mikael Abrahamsson
@ 2011-06-16 15:34   ` Mike Power
  1 sibling, 0 replies; 5+ messages in thread
From: Mike Power @ 2011-06-16 15:34 UTC (permalink / raw)
  To: Roman Mamedov; +Cc: linux-raid

Ahh I understand more clearly now.  Because the failing drive will 
report an IO error the raid system can respond reactively by getting the 
data else where and writing it to the failing disk.  Earlier I had 
thought that the raid system might periodically poll the disks to see 
what blocks were lost and correct them.

This makes me much more interested in setting up a raid system above and 
beyond the performance benefit.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-06-16 15:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-16  3:37 mdadm and disk failures Mike Power
2011-06-16  4:39 ` Brad Campbell
2011-06-16  4:59 ` Roman Mamedov
2011-06-16  5:29   ` Mikael Abrahamsson
2011-06-16 15:34   ` Mike Power

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).