4

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:

http://faq.1and1.com/dedicated_servers/root_server/linux_recovery/10.html

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) )

http://pastebin.com/TcP4RFP2

longneck
  • 22,793
  • 4
  • 50
  • 84
Nick
  • 43
  • 3

1 Answers1

3

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)
obsidian
  • 194
  • 1
  • 7
  • 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