mdadm.conf and RAID 1 on Ubuntu
I am a newbie. And have absolutely done a terrible newbie thing. When installing Ubuntu on our servers I set up a RAID 1 on all partitions on two SATA disk drives. Logically, I made all sda partitions devices and all sdb partitions spares. You can image the horror when we disconnected the sda drive to test the sdb drive on boot.
For those of you who don't quite understand my configuration here is the result of the following commands: Code:
$ cat /proc/mdstat Code:
$ sudo mdadm --query --detail /dev/md0 Code:
devices=1 spare=1 |
It takes a lot of balls to admit a mistake like that, so I think you deserve some help.
First off, the purpose of mdadm.conf is to tell the OS what to expect. It has nothing to do with how software raids are configured. But not to despair, the fix is easy! What you need to do is to --grow the raid1s. Look at the mdadm man page for more info about using -G (--grow). I set up a --grow example (see below) for you to look at. Modify the --grow commands to match your situation. Be sure to let the rebuild processes finish before you reboot. When all of the raids have been rebuilt and before you reboot, update mdadm.conf as is shown at the end of the example (Very, Very, Very Important!!!). Code:
# mdadm -C /dev/md14 -l1 -n1 -x1 /dev/hd[eg]14 --force |
Thank you
Thank you so much for the advice, although on the test server the procedure worked fine, but on the production server when I tried to install grub so that the server could boot from either hardrive on startup for fault-tollerance, I get the following error:
Code:
# grub-install /dev/sda Code:
grub> find /boot/grub/stage1 Stayed up all night trying to configure grub to boot from either disk on start up in case of disk failure :confused: |
Sounds like you’re running a Dell with the FAT16-based Dell Utility as the first partition.
Try searching for grub stage1 slightly differently: Code:
grub> find /grub/stage1 |
Sorry that did not work either...
Yes you were right, it is a Dell
Quote:
Code:
~$ ls -l /boot/grub/stage* Code:
grub> find /boot/grub/stage1 Code:
grub> find /grub/stage1 |
The Raid 1 Mirror seems to be working
So I disconnected sda primary hardrive and tried to boot from the second hardrive sdb and it won't boot. A message comes up as
Quote:
|
“No Loader” sounds like a system BIOS issue.
Make sure the system BIOS boot options for the hard drives are correct. |
well we tested that...
We disconnected the good drive and the one with the bad loader wouldn't boot weather it was plugged into SATA-0 or SATA-1 (on the motherboard) as if it was a good drive. It has a mirror images of all four partitions of the "good" drive (this was accomplished after your great advice to Grow the RAID Devices) By default, shouldn't it boot as well? Or as you are saying the BIOS recognizes drives other than by where they are connected? Because the BIOS is configured to boot from CDROM first, and then to any available hard-drive. We don't think that is the problem. What do you reccommend? We appreciate all you help, and we thank you for all your good advice.
:confused: |
grub is not connecting to filesystem...
:eek: It appears that grub is not communicating with the filesystem. When I reinstall grub and add device /dev/sdb it will not allow me to
Code:
grub> setup (hd0) Our system boots fine with sda, although not with sdb. We believe that during duplication something may have gone wrong. So we would like to remove,reformat sdb and reinstall it to duplicate all over again then maybe grub will be able to communicate with the file system on disk sdb. Do we need to partition the newly formated drive or not? Does Ubuntu software RAID1 take care of it? We are very grateful for you help, and apprecitate all the time and effort you have given us. Hope to hear from you soon. :scratch: |
Starting back at the beginning sounds like a plan.
There should be no problem in reusing the existing disk partition structure, but as you already know, be sure to have the Debian installer reformat the filesystems so that you start with a clean slate. |
Which Debian Installer would you recommend?
Won't a debian installer install the OS onto the drive after formatting it? Can't I just fdisk the disk on another machine and format it that way? Although, should I be formatting LinuxRAID or XFS3?
|
At the step where you select the mount points, you need to specify how you want each partition/logical volume formatted (e.g., leave it alone, ext3, reiserfs, etc.).
|
All times are GMT -5. The time now is 02:56 PM. |