Linux – CentOS – hardware raid 1 of two drives not being treated as single drive by fdisk

centoslinuxraid1

I am a bit new to hardware configuration in general, much less with linux, so please give me a little slack 🙂

I have the following setup: 1 320GB Drive that contains the OS (centOS) and 2 250GB drives that have a hardware RAID1 configuration (accomplished via my ASUS motherboard raid utility, they are mirrored as one device)

The problem is that everywhere I am reading online, the centOS is supposed to see the 2 disks that have RAID1 as a single device. However, when I run fdisk -l I am shown the three disks individually, the 320GB drive (/dev/sdc) and the individual 250GB drives (/dev/sda) and (/dev/sdb)

I was under the impression that I was supposed to see two, the /dev/sda (OS drive) and some kind of 'raid' device (/dev/sdb) that I can select for partitioning and then mounting.

What am I doing wrong? Because I will need to repeat this process when I install another 2 drives for RAID1 for another purpose – I need to get this down right.

Best Answer

What you have is evidently not hardware RAID but software RAID with a BIOS interface, often called fakeRAID. The main job of putting the disks in an array is done by the Windows driver. Related reading: How do I differentiate “fake RAID” from real RAID?

There are two advantages to hardware RAID over software RAID: it's independent of the operating system (which is only useful if you dual-boot), and it can perform better in some configurations (essentially those that require a cross-drive checksum, which is not the case of RAID-1). Software RAID has the advantage of being independent of the hardware (you can take your disks out and plug them into another machine running the same OS) and tends to come with better tools.

So, forget about your motherboard's fake RAID and use Linux's software RAID. The main tool you'll need to use is mdadm. Create a RAID-1 volume encompassing the two disks, then create partitions on that volume. Something like:

mdadm --create /dev/md0 -l 1 -n 2 /dev/sda /dev/sdb
fdisk /dev/md0