* software RAID
@ 2005-05-20 17:56 Adam Miller
2005-05-20 20:03 ` Lennart Sorensen
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Adam Miller @ 2005-05-20 17:56 UTC (permalink / raw)
To: linux-kernel
Hi,
We're looking to set up either software RAID 1 or RAID 10 using 2 SATA
disks. If a disk in drive A has a bad sector, can it be setup so that the
array will read the sector from drive B and then have it rewrite the
bad sector on drive A? Please CC me in the response.
Thanks!
Adam Miller
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: software RAID
2005-05-20 17:56 software RAID Adam Miller
@ 2005-05-20 20:03 ` Lennart Sorensen
2005-05-20 20:21 ` Valdis.Kletnieks
` (2 more replies)
2005-05-20 21:50 ` Michael Tokarev
2005-05-20 22:11 ` Neil Brown
2 siblings, 3 replies; 9+ messages in thread
From: Lennart Sorensen @ 2005-05-20 20:03 UTC (permalink / raw)
To: Adam Miller; +Cc: linux-kernel
On Fri, May 20, 2005 at 12:56:13PM -0500, Adam Miller wrote:
> We're looking to set up either software RAID 1 or RAID 10 using 2 SATA
> disks. If a disk in drive A has a bad sector, can it be setup so that the
> array will read the sector from drive B and then have it rewrite the
> bad sector on drive A? Please CC me in the response.
If a harddisk has a bad sector that is visible to the user (and hence
not remapped by the drive) then it is time to retire the drive since it
is out of spares and very damaged by that point.
If you have a bad sector, it doesn't go away by writing to it again. On
modern drives, if you see bad sectors the disk is just about dead, and
will probably be seen as such by the raid system which will then stop
using the disk entirely and expect you to replace it ASAP.
Len Sorensen
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: software RAID
2005-05-20 20:03 ` Lennart Sorensen
@ 2005-05-20 20:21 ` Valdis.Kletnieks
2005-05-20 20:36 ` Grzegorz Kulewski
2005-05-21 19:03 ` Alan Cox
2 siblings, 0 replies; 9+ messages in thread
From: Valdis.Kletnieks @ 2005-05-20 20:21 UTC (permalink / raw)
To: Lennart Sorensen; +Cc: Adam Miller, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1138 bytes --]
On Fri, 20 May 2005 16:03:34 EDT, Lennart Sorensen said:
> If you have a bad sector, it doesn't go away by writing to it again. On
> modern drives, if you see bad sectors the disk is just about dead, and
> will probably be seen as such by the raid system which will then stop
> using the disk entirely and expect you to replace it ASAP.
The one exception here is if you have a miswritten sector (usually caused by
unexpected power-down), which won't read back correctly - but running badblocks
with one of the 'write-verify' options will resurrect it.
If you have a drive that has a bad block in it even *after* badblocks has
re-written it, it's time to replace the drive *now*....
For the original poster: Breaking the mirror and then re-mirroring from the
"good" drive *might* recover the bad block when it re-writes it. But don't bet
on it...
("power fail" is about the only cause of recoverable bad blocks that I know of -
and if you're having power-fail issues on a RAID, I'd recommend you fix
*THAT* problem before it causes you more grief. A good UPS will more than pay
for itself in sysadmin sanity and peace of mind....)
[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: software RAID
2005-05-20 20:03 ` Lennart Sorensen
2005-05-20 20:21 ` Valdis.Kletnieks
@ 2005-05-20 20:36 ` Grzegorz Kulewski
2005-05-20 20:53 ` Adam Miller
2005-05-21 19:03 ` Alan Cox
2 siblings, 1 reply; 9+ messages in thread
From: Grzegorz Kulewski @ 2005-05-20 20:36 UTC (permalink / raw)
To: Lennart Sorensen; +Cc: Adam Miller, linux-kernel
On Fri, 20 May 2005, Lennart Sorensen wrote:
> On Fri, May 20, 2005 at 12:56:13PM -0500, Adam Miller wrote:
>> We're looking to set up either software RAID 1 or RAID 10 using 2 SATA
>> disks. If a disk in drive A has a bad sector, can it be setup so that the
>> array will read the sector from drive B and then have it rewrite the
>> bad sector on drive A? Please CC me in the response.
>
> If a harddisk has a bad sector that is visible to the user (and hence
> not remapped by the drive) then it is time to retire the drive since it
> is out of spares and very damaged by that point.
>
> If you have a bad sector, it doesn't go away by writing to it again. On
> modern drives, if you see bad sectors the disk is just about dead, and
> will probably be seen as such by the raid system which will then stop
> using the disk entirely and expect you to replace it ASAP.
What do you mean "see bad sectors"?
Modern drives are trying to relocate sectors that can become bad in short
time. But this does not work 100% reliably. And sometimes disk wants to
relocate sector but the sector can not be read anymore. If this happens
disk will return read error when reading the sector _but_ when you will
write it again it will relocate it (with new data). And I think this was
the idea behind first post... To allow disk A to relocate not readable
sectors with correct data from disk B.
Grzegorz Kulewski
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: software RAID
2005-05-20 20:36 ` Grzegorz Kulewski
@ 2005-05-20 20:53 ` Adam Miller
0 siblings, 0 replies; 9+ messages in thread
From: Adam Miller @ 2005-05-20 20:53 UTC (permalink / raw)
To: Grzegorz Kulewski; +Cc: Lennart Sorensen, linux-kernel
Hi,
Yes, I want to know if the bad sector on disk A will be reallocated
when disk B tries to write to disk A.
Adam
On Fri, 20 May 2005, Grzegorz Kulewski wrote:
> On Fri, 20 May 2005, Lennart Sorensen wrote:
>
>> On Fri, May 20, 2005 at 12:56:13PM -0500, Adam Miller wrote:
>>> We're looking to set up either software RAID 1 or RAID 10 using 2 SATA
>>> disks. If a disk in drive A has a bad sector, can it be setup so that the
>>> array will read the sector from drive B and then have it rewrite the
>>> bad sector on drive A? Please CC me in the response.
>>
>> If a harddisk has a bad sector that is visible to the user (and hence
>> not remapped by the drive) then it is time to retire the drive since it
>> is out of spares and very damaged by that point.
>>
>> If you have a bad sector, it doesn't go away by writing to it again. On
>> modern drives, if you see bad sectors the disk is just about dead, and
>> will probably be seen as such by the raid system which will then stop
>> using the disk entirely and expect you to replace it ASAP.
>
> What do you mean "see bad sectors"?
>
> Modern drives are trying to relocate sectors that can become bad in short
> time. But this does not work 100% reliably. And sometimes disk wants to
> relocate sector but the sector can not be read anymore. If this happens disk
> will return read error when reading the sector _but_ when you will write it
> again it will relocate it (with new data). And I think this was the idea
> behind first post... To allow disk A to relocate not readable sectors with
> correct data from disk B.
>
>
> Grzegorz Kulewski
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: software RAID
2005-05-20 17:56 software RAID Adam Miller
2005-05-20 20:03 ` Lennart Sorensen
@ 2005-05-20 21:50 ` Michael Tokarev
2005-05-20 22:11 ` Neil Brown
2 siblings, 0 replies; 9+ messages in thread
From: Michael Tokarev @ 2005-05-20 21:50 UTC (permalink / raw)
To: Adam Miller; +Cc: linux-kernel
Adam Miller wrote:
> Hi,
> We're looking to set up either software RAID 1 or RAID 10 using 2 SATA
> disks. If a disk in drive A has a bad sector, can it be setup so that
> the array will read the sector from drive B and then have it rewrite the
> bad sector on drive A? Please CC me in the response.
Adam,
There's no such functionality in linux software raid exists now.
Instead, as it is implemented now, the whole drive is kicked off
the array in case of *any* error in I/O path. There are patches
by Peter T. Breuer for 2.4 kernel for raid1, named "robust read",
which does just that, but the patches aren't accepted in mainline,
and in 2.6, the subsystem is too different. Maybe in some future...
And BTW, there's no reason to set up RAID10 array on top of 2 drives ;)
/mjt
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: software RAID
2005-05-20 17:56 software RAID Adam Miller
2005-05-20 20:03 ` Lennart Sorensen
2005-05-20 21:50 ` Michael Tokarev
@ 2005-05-20 22:11 ` Neil Brown
2005-05-21 3:31 ` Matthias Andree
2 siblings, 1 reply; 9+ messages in thread
From: Neil Brown @ 2005-05-20 22:11 UTC (permalink / raw)
To: Adam Miller; +Cc: linux-kernel
On Friday May 20, amiller@gravity.phys.uwm.edu wrote:
> Hi,
> We're looking to set up either software RAID 1 or RAID 10 using 2 SATA
> disks. If a disk in drive A has a bad sector, can it be setup so that the
> array will read the sector from drive B and then have it rewrite the
> bad sector on drive A? Please CC me in the response.
Not yet, but it is this functionality is very near the top of my TODO
list for md.
NeilBrown
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: software RAID
2005-05-20 22:11 ` Neil Brown
@ 2005-05-21 3:31 ` Matthias Andree
0 siblings, 0 replies; 9+ messages in thread
From: Matthias Andree @ 2005-05-21 3:31 UTC (permalink / raw)
To: Neil Brown; +Cc: linux-kernel
On Sat, 21 May 2005, Neil Brown wrote:
> On Friday May 20, amiller@gravity.phys.uwm.edu wrote:
> > Hi,
> > We're looking to set up either software RAID 1 or RAID 10 using 2 SATA
> > disks. If a disk in drive A has a bad sector, can it be setup so that the
> > array will read the sector from drive B and then have it rewrite the
> > bad sector on drive A? Please CC me in the response.
>
> Not yet, but it is this functionality is very near the top of my TODO
> list for md.
Speaking of consistency, what is md's support for barriers like? Is it
safe to use write caches on the drives? (RAID1 assumed)
What if I'm using different drive models with different cache sizes
(isn't as unreasonable as it sounds as different drives may have
different margins WRT environmental influences), how does md figure what
is missing from one drive?
Is there anything short of break mirror and rebuild to guarantee
consistency until next reboot?
Documentation/md.txt is a bit lacking in these respects.
--
Matthias Andree
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: software RAID
2005-05-20 20:03 ` Lennart Sorensen
2005-05-20 20:21 ` Valdis.Kletnieks
2005-05-20 20:36 ` Grzegorz Kulewski
@ 2005-05-21 19:03 ` Alan Cox
2 siblings, 0 replies; 9+ messages in thread
From: Alan Cox @ 2005-05-21 19:03 UTC (permalink / raw)
To: Lennart Sorensen; +Cc: Adam Miller, Linux Kernel Mailing List
On Gwe, 2005-05-20 at 21:03, Lennart Sorensen wrote:
> If a harddisk has a bad sector that is visible to the user (and hence
> not remapped by the drive) then it is time to retire the drive since it
> is out of spares and very damaged by that point.
Sector reads failing due to poweroff during sector write or very
occasionally through vibration or other error may not always indicate
drive replacement is appropriate. Generally yes it does and SMART may
flag it.
Rewriting the sector is a good thing to try as ext2/3 fsck for example
does in this case.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2005-05-21 19:05 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-20 17:56 software RAID Adam Miller
2005-05-20 20:03 ` Lennart Sorensen
2005-05-20 20:21 ` Valdis.Kletnieks
2005-05-20 20:36 ` Grzegorz Kulewski
2005-05-20 20:53 ` Adam Miller
2005-05-21 19:03 ` Alan Cox
2005-05-20 21:50 ` Michael Tokarev
2005-05-20 22:11 ` Neil Brown
2005-05-21 3:31 ` Matthias Andree
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®