On Fri, 7 Sep 2012 14:30:56 +0800 clplayer <cl.pla...@gmail.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

Attachment: signature.asc
Description: PGP signature

Reply via email to