Greetings-
I'm about to embark on a new installation of Centos 6 x64 on 4x SATA HDDs. The plan is to use RAID-10 as a nice combo between data security (RAID1) and speed (RAID0). However, I'm finding either a lack of raw information on the topic, or I'm having a mental issue preventing the osmosis of the implementation into my brain.
Option #1: My understanding of RAID10 using 4 drives (now known as a,b,c,d) is:
a+b - RAID1 (md0) c+d - RAID1 (md1)
md0+md1 - RAID0 (md3)
This is of course simplified as /boot needs to be on RAID1 (last I checked Grub couldn't boot from anything other than RAID1).
Option #2: I've also found the kernel provides a direct method of RAID10 without the manual assignment of the arrays as noted above. I performed a test installation, selecting RAID10 as the type in the installer, and it "works" but I'm just not seeing the distinction between what disks/partitions are actually the mirror or stripe portion of the array. Details:
[root@c6r10tester ~]# mdadm --detail /dev/md1 /dev/md1: Version : 1.1 Creation Time : Thu Mar 29 16:14:17 2012 Raid Level : raid10 Array Size : 36695040 (35.00 GiB 37.58 GB) Used Dev Size : 18347520 (17.50 GiB 18.79 GB) Raid Devices : 4 Total Devices : 4 Persistence : Superblock is persistent
Intent Bitmap : Internal
Update Time : Thu Mar 29 16:28:49 2012 State : active Active Devices : 4 Working Devices : 4 Failed Devices : 0 Spare Devices : 0
Layout : near=2 Chunk Size : 512K
Name : c6r10tester:1 (local to host c6r10tester) UUID : be38645d:4d3c8b77:0f6df687:08016c6a Events : 51
Number Major Minor RaidDevice State 0 8 3 0 active sync /dev/sda3 1 8 19 1 active sync /dev/sdb3 2 8 35 2 active sync /dev/sdc3 3 8 51 3 active sync /dev/sdd3
Am I overthinking this? Does the kernel handle the mirror/stripe configuration under the hood, simply presenting me with a magical RAID10 array? Or, is this something different and I really should be performing the RAID creation manually as noted in option #1?
Help me CentOS-Kenobi, you're my only hope.
--Tim
On 03/29/12 2:49 PM, Tim Nelson wrote:
Am I overthinking this?
yes.
Does the kernel handle the mirror/stripe configuration under the hood, simply presenting me with a magical RAID10 array?
yes.
Or, is this something different and I really should be performing the RAID creation manually as noted in option #1?
no. :)
On Thu, 2012-03-29 at 16:49 -0500, Tim Nelson wrote:
[root@c6r10tester ~]# mdadm --detail /dev/md1 /dev/md1: Version : 1.1 Creation Time : Thu Mar 29 16:14:17 2012 Raid Level : raid10
...
Layout : near=2 Chunk Size : 512K
...
Am I overthinking this? Does the kernel handle the mirror/stripe configuration under the hood, simply presenting me with a magical RAID10 array? Or, is this something different and I really should be performing the RAID creation manually as noted in option #1?
Two resources to look at are:
1) Wikipedia "Linux MD RAID 10"
http://en.wikipedia.org/wiki/Non-standard_RAID_levels#Linux_MD_RAID_10
2) mdadm manpage section for --layout= (the raid10 part)
"Finally, the layout options for RAID10 are one of ’n’, ’o’ or ’f’..."
The key to understanding your setup is mdadm --detail "Layout: near=2". The cited Wikipedia reference for a "standard near layout" describes your situation.
Steve
----- Original Message -----
On Thu, 2012-03-29 at 16:49 -0500, Tim Nelson wrote:
[root@c6r10tester ~]# mdadm --detail /dev/md1 /dev/md1: Version : 1.1 Creation Time : Thu Mar 29 16:14:17 2012 Raid Level : raid10
...
Layout : near=2 Chunk Size : 512K
...
Am I overthinking this? Does the kernel handle the mirror/stripe configuration under the hood, simply presenting me with a magical RAID10 array? Or, is this something different and I really should be performing the RAID creation manually as noted in option #1?
Two resources to look at are:
- Wikipedia "Linux MD RAID 10"
http://en.wikipedia.org/wiki/Non-standard_RAID_levels#Linux_MD_RAID_10
- mdadm manpage section for --layout= (the raid10 part)
"Finally, the layout options for RAID10 are one of ’n’, ’o’ or ’f’..."
The key to understanding your setup is mdadm --detail "Layout: near=2". The cited Wikipedia reference for a "standard near layout" describes your situation.
This is exactly the info I needed. Thank you for pointing me to it!
--tim
On Thu, Mar 29, 2012 at 04:49:26PM -0500, Tim Nelson wrote:
Am I overthinking this? Does the kernel handle the mirror/stripe configuration under the hood, simply presenting me with a magical RAID10 array? Or, is this something different and I really should be performing the RAID creation manually as noted in option #1?
I used to do something very similar to option 1, save that I used LVM to do the striping. I now use the md raid10 array. Rebuilds are dramatically faster under the 'just let md handle the raid10' option.