linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Force parity resync on raid5?
@ 2004-08-09 23:10 Philip Molter
  2004-08-10  9:04 ` Gordon Henderson
  0 siblings, 1 reply; 16+ messages in thread
From: Philip Molter @ 2004-08-09 23:10 UTC (permalink / raw)
  To: linux-raid

How do I force a parity resync on a raid5 array?  Under 2.4, I would do 
this by hard cycling the box and when it came back up, it would 
automatically resync the array.  Under 2.6, this appears to have gone away.

I suspect I have parity corruption on several boxes (they run fine 
normally, but when they lose a drive, they then get corrupted) related 
to the raid5 resync bug from an older kernel.  I want to force the 
parity to reinitialize since all the data is definitely good.

Thank you for any advice.
Philip

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: Force parity resync on raid5?
@ 2004-08-10 12:03 Philip Molter
  2004-08-10 12:39 ` Neil Brown
  0 siblings, 1 reply; 16+ messages in thread
From: Philip Molter @ 2004-08-10 12:03 UTC (permalink / raw)
  To: linux-raid

Gordon Henderson wrote:

> On Mon, 9 Aug 2004, Philip Molter wrote:
> 
> 
>>How do I force a parity resync on a raid5 array?  Under 2.4, I would do
>>this by hard cycling the box and when it came back up, it would
>>automatically resync the array.  Under 2.6, this appears to have gone away.
> 
> 
> I don't know about 2.6, (still living with 2.4) but can't you simply do:
> 
>   raidhotremove /dev/mdX /dev/hdYZ
> 
> followed by
> 
>   raidhotadd /dev/mdX /dev/hdYZ
> 
> or /dev/sdYZ if SCSI disks...
> 
> However, picking the right disk to remove might be tricky... And if you
> were at all unsure about data on the disks, maybe rebooting and doing a
> hard fsck of the partition(s) in maintenance mode might be a good thing
> too...

Nope, I want something that will specifically resync the parity from the
known good data on the disks.  Thanks to the raid5 resync bug from
earlier 2.6 kernels, I have hundreds of systems with terabytes of data
that have perfectly good data sitting on raid5 arrays with corrupt
parity.  If I remove a drive to force a resync, the data is immediately
corrupted.

Linux RAID *has* to have sort of way to force a parity resync.  If it
doesn't have one, it needs one.  That's a glaring omission to make.

Philip



^ permalink raw reply	[flat|nested] 16+ messages in thread
* RE: Force parity resync on raid5?
@ 2004-08-12 17:15 Salyzyn, Mark
  2004-08-12 18:16 ` Guy
  0 siblings, 1 reply; 16+ messages in thread
From: Salyzyn, Mark @ 2004-08-12 17:15 UTC (permalink / raw)
  To: Philip Molter, linux-raid

But, does this occur for full stripe writes?

-----Original Message-----
From: linux-raid-owner@vger.kernel.org
[mailto:linux-raid-owner@vger.kernel.org] On Behalf Of Philip Molter
Sent: Thursday, August 12, 2004 1:08 PM
To: linux-raid@vger.kernel.org
Subject: Re: Force parity resync on raid5?

No, it wouldn't.  In RAID5 implementations, parity isn't recalculated 
when you write to a RAID,  It's updated.  My understanding is that 
typical implementations are, *VERY* basically:

read the old data
xor with the new data
read the parity data
xor with the parity data
write the new data
write the new parity data


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

end of thread, other threads:[~2004-08-12 18:16 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-09 23:10 Force parity resync on raid5? Philip Molter
2004-08-10  9:04 ` Gordon Henderson
2004-08-12  4:06   ` Guy
2004-08-12 11:52     ` Philip Molter
2004-08-12 12:31     ` David Greaves
2004-08-12 15:22       ` Guy
2004-08-12 16:26         ` David Greaves
2004-08-12 17:07           ` Philip Molter
  -- strict thread matches above, loose matches on Subject: below --
2004-08-10 12:03 Philip Molter
2004-08-10 12:39 ` Neil Brown
2004-08-10 14:30   ` Philip Molter
2004-08-11  2:28     ` Neil Brown
2004-08-11  3:37       ` Philip Molter
2004-08-11  9:23       ` David Greaves
2004-08-12 17:15 Salyzyn, Mark
2004-08-12 18:16 ` Guy

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