Firstly, my BIOS is set up to autodetect.  I tried the LILO trick.  I ran lilo -U and 
lilo.  This time I did get LIL-.  Doesn't that mean something about corrupt descriptor 
table or something?  How do I find out which one?  Let me try to be a little more 
specific in what I've done, and what I'm *trying* to do:
I want to use RAID 1 to mirror two partitions; hda5 and hdc5.  My fstab looks like 
this:
/dev/hda1               /                       ext2    defaults        1 1# /dev/hda5 
            /home                   ext2    defaults        1 2/dev/hdc1               
/junk1                  ext2    defaults        1 2# /dev/hdc5             /junk2      
            ext2    defaults        1 2/dev/hdc6               /junk3                  
ext2    defaults        1 2/dev/hda6               /usr                    ext2    
defaults        1 2/dev/hda7               swap                    swap    defaults    
    0 0/dev/hdc7               swap                    swap    defaults        0 
0/dev/fd0                /mnt/floppy             ext2    noauto          0 0/dev/cdrom 
             /mnt/cdrom              iso9660 noauto,ro       0 0none                   
 /proc                   proc    defaults        0 0none                    /dev/pts   
             devpts  mode=0622       0 0
My raidtab looks like this:
raiddev /dev/md0        raid-level      1       nr-raid-disks   2       nr-spare-disks 
 0       chunk-size      4       persistent-superblock   1       device          
/dev/hda5       raid-disk       0       device          /dev/hdc5       raid-disk      
 1dmesg looks like this:
Linux version 2.2.5-15 (root@LinuX) (gcc version egcs-2.91.66 19990314/Linux 
(egcs-1.1.2 release)) #2 Thu May 27 12:26:11 EDT 1999
Detected 166586868 Hz processor.
Console: colour VGA+ 80x25
Calibrating delay loop... 66.36 BogoMIPS
Memory: 63052k/65536k available (1088k kernel code, 408k reserved, 928k data, 60k init)
VFS: Diskquotas version dquot_6.4.0 initialized
CPU: Intel Pentium 75 - 200 stepping 0c
Checking 386/387 coupling... OK, FPU using exception 16 error reporting.
Checking 'hlt' instruction... OK.
Checking for popad bug... OK.
Intel Pentium with F0 0F bug - workaround enabled.
POSIX conformance testing by UNIFIX
PCI: PCI BIOS revision 2.10 entry at 0xfb000
PCI: Using configuration type 1
PCI: Probing PCI hardware
Linux NET4.0 for Linux 2.2
Based upon Swansea University Computer Society NET3.039
NET4: Unix domain sockets 1.0 for Linux NET4.0.
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
Initializing RT netlink socket
Starting kswapd v 1.5 
Detected PS/2 Mouse Port.
Serial driver version 4.27 with MANY_PORTS MULTIPORT SHARE_IRQ enabled
ttyS00 at 0x03f8 (irq = 4) is a 16550A
ttyS01 at 0x02f8 (irq = 3) is a 16550A
pty: 256 Unix98 ptys configured
apm: BIOS version 1.2 Flags 0x07 (Driver version 1.9)
Real Time Clock Driver v1.09
RAM disk driver initialized:  16 RAM disks of 4096K size
PIIX3: IDE controller on PCI bus 00 dev 39
PIIX3: not 100% native mode: will probe irqs later
    ide0: BM-DMA at 0xf000-0xf007, BIOS settings: hda:pio, hdb:pio
    ide1: BM-DMA at 0xf008-0xf00f, BIOS settings: hdc:pio, hdd:pio
hda: WDC AC13200B, ATA DISK drive
hdc: WDC AC23200L, ATA DISK drive
hdd: FX3210S, ATAPI CDROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hda: WDC AC13200B, 3098MB w/512kB Cache, CHS=787/128/63
hdc: WDC AC23200L, 3098MB w/256kB Cache, CHS=6296/16/63
hdd: ATAPI 32X CD-ROM drive, 128kB Cache
Uniform CDROM driver Revision: 2.54
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
md driver 0.90.0 MAX_MD_DEVS=256, MAX_REAL=12
raid1 personality registered
raid5 personality registered
raid5: measuring checksumming speed
   8regs     :   168.783 MB/sec
   32regs    :   148.971 MB/sec
using fastest function: 8regs (168.783 MB/sec)
scsi : 0 hosts.
scsi : detected total.
eth0: 3c509 at 0x330 tag 1, 10baseT port, address  00 a0 24 1e 13 9a, IRQ 3.
3c509.c:1.16 (2.2) 2/3/98 [EMAIL PROTECTED]
md.c: sizeof(mdp_super_t) = 4096
Partition check:
 hda: hda1 hda2 < hda5 hda6 hda7 >
 hdc: [PTBL] [787/128/63] hdc1 hdc2 < hdc5 hdc6 hdc7 >
autodetecting RAID arrays
autorun ...
... autorun DONE.
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 60k freed
Adding Swap: 100764k swap-space (priority -1)
Adding Swap: 100764k swap-space (priority -2)
(read) hda5's sb offset: 1024000 [events: 00000044]
autorun ...
considering hda5 ...
  adding hda5 ...
