Red Hat Topics - RAID1 setup for failover

This is Interesting: Free IT Magazines  
Home > Archive > Red Hat Topics > September 2004 > RAID1 setup for failover





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author RAID1 setup for failover
Jim Gottlieb

2004-09-15, 11:11 am

Hello. I'm trying to figure out what I should be doing in the area of
setting up our systems for RAID1 (mirroring).

Whenever I have built new Red Hat or Fedora machines lately, I have
always installed two drives and set up RAID1 during the install
process.

Today I decided to test this and simulated a failure of the boot drive
and found that the system wouldn't boot because grub was not installed
on the second drive. So after reading some conflicting advice, I
edited /boot/grub/menu.lst and added a second boot option so now I have:

default=0
fallback=1
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Fedora Core (2.4.22-1.2115.nptlsmp) disk1
root (hd0,0)
kernel /vmlinuz-2.4.22-1.2115.nptlsmp ro root=/dev/md1
initrd /initrd-2.4.22-1.2115.nptlsmp.img
title Fedora Core (2.4.22-1.2115.nptlsmp) disk2
root (hd1,0)
kernel /vmlinuz-2.4.22-1.2115.nptlsmp ro root=/dev/md1
initrd /initrd-2.4.22-1.2115.nptlsmp.img

and then I went into grub and did a:
grub> root (hd1,0)
grub> setup (hd1)
grub> quit

When I noticed that unplugging one of the drives brought up a grub menu
with the new option missing, I repeated the above for hd0. Maybe that
was a mistake? This seemed to let me boot off either drive, but the
output of the below are the same. Maybe I messed something up?

I'm also confused about the output of 'cat /proc/mdstat':

Personalities : [raid1]
read_ahead 1024 sectors
md1 : active raid1 hda2[0]
78204352 blocks [2/1] [U_]

md0 : active raid1 hda1[0]
104320 blocks [2/1] [U_]

I don't even see the second drive listed there and it seems to say the
second drive is down ([U_]). But it's listed in /etc/raidtab:

raiddev /dev/md1
raid-level 1
nr-raid-disks 2
chunk-size 64
persistent-superblock 1
nr-spare-disks 0
device /dev/hda2
device /dev/hda2
raid-disk 0
device /dev/hdc2
raid-disk 1
raiddev /dev/md0
raid-level 1
nr-raid-disks 2
chunk-size 64
persistent-superblock 1
nr-spare-disks 0
device /dev/hda1
raid-disk 0
device /dev/hdc1
raid-disk 1

So I'm confused. Any advice would be appreciated.

Thanks...
P.T. Breuer

2004-09-15, 11:11 am

Jim Gottlieb <jimmy@temp01.nccom.com> wrote:
> I'm also confused about the output of 'cat /proc/mdstat':
>
> Personalities : [raid1]
> read_ahead 1024 sectors
> md1 : active raid1 hda2[0]
> 78204352 blocks [2/1] [U_]
>
> md0 : active raid1 hda1[0]
> 104320 blocks [2/1] [U_]
>
> I don't even see the second drive listed there and it seems to say the
> second drive is down ([U_]). But it's listed in /etc/raidtab:


It is down, and therefore not listed. What would you expect! You
simulated a failure, so it failed! Now you have to replace the failed
drive with a working drive.


man raidhotadd


What is in raidtab is only a description of the initial setup for the
array, not the array. What are you confused about?

And why would you expect the raidtab to even be read by the kernel?
How!

Peter
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com