On 09:08, H. Peter Anvin wrote: > Andre Noll wrote: > > > >> So back to my original question: Why does the kernel require 4 disks > >> for a raid6 instead of allowing 3? > > > > Dunno. Maybe Dan, Neil or HPA can tell the reason for imposing this > > limitation. > > > > It's very simple: it avoids an ugly corner case in the RAID-6 > computation code. Rather than inserting special code (and verifying it, > etc.) to deal with the 3-disk RAID-6 degenerate case, it was easier to > just not permit it. Out of curiosity, why is any special-casing needed for the 3-disk case? As P = D_0 + ... + D_{n-1} coincides with Q = g^0D_0 + ... + g^{n-1}D_{n-1} in the case n=1 (because only the first addend is present), we have D_0 = P = Q i.e. raid6 with three disks is the same as raid1. If we lose D_0 and P, the general formula for reconstruction, i.e. D_x = g^{-x}(Q + Q_x) still works for n=1: It reduces to D_0 = Q since x=0 and Q_0 = 0. So I don't see why special-casing the n=1 case is necessary. Regards Andre -- The only person who always got his work done by Friday was Robinson Crusoe
Attachment:
signature.asc
Description: Digital signature