[NBLUG/talk] Raid Help

Walter Hansen gandalf at sonic.net
Thu Jan 8 17:22:01 PST 2004


     Well thanks for all the help guys :-)

     It turns out that Grub does not work for Raid1 arrays. Lilo is the
way to go. This is all about being able to boot from etihor disk in
the event of a failure. I was unable to find a way to do this with
grub and had problems making a boot floppy that would work correctly
with the SCSI drives and a custom kernel. I'll try to figgure that
one out in the future I think. (Boot floppies don't want to boot to a
scsi disk. I think "linux root=/dev/sda5" [my root partition] might
do the trick as an option for the boot disk though and I can probably
even edit the floppy so it does that) Anyway I managed to install
lilo correctly after many tries. I did this by taking the one drive
down and installing it there with a custom lilo.conf. Then when I got
it to boot correctly, I made a lilo.conf.sdb and set it to write to
the second drive. I then unmounted boot, turned off the boot raid
array and remounted /dev/sdb1 on /boot so that it wasn't raided. Then
I ran lilo with the custom conf and rebooted and volia (after three
or four tries) it booted on the second drive.

     Now I've booted with this one, booted with that one, booted with both
and they all work. So now I'm packing up the deffective drive to send
back to LALA land for repair/replace.

     By the way there is a special trick to the lilo.conf files, they have
