1

I'm investigating using LVMRAID instead of MD+LVM. In my case, I'm looking at a RAID6.

As expected, the docs say you need N+1 devices for RAID5, and a minimum of 3 drives.

The docs say for RAID 6 you need N+2.

However, it then says that the minimum drives required is 5.

In an MD RAID6, only 4 drives are required. So if I built RAID6+LVM I'd only need 4 drives whereas, according to the docs, I'd need 5 drives for LVMRAID6.

Does LVMRAID6 really need 5 drives?

If so, why does it need 5 drives rather than MDRAID6's 4 drives?

1 Answers1

3

This seems to be hardcoded in the source code. Here a minimum of 3 stripes is the minimum, which excludes the parity disks. So that in turn is 5 disks for a RAID6.

Unfortunately the commit message does not show the motivation behind the decision. You might want to ask this on the linux-vm mailing list.

Thomas
  • 4,225
  • 5
  • 23
  • 28
  • 1
    +1 for reading the source code! – Colt Sep 16 '18 at 22:02
  • 1
    This is what Heinz said on the linux-lvm mailing list: "We do have a constraint in lvm2 to require the raid6 minimum for N to be 3. Configuring a raid6 LV (an array by MD terms) with 2 data stripes is suboptimal for performance, because data striping is minimal in this case. In addition, the metadata overhead is maximal for parity, P- and Q-syndromes being half of the brutto size of the raid6 LV." – tudor -Reinstate Monica- Sep 17 '18 at 23:25