created md0
bind<hda5,1>
running: <hda5>
now!
hda5's event counter: 00000044
md0: max total readahead window set to 128k
md0: 1 data-disks, max readahead per data-disk: 128k
raid1: device hda5 operational as mirror 0
raid1: md0, not all disks are operational -- trying to recover array
raid1: raid set md0 active with 1 out of 2 mirrors
md: updating md0 RAID superblock on device
hda5 [events: 00000045](write) hda5's sb offset: 1024000
md: recovery thread got woken up ...
md0: no spare disk to reconstruct array! -- continuing in degraded mode
md: recovery thread finished ...
.
... autorun DONE.

I'm using raidtools 0.90, and here's what I've done so far.  I installed the OS and 
recompiled the 2.2.5-15 kernel to include the appropriate RAID things.  I edited the 
fstab and made the raidtab.  I unmounted the drives I wanted to mirror.  I edited 
/etc/rc.d/rc.sysinit, and I made mke2fs /dev/md0.
     I'm sorry to make this post so long, but I've been trying to get this RAID 
working for a while.  It's become a crusade.  Do you see any obvious things I've 
omitted or l need to change?


>>> David Robinson <[EMAIL PROTECTED]> 06/09/99 07:26PM >>>
Hmm So your saying you can't disconnect any drive without LILO stuffing up... bad..
Umm Have you got your BIOS setup to autodetect the HD's?

A very simple way of putting LILO in both drives is to edit your /etc/lilo.conf:
boot=/dev/sda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
image=/boot/vmlinuz
        label=linux
        root=/dev/sda1
        initrd=/boot/initrd-2.0.36-0.7.img
        read-only

If say your root drive is sda1 which is RAIDed to sdb1 then all you need to do is 
change the boot= & root= lines once.
boot=/dev/sdb
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
image=/boot/vmlinuz
        label=linux
        root=/dev/sdb1
        initrd=/boot/initrd-2.0.36-0.7.img
        read-only

Now.. run lilo.
ignore the warning about lilo not being installed in the booted drive.
Your lilo config should have now been put into the second drive, this is independant 
of the first drive as long as your RAID is setup correctly and swap is setup right:-)

You might want to change the config back to the orignal and make a note to do the 
change each time you update the kernel.

Done! Now in you should be able to boot from any of the two drives:-)

If you still have trouble post your lilo.conf file.

If you put lilo in the MBR (someone correct me if I'm wrong) I don't think you need to 
make the root partition bootable using fdisk as LILO runs from the MBR before even the 
partitions get looked at.

If you put your swap partitions on both drives without RAIDing them you will/might get 
a kernel crash if one of the drives fail depending on which drive the kernel put its 
personal memory on.

If your not going to RAID swap then just put the swap on one drive so you get a 50% 
chance that a disk crash won't knock the machione down.



Steve McPherson wrote:

> I hate to be such a knuckle head.  I have swap partitions on hda AND hdc.  Should I 
>not?  When I disconnect hda, I get LI.  When I disconnect hdc, I get a *bunch* of 
>01's scrolling up the screen.  How did you put the kernel in the MBR of each drive?  
>Is that what I'm missing?  when I look at fdisk, both hda1 and hdc1 are bootable.  
>Are there any other files I need to change?  As I said earlier, I'm reasonably sure 
>RAID is working.  DMESG and mdstat seem to indicate it is working.  When I shutdown 
>or reboot I see unbind hda5 and hdc5.
>
> >>> David Robinson <[EMAIL PROTECTED]> 06/08/99 09:16PM >>>
> The best way to do a test is just to pull the power on one of the drives in the 
>array. It's best not to pull the cable off as it might send a spike back to the IDE 
>card and do some damage.
>
> If your doing mirroring then you'll be using RAID 1.
>
> Check your swap partition. If your swap partition is on the drive you are about to 
>pull out and the swap is not on a RAID partition then your kernel will/may hang if 
>there was memory swapped out to it.
>
> I have setup my swap on both drives but not as a RAID partition. If one drive dies 
>the system will crash but after a reboot my system will just boot off the working 
>drive as I have put the kernel in the Master Boot Record on both Drives.
> At least I won't loose any data:-)
>
> Steve McPherson wrote:
>
> > David,
> >      I'm having some trouble with my raid, and I'm hoping you're willing to help 
>me out.
> > I'm using RH 6.0 with the 2.2.5-15 kernel with raid 0 and 5  and multiple devices 
>driver support and autodetect RAID partitions compiled in.  I think everything is OK. 
> I mean raid starts when I boot and it stops when I shutdown.  I'm using two 
>identical WD 4.3 gb hdd's.  I'm trying to mirror hda1 and hdc1.  I'd like to test my 
>raid system.  If I disconnect hda, I get a kernel panic message.  Can you explain how 
>I test my raid system?
> > Thanks David.
> >
> >      -Steve McPherson

Reply via email to