to be set to disk and boot /dev/sda and root /dev/md1 or wherever
your root directory is on your raid array. Also I had a line in there
bios = 0x80, but I'm not exactly sure if that's required as my bios
lets me configure which drive to boot from. I beleive it sets it to
boot the first drive in the scsi chain. (love to hear if I'm right)

     Well that took about two days work to figure out. What doesn't kill
me makes me stronger or at least a better resume.

     I think the problem with making a boot disk is because I didn't
include support for MS-DOS filesystems when I compiled the custom
kernal and for some reason the redhat mkbootdisk seems to need that.
I should probably re-compile the kernal and then try again. By the
way, it's a pain in the butt if you're scsi card requires a custom
kernal to work and your CD-ROM is on that card. I think they should
have used an addapter on the built in second ultra-scsi port when
they built this.


                                 -Walter

> System RH 8.0
>   Dual SCSI 18GB drives in Raid 1 array (ID 0,1)
>
> Drive 1 failed.
>
> I noticed that drive 0 had problems as well by the IBM/Hatachi testing
> program.
>
> I removed drive 1 and sent it in. Got the factory replacement and
> installed it.
>
> Using fdisk I partitioned the drive the same as drive 0. Except I didn't
> use the Win95 Ext'd (LBA) that redhat had apparantly set, instead using
> the normal Extended partitiion.
>
> I then used raidhotadd to re-construct the array.
>
> Now I'm trying to remove Drive 0 to send it in for replacement and I've
> found that it won't just boot on Drive 1. It hangs after the Beep before
> loading Grub.
>
> I did check and had forgot to set the boot partition on the new Drive 1,
> so I set it and then re-booted with the same results.
>
> I'm going to be looking into this myself today, but I thought someone
> might know what was going on with this or be able to point me in the
> right direction. I've included all the relavant files and information I
> can think of below:
>
> # mount
> /dev/md1 on / type ext3 (rw)
> none on /proc type proc (rw)
> /dev/md0 on /boot type ext3 (rw)
> none on /dev/pts type devpts (rw,gid=5,mode=620)
> /dev/md2 on /home type ext3 (rw)
> none on /dev/shm type tmpfs (rw)
> /dev/md3 on /tmp type ext3 (rw)
> /dev/md4 on /usr type ext3 (rw)
> /dev/md5 on /var type ext3 (rw)
>
>
> Drive 0(fdisk):
> Disk /dev/sda: 255 heads, 63 sectors, 2231 cylinders
> Units = cylinders of 16065 * 512 bytes
>
>    Device Boot    Start       End    Blocks   Id  System
> /dev/sda1   *         1        13    104391   fd  Linux raid autodetect
> /dev/sda2            14      1033   8193150   fd  Linux raid autodetect
> /dev/sda3          1034      1288   2048287+  fd  Linux raid autodetect
> /dev/sda4          1289      2231   7574647+   f  Win95 Ext'd (LBA)
> /dev/sda5          1289      1415   1020096   fd  Linux raid autodetect
> /dev/sda6          1416      1480    522081   fd  Linux raid autodetect
> /dev/sda7          1481      1513    265041   fd  Linux raid autodetect
> /dev/sda8          1514      1526    104391   fd  Linux raid autodetect
>
> Drive 1(fdisk):
> Disk /dev/sdb: 255 heads, 63 sectors, 2231 cylinders
> Units = cylinders of 16065 * 512 bytes
>
>    Device Boot    Start       End    Blocks   Id  System
> /dev/sdb1   *         1        13    104391   fd  Linux raid autodetect
> /dev/sdb2            14      1033   8193150   fd  Linux raid autodetect
> /dev/sdb3          1034      1288   2048287+  fd  Linux raid autodetect
> /dev/sdb4          1289      2231   7574647+   5  Extended
> /dev/sdb5          1289      1415   1020096   fd  Linux raid autodetect
> /dev/sdb6          1416      1480    522081   fd  Linux raid autodetect
> /dev/sdb7          1481      1513    265041   fd  Linux raid autodetect
> /dev/sdb8          1514      1526    104391   fd  Linux raid autodetect
>
>
> # cat /etc/raidtab
> raiddev             /dev/md1
> raid-level                  1
> nr-raid-disks               2
> chunk-size                  64k
> persistent-superblock       1
> nr-spare-disks              0
>     device          /dev/sda5
>     raid-disk     0
>     device          /dev/sdb5
>     raid-disk     1
> raiddev             /dev/md0
> raid-level                  1
> nr-raid-disks               2
> chunk-size                  64k
> persistent-superblock       1
> nr-spare-disks              0
>     device          /dev/sda1
>     raid-disk     0
>     device          /dev/sdb1
>     raid-disk     1
> raiddev             /dev/md2
> raid-level                  1
> nr-raid-disks               2
> chunk-size                  64k
> persistent-superblock       1
> nr-spare-disks              0
>     device          /dev/sda8
>     raid-disk     0
>     device          /dev/sdb8
>     raid-disk     1
> raiddev             /dev/md3
> raid-level                  1
> nr-raid-disks               2
> chunk-size                  64k
> persistent-superblock       1
> nr-spare-disks              0
>     device          /dev/sda6
>     raid-disk     0
>     device          /dev/sdb6
>     raid-disk     1
> raiddev             /dev/md4
> raid-level                  1
> nr-raid-disks               2
> chunk-size                  64k
> persistent-superblock       1
> nr-spare-disks              0
>     device          /dev/sda2
>     raid-disk     0
>     device          /dev/sdb2
>     raid-disk     1
> raiddev             /dev/md5
> raid-level                  1
> nr-raid-disks               2
> chunk-size                  64k
> persistent-superblock       1
> nr-spare-disks              0
>     device          /dev/sda3
>     raid-disk     0
>     device          /dev/sdb3
>     raid-disk     1
> raiddev             /dev/md6
> raid-level                  1
> nr-raid-disks               2
> chunk-size                  64k
> persistent-superblock       1
> nr-spare-disks              0
>     device          /dev/sda7
>     raid-disk     0
>     device          /dev/sdb7
>     raid-disk     1
>
> # cat /proc/mdstat
> Personalities : [raid1]
> read_ahead 1024 sectors
> md0 : active raid1 sdb1[1] sda1[0]
>       104320 blocks [2/2] [UU]
>
> md4 : active raid1 sdb2[1] sda2[0]
>       8193024 blocks [2/2] [UU]
>
> md5 : active raid1 sdb3[1] sda3[0]
>       2048192 blocks [2/2] [UU]
>
> md1 : active raid1 sdb5[1] sda5[0]
>       1020032 blocks [2/2] [UU]
>
> md3 : active raid1 sdb6[1] sda6[0]
>       521984 blocks [2/2] [UU]
>
> md6 : active raid1 sdb7[1] sda7[0]
>       264960 blocks [2/2] [UU]
>
> md2 : active raid1 sdb8[1] sda8[0]
>       104320 blocks [2/2] [UU]
>
> unused devices: <none>
>
>
>
> _______________________________________________
> talk mailing list
> talk at nblug.org
> http://nblug.org/mailman/listinfo/talk






More information about the talk mailing list