6

Linux mdadm has some quirks, one of them is building raid10 with only two disks. There are some reports that it's way faster (twice, both in read and write) as RAID1:

(raid1 vs raid10f2)

Is the raid10 on two disks as secure as raid1? What are the dangers of using such solution instead of "proper" raid1?

Gaia
  • 1,777
  • 4
  • 32
  • 58
neutrinus
  • 1,095
  • 7
  • 18

3 Answers3

2

Well, as the second link you provide suggests there's no certainty that mirrored stripes are on separate disks - so to be honest the concept is worthless and dangerous.

Chopper3
  • 100,240
  • 9
  • 106
  • 238
  • 2
    Not only that: http://marc.info/?l=linux-raid&m=141051176728630&w=2 *Obviously you pay a penalty in writing when you have such an arrangement - writes need to go to both disks, and involve significant head movement.* – Andrew Henle Nov 04 '15 at 11:46
  • Thanks for the link, great article! In raid1, you also need to write on both disks, only penalty is with head movement. – neutrinus Nov 04 '15 at 13:29
  • 7
    The provided answer is untrue and based on an unreliable source. RAID-10 on two disks is fully mirrored. RAID-10 near 2 is an equivalent of RAID-1. RAID-10 far 2 is a little different but still is a full, reliable mirror. Data survives when one disk dies. – Nowaker Jun 28 '16 at 22:07
  • @Nowaker, from what I've gathered, this seems true for a RAID 1+0, but not for a RAID 0+1. Per [this](https://serverfault.com/a/145326/164751). – ryanjdillon Sep 28 '21 at 16:00
  • @ryanjdillon The question was specifically about mdadm raid10. Not raid1, raid0, or their combination. – Nowaker Sep 29 '21 at 17:18
  • @Nowaker One could in theory assemble a RAID 0+1 array with `mdadm` and mistake this for being equivalent to a RAID 10 (a 'mdadm` one). I found your comment helpful, and I also found this extra information in context of what you said helpful. No harm in answering things not specifically asked if it helps paint a fuller picture than what a question may have anticipated. – ryanjdillon Sep 30 '21 at 07:55
2

A 2-disk RAID10 is useful for one, and only one, kind of access: single-threaded, sequential, large-block IO read requests. In that specific scenario, it behave similarly to a RAID0 setup.

For all other uses, (random read/writes, multithreaded access, ecc) a simple, cleaner RAID1 array is better due to significantly less head seeks (which are very expensive on a mechanical drive).

shodanshok
  • 44,038
  • 6
  • 98
  • 162
  • I know this is an old entry but reconsidering this and not finding much info. Using this (raid 10 with 2 disks as a raid1) with two nvm x4 drives. I am assumming the "mechanical overhead" does not apply to nvm/ssd units. So far working fine for me but having some odd I/O errors on the unit and trying to gather if it could be related to using raid10 instead of 1 – luison Feb 07 '20 at 19:16
1

While not a comment about security, Pat Reagan explains his choice to use RAID 10 with 2 disks was guided by his expectation to grow the array in the future, as growing a RAID 10 is much simpler than later converting a RAID 1 to a RAID 10 or 6.

Also worth noting is that mdadm v3.3+ allows you to grow a RAID 10, where earlier versions do not.

A comment in this SO answer mentions RAID10 can only be grown with near2, not far2. I haven't verified this.

ryanjdillon
  • 141
  • 4