[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20120907164833.540cf96d@notabene.brown>
Date: Fri, 7 Sep 2012 16:48:33 +1000
From: NeilBrown <neilb@...e.de>
To: clplayer <cl.player@...il.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: Content Of Files May Be Changed After One Disk Is Failed In
RAID5
On Fri, 7 Sep 2012 14:30:56 +0800 clplayer <cl.player@...il.com> wrote:
> > --assume-clean is not safe with RAID5 unless the array actually is clean.
> > It is safe with RAID1 and RAID6 due to details of the specific implementation.
> > So I suspect that is the cause of the corruption.
> >
> > NeilBrown
> >
>
> Thank you for the information.
>
> I have removed --assume-clean in the script and executed the stress
> after that raid5 completed resync.
>
> The files are all consistent in the rest tests.
>
> I am now wondering, what's different between the implementation of
> raid5 algorithm and of raid6 algorithm?
>
> Would you please suggest some hints in the implementation?
>
> Thank you,
> Peng.
RAID5 will sometimes update the parity block by
read old parity and data blocks
subtract old data block from parity block
add new data block to parity block
write new data and parity.
When it does this, if the parity was wrong before, it will still be wrong
afterwards.
RAID6 doesn't do that, because 'subtracting' old data from the 'Q' parity
block is complicated and hasn't been implemented. So RAID6 always calculates
the 2 parity blocks from the actual data. So every time you write a parity
block you can be sure it is correct.
NeilBrown
Download attachment "signature.asc" of type "application/pgp-signature" (829 bytes)
Powered by blists - more mailing lists