[CentOS] CentOS 6.2 on partitionable mdadm RAID1 (md_d0) - kernel panic with either disk not present

Tue Jun 19 17:37:16 UTC 2012
Arun Khan <knura9 at gmail.com>

Environment:
CentOS 6.2 amd64 (min. server install)
2 virtual hard disks of 10GB each
Linux KVM

Following the instructions on CentOS Wiki
<http://wiki.centos.org/HowTos/Install_On_Partitionable_RAID1>  I
installed a min. server in Linux KVM setup (script shown below)

<script>
#!/bin/bash
nic_mac_addr0=00:07:43:53:2b:bb

kvm \
-vga std \
-m 1024 \
-cpu core2duo \
-smp 2,cores=2 \
-drive file=/home/arunk/KVM/vdisks/centos62.raid1.disk1.img \
-drive file=/home/arunk/KVM/vdisks/centos62.raid1.disk2.img \
-net nic,vlan=1,model=e1000,macaddr=${nic_mac_addr0} \
-net tap,vlan=1,ifname=tap0,script=no,downscript=no \

</script>

The system boots fine when both disks are available.
When I remove either of the disks (delete the -drive file= line), the
system boots to a point wherein the GRUB menu is displayed and the
progress bar displays for a while till the white bar reaches about
halfway point and then it:

Kernel panic - not syncing: Attempted to kill init!

The purpose of the above exercise was to test if the system will work
in spite of losing one of the disks which is what RAID1 is supposed to
do (I am emulating by removing the disk image line from the definition
of the system).

Has anyone tested CentOS 6.2 on partitionable mdadm RAID1 setup in
bare metal hardware?

Any suggestions/ideas as to what I may doing incorrectly?

FWIW, outputs from "fdisk -l"  and "df -hT"

<fdisk -l>
root at centos62-raid1 ~ >
# fdisk -l

Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000e8353

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         523     4194304   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2             523        1045     4194304   83  Linux
/dev/sda3            1045        1176     1048576   82  Linux swap / Solaris

Disk /dev/sdb: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000e8353

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1         523     4194304   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sdb2             523        1045     4194304   83  Linux
/dev/sdb3            1045        1176     1048576   82  Linux swap / Solaris

Disk /dev/md_d0: 10.7 GB, 10737352704 bytes
2 heads, 4 sectors/track, 2621424 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000e8353

      Device Boot      Start         End      Blocks   Id  System
/dev/md_d0p1   *         257     1048832     4194304   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/md_d0p2         1048833     2097408     4194304   83  Linux
Partition 2 does not end on cylinder boundary.
/dev/md_d0p3         2097409     2359552     1048576   82  Linux swap / Solaris
Partition 3 does not end on cylinder boundary

</fdisk -l>

<df -hT>

# df -hT
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/md_d0p1  ext4    4.0G  1.9G  1.9G  50% /
tmpfs        tmpfs    499M     0  499M   0% /dev/shm
/dev/md_d0p2  ext4    4.0G  136M  3.7G   4% /home

</df -hT>

-- Arun Khan