I built a RAID setup with three drives, two 1.5 TB (sdb and sdd) and one 3TB (sdc). My approach is to combine the two 1.5 TB drives into a RAID0 drive (md3), and create a RAID1 mirror (md2) with the 3TB drive (sdc) and the RAID0 array (md3). This all works.
The problem: whenever I reboot the computer, the RAID1 array (md2) only sees one active drive (sdc), even though the RAID0 array (md2) correctly starts up. I have to manually re-add the md2 array each time. What's going on? Is there someway to make the system assemble md3 before it assembles md2?
I already had the md2 drive with sdc. Generally speaking, I've run the commands (approximately):
mdadm --create --verbose /dev/md3 --level=stripe --raid-devices=2 /dev/sdb /dev/sdd
mdadm /dev/md2 --add /dev/md3
mdadm --detail --scan >> /etc/mdadm/mdadm.conf
I also added "DEVICE partitions containers /dev/md3" to the mdadm.conf file. This is all on Debian 6.0.8.
More information: After rebooting, /proc/mdstat reads (edited out the md0 and md1 info):
Personalities : [raid0] [raid1]
md3 : active raid0 sdb[0] sdd[1]
2930274304 blocks super 1.2 512k chunks
md2 : active raid1 sdc[4]
1415577600 blocks super 1.2 [2/1] [U_]
unused devices: <none>
It seems that md3 (the RAID1 array) has forgotten about md2.
There is also something fishy during startup.
dmesg | grep -i 'md2\|md3\|raid'
[ 2.537001] md: raid0 personality registered for level 0
[ 2.539298] md: raid1 personality registered for level 1
[ 2.620402] md: md2 stopped.
[ 2.623636] raid1: raid set md2 active with 1 out of 2 mirrors
[ 2.623655] md2: detected capacity change from 0 to 1449551462400
[ 2.625028] md2: unknown partition table
[ 2.914801] md: md3 stopped.
[ 2.919365] raid0: looking at sdb
[ 2.919368] raid0: comparing sdb(2930274304)
[ 2.919370] raid0: END
[ 2.919371] raid0: ==> UNIQUE
[ 2.919372] raid0: 1 zones
[ 2.919373] raid0: looking at sdd
[ 2.919374] raid0: comparing sdd(2930274304)
[ 2.919376] raid0: EQUAL
[ 2.919377] raid0: FINAL 1 zones
[ 2.919380] raid0: done.
[ 2.919381] raid0 : md_size is 5860548608 sectors.
[ 2.919382] ******* md3 configuration *********
[ 2.919397] md3: detected capacity change from 0 to 3000600887296
[ 2.921296] md3: unknown partition table
[ 3.244104] raid1: raid set md1 active with 2 out of 2 mirrors
[ 3.468709] raid1: raid set md0 active with 2 out of 2 mirrors