Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been beating my head with an issue here, and I'm now turning to the internet for help.

I have a system running Mandrake Linux, with the following configuration:

  • /dev/hda - This is a IDE drive. Has some partitions on it that boot the system and make up most of the file system.
  • /dev/sda - This is drive 1 of 2 for a software raid /dev/md0
  • /dev/sdb - This is drive 2 of 2 for a software raid /dev/md0

md0 gets mounted but fstab as /data-storage, so it is not critical to the systems ability to boot. We can comment it out of fstab, and the system works just fine either way.

The problem is, we have a failed sdb drive. So I shut the box down, and have pulled the failed disk and installed a new disk.

When the system boots up, /proc/mdstat shows only sda as part of the raid. I then run the various command to rebuild the RAID to /dev/sdb. Everything rebuilds correctly, and upon completion, you look at /proc/mdstat and it shows 2 drives sda1(0) and sdb1(1). Everything looks great.

Then you reboot the box ... UGH!!!

Once rebooted, sdb is missing again from the RAID. It is like the rebuild never happened. I can walk through the commands to rebuild it again, and it will work, but again, after reboot, the box seems to make sdb just vanish!

The real odd thing is, if after reboot, I pull sda out of the box, and try to get the system to load with the rebuilt sdb drive in the system, and when I do, the system actually throws and error just after grub, and says something about drive error, and the system has to shut down.

Thoughts??? I'm starting to wonder if grub has something to do with this mess. That the drive isn't being setup within grub to be visible at boot? This RAID array isn't necessary for the system to boot, but when the replacement drive is in there, without SDA it won't boot system, so it makes me believe there is something to that. On top of that, there just seems to be something wonky here the drive falling off of RAID after reboot.

I've hit the point of pounding my head on the keyboard. Any help would be greatly appreciated!!!

share|improve this question
Is the partition type of sdb1 "fd Linux raid autodetect" (use fdisk -l /dev/sdb to check)? The system won't boot off the new drive unless you explicitly install GRUB to the drives again. – mgorven Oct 24 '12 at 17:48
Sounds like your BIOS is configured to boot off SATA first, then IDE. This works for you now because sda has a grub boot loader installed that you're not aware of. Can you boot the computer with both sda and sdb disconnected? If so, that's good. If not, install the boot loader to hda and get that to work before you tackle the mirror problem. – longneck Oct 24 '12 at 18:14

Maybe it's too late now, but did you update your mdadm.conf file after adding you new drive? If you change a disk, your array won't have the same uuid anymore, and at reboot it will be looking for the old drive, not knowing that the new drive is here.

Here's the command to generate the lines for mdadm.conf :

mdadm --detail --scan

About the boot problem, your computer must use grub from sda to boot on hda, you have to change this in the bios and make sure grub is installed on hda as well.

share|improve this answer
Been bit by this before when I purged and re-did an array on a drive set. The old metadata (and UUID) caused all kinds of confusion. Purged the metadata by wiping the "front" of the disk with zeros, then made a new array - turned out fine. – Avery Payne Jan 26 '14 at 3:25

Try the following great tutorial on HowToForge. You probably missed one or more commands for mdadm, see:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.