Re: Debian RAID-1 problem

From: Adam Bultman <adamb@glaven.org>
Date: Wed Feb 23 2005 - 15:45:50 AKST

I *just* installed Fedora Core 2 on a system last night on a mirrored
/boot/ partition (and I made / a three-disk RAID5, ide, software - wow
it's slow).

When I get home, I'll yank that box out of the closet and fire it up.

However, I have a few boxes at work that boot from RAID. They aren't
fedora (well, come tonight I'll have a dual-IDE fedora core 2 box that
we can compare against) but we use grub.

I'd suggest you use grub. It seems to be a little more savvy about
RAID1, especially IDE raids.

You have your grub config files on each drive, and then you run grub on
each drive.

Here's my grub.conf file:

#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/md1
# initrd /initrd-version.img
#boot=/dev/hda
default=1
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-28.7smp)
        root (hd0,0)
        kernel /vmlinuz-2.4.20-28.7smp ro root=/dev/md1
        initrd /initrd-2.4.20-28.7smp.img
title Red Hat Linux (2.4.20-19.7smp)
        root (hd0,0)
        kernel /vmlinuz-2.4.20-19.7smp ro root=/dev/md1
        initrd /initrd-2.4.20-19.7smp.img

I'll run grub for each drive, specifying which drive I want to install
to each time.

Then, I'll boot from the 'good' drive (you need to fiddle with the bios
settings) and then inside linux, cat your /proc/mdstat file, see what it
says, and then try to use 'raidhotadd' to add the other drive in. You
don't need to rsync the data, just make sure the partitions are correct,
and raidhotadd it - it'll sync for a loooooong time, and you can
continue to cat your mdstat file to see the progress.

It took a few hours to rebuild the RAID1 on the system I'm mentioning -
it was a 37G partition.

If you bring the box on Friday, I will be there at the meeting
(finally!), I'll bring my spare box and we can fiddle with it (I have 5
drives available for that machine) if someone wants to bring an IDE cable.

Adam

damien hull wrote:

>On Thu, 2005-02-17 at 22:23 -0900, Arthur Corliss wrote:
>
>
>>On Thu, 17 Feb 2005, KJA List Mail wrote:
>>
>>
>>
>>>Hi all,
>>>I'm having trouble getting Debian 3.0 to boot off of a RAID-1 array. I or=
>>>iginally installed onto the first SATA hard disk, but now I'm trying to c=
>>>onvert it into a mirror array with the second disk. I created a degraded =
>>>RAID-1 array /dev/md0 with only /dev/sdb1 as a member, mounted it, format=
>>>ted it, and rsynced the contents of /dev/sda1 over to it. Am I doing this=
>>> the right way? When GRUB attempts to boot off the array, the kernel pani=
>>>cks, claiming "ext3-fs: cannot read superblock". However, when I boot off=
>>> of sda1 the array md0 shows up fine with sdb1 as a member.
>>>
>>>Debian 3.0 Woody with custom kernel-2.6.10 with raid1 compiled in, 2x 80G=
>>>b SATA hard disks.
>>>
>>>I've scoured ever message board, forum, and howto document I could find o=
>>>n the subject with no luck. Help greatly appreciated.
>>>
>>>
>>I use LILO rather than Grub, but I've found that you must install the boot
>>block in the MBR only. If you try to install it into the partition superblock
>>you can end up destroying the filesystem.
>>
>>Of course, that's just how I ended up getting all that to work. There's
>>probably at least a hundred ways to do them right, and I may be way off. ;-)
>>
>> --Arthur Corliss
>> Bolverk's Lair -- http://arthur.corlissfamily.org/
>> Digital Mages -- http://www.digitalmages.com/
>> "Live Free or Die, the Only Way to Live" -- NH State Motto
>>---------
>>To unsubscribe, send email to <aklug-request@aklug.org>
>>with 'unsubscribe' in the message body.
>>
>>
>>
>>
>I'm using Fedora Core 3 with software RAID 1. I set it up during the
>installation. Fedora uses Grub as the boot loader. I don't fully
>understand what's going on during the boot process but I think the
>system boots off of a drive and not an array.
>
>I created two arrays. One for /boot and one for / .
>
>Here's my Grub configuration. Fedora uses the "Logical Volume Manager"
>so some of this may be a little confusing. Just think of them as
>partitions. Either way they are all device files in /dev.
>
>
># grub.conf generated by anaconda
>#
># Note that you do not have to rerun grub after making changes to this
>file
># NOTICE: You have a /boot partition. This means that
># all kernel and initrd paths are relative to /boot/, eg.
># root (hd0,0)
># kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol01
># initrd /initrd-version.img
>#boot=/dev/sda1
>default=0
>timeout=5
>splashimage=(hd0,0)/grub/splash.xpm.gz
>hiddenmenu
>title Fedora Core (2.6.10-1.760_FC3)
> root (hd0,0)
> kernel /vmlinuz-2.6.10-1.760_FC3 ro
>root=/dev/VolGroup00/LogVol01 rhgb quiet
> initrd /initrd-2.6.10-1.760_FC3.img
>title Fedora Core (2.6.10-1.741_FC3)
> root (hd0,0)
> kernel /vmlinuz-2.6.10-1.741_FC3 ro
>root=/dev/VolGroup00/LogVol01 rhgb quiet
> initrd /initrd-2.6.10-1.741_FC3.img
>title Fedora Core (2.6.9-1.667)
> root (hd0,0)
> kernel /vmlinuz-2.6.9-1.667 ro root=/dev/VolGroup00/LogVol01
>rhgb quiet
> initrd /initrd-2.6.9-1.667.img
>
>
>
>
>
>---------
>To unsubscribe, send email to <aklug-request@aklug.org>
>with 'unsubscribe' in the message body.
>
>
>

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Wed Feb 23 15:48:59 2005

This archive was generated by hypermail 2.1.8 : Wed Feb 23 2005 - 15:48:59 AKST