Booting machine after removing hard-disks from software raid array

From Notes_Wiki

Home > CentOS > CentOS 6.x > System administration tools > Filesystem, partition or disk related tools > Software raid configuration > Booting machine after removing hard-disks from software raid array

When we try to boot after removing one hard-disk in some cases the system may boot properly. In other cases it would give error that partition or device '/dev/md<n>' does not exists. In such case we have to boot using linux installation cd in rescue mode and follow these steps:

  1. chroot /mnt/sysimage
  2. more /proc/mdstat
  3. mdadm --auto-detect
  4. more /proc/mdstat
  5. mdadm --detail -sv
  6. mdadm --detail -sv > /etc/mdadm.conf
  7. sync
  8. exit
  9. exit

After this the system should boot. In case you have added new spare hard-disk then you must partition it appropriately. Use 'partprobe' to detect new partitions and then use 'mdadm' as explained above to add these new partitions in existing raid array.


Resolving kernel panic error

If RAID configuration is not proper, esp if device used as / (/dev/sda1 of /dev/md0) has [_] in more /proc/mdstat, then system may fail to boot. To resolve this use:

  1. Boot into rescue mode
  2. chroot /mnt/sysimage
  3. grub-install /dev/sdb
    where /dev/sdb1 is part of /dev/md0 along with /dev/sda1 and /dev/sdb1 is working properly.


Home > CentOS > CentOS 6.x > System administration tools > Filesystem, partition or disk related tools > Software raid configuration > Booting machine after removing hard-disks from software raid array