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 a dedicated server at 1and1 with a software RAID. I believe it's running CentOS. The hardware team at 1and1 replaced the secondary hard drive (sdb) and then I followed these instructions to rebuild the array:

At step 9 I was not able to view mdadm.conf as it was a generic file without my configuration. I still continued on as I knew the array was built exactly as the instructions have laid out anyway.

I think this is a GRUB problem? Maybe I need to reconfigure mdadm.conf? I have no idea how to fix it. 1and1 allows me to boot into a recovery console which is pretty much just a live CD.

When I run cat /proc/mdstat from the recovery console:

rescue:~# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [faulty]
md1 : active raid1 sda1[0] sdb1[1]
      3911680 blocks [2/2] [UU]

md3 : active raid1 sda3[1] sdb3[0]
      482512192 blocks [2/2] [UU]

unused devices: <none>

Boot log from booting into recovery:

(Specifically I noticed this error: Assembling MD arrays...[31mfailed (no arrays found in config file or automatically) )

share|improve this question
up vote 3 down vote accepted

mount /dev/md1 /mnt chroot /mnt <---this part is important because it will ensure the grub configuration you are saving to is the /dev/md1 volume grub

At the GRUB prompt, issue the following commands in order:

grub> device (hd0) /dev/sda grub> root (hd0,0)
grub> setup (hd0)
grub> device (hd1) /dev/sdb
grub> root (hd1,0)
grub> setup (hd1)
share|improve this answer
Note that you need to have the /dev node entries in the new root, which might not be the case with a newer system that mounts devfs. In this case, before doing the chroot, use something like tar cf - /dev/sd* | tar -C /mnt -xvf - to copy your device nodes first. (You can also mknod them manually, but using tar is faster and less error-prone) – Guntram Blohm Apr 13 '15 at 11:54

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.