Is it possible to add more than 2 disks for parity in mdadm raid 6? I need to build a storage of 20 disks. How to build a raid that would be reliable?
-
1"How to build a raid that would be reliable?" - That is a very broad open ended question and topic not really easily answered in our Q&A format. For starters: a soft- or hardware RAID solution is never a substitute for proper back-ups. - Also see: https://serverfault.com/q/339128/37681 – HBruijn Nov 09 '23 at 13:31
-
In my personal opinion, I would never ever use RAID5 or RAID6 again these days. This technic is obsolote and dangerous. Either use RAID1 or JBOD and always do backup! Speaking of RAID1/JBOD, take a look at filesystems BTRFS or ZFS which have RAID function at filesystem level, which is way more performant and safer to use than block level RAID. – paladin Nov 09 '23 at 16:44
2 Answers
As far as I could quickly glance, with RAID 6 Linux mdadm does not actually use dedicated parity disks, but rather distributes the parity blocks over the devices that make up the RAID6 array. The number of parity blocks is always 2.
Raid 6
The mathematics allows the calculation of an arbitrary number of parity blocks, but linux raid only uses two, which we call P and Q. As with raid-5, the parity blocks are scattered amongst the devices
...
Raid 6 is the only raid level wheremdadmmay complain that it cannot carry out a conversion directly between levels 4, 5 and 6. This is down to the way the parity blocks are scattered amongst the devices.
(Source: https://raid.wiki.kernel.org/index.php/A_guide_to_mdadm - emphasis mine)
- 80,330
- 24
- 138
- 209
-
If I have 19 disks in raid 6. Does this reduce reliability compared to raid 6 of 6 disks? – PetroIvanov Nov 09 '23 at 13:29
-
Please read up on the RAID levels and considerations in the Q&A I linked in my other comment directly under your question. – HBruijn Nov 09 '23 at 13:45
DO NOT create a R6 with 20 disks - that's what R60 is for - just do that, and HBrujin is correct - inherently R6 stripes the protection data around all disks.
- 101,651