Skip to contentSkip to conversation

RH 7.3 raid1 setup

DISCUSSION Christian Schmit 2 participants 5 messages Jun 3, 2002 MD RAID

lore
Share & tools
lore
#0 lore raw

I installed RH 7.3 on raid1 using the standard RH 7.3 GUI setup.

Everything installs fine. According to mdstat raid1 seems to be running fine:

# cat /proc/mdstat 
Personalities : [raid1] 
read_ahead 1024 sectors
md1 : active raid1 hda5[0] hdc5[1]
      3494016 blocks [2/2] [UU]

md2 : active raid1 hda3[0] hdc3[1]

      16892224 blocks [2/2] [UU]

md3 : active raid1 hda2[0] hdc2[1]

      19454592 blocks [2/2] [UU]

md0 : active raid1 hda1[0] hdc1[1]

      361344 blocks [2/2] [UU]

unused devices: <none>

However when shutting down the system and disconnecting the 1st IDE drive I cannot boot from the mirrored disk. I assume this is because the MBR is not mirrored.

So to see if all the data is present on the mirrored disk I launch the "linux rescue" mode from the RH7.3 CD but it cannot find any partitions to mount from on the 2nd mirrored disk.

Making the same with the primary ide disk works fine, in thsi case "linux rescue" can mount all partitions.

How can I check if all data is being mirrored on the 2nd ide disk?

How do I make the 2nd ide disk bootable? (I use grub as bootloader)
I already tried:

root (hd1,0)
setup (hd1)

regards,
Christian

#1 lore raw

hi ya christian..

did you use "fd" partition type when creating/partitioning the disk ??

what does lilo.conf ( or grub ) look like ??

thanx
alvin

Quoted 47 lines · Christian Schmit

I installed RH 7.3 on raid1 using the standard RH 7.3 GUI setup.

Everything installs fine. According to mdstat raid1 seems to be running fine:

# cat /proc/mdstat 
Personalities : [raid1] 
read_ahead 1024 sectors
md1 : active raid1 hda5[0] hdc5[1]
      3494016 blocks [2/2] [UU]

md2 : active raid1 hda3[0] hdc3[1]

      16892224 blocks [2/2] [UU]

md3 : active raid1 hda2[0] hdc2[1]

      19454592 blocks [2/2] [UU]

md0 : active raid1 hda1[0] hdc1[1]

      361344 blocks [2/2] [UU]

unused devices: <none>

However when shutting down the system and disconnecting the 1st IDE drive I cannot boot from the mirrored disk. I assume this is because the MBR is not mirrored.

So to see if all the data is present on the mirrored disk I launch the "linux rescue" mode from the RH7.3 CD but it cannot find any partitions to mount from on the 2nd mirrored disk.

Making the same with the primary ide disk works fine, in thsi case "linux rescue" can mount all partitions.

How can I check if all data is being mirrored on the 2nd ide disk?

How do I make the 2nd ide disk bootable? (I use grub as bootloader)
I already tried:

root (hd1,0)
setup (hd1)

#2 lore raw

Alvin,

Here is my config:

grub.conf:
-----------
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.18-3)

        root (hd0,0)
        kernel /vmlinuz-2.4.18-3 ro root=/dev/md2
        initrd /initrd-2.4.18-3.img

Partitions:
------------

Disk /dev/hda: 255 heads, 63 sectors, 5005 cylinders Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1        45    361431   fd  Linux raid autodetect
/dev/hda2            46       810   6144862+  fd  Linux raid autodetect
/dev/hda3           811      1065   2048287+  fd  Linux raid autodetect

Disk /dev/hdc: 255 heads, 63 sectors, 5005 cylinders Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hdc1   *         1        45    361431   fd  Linux raid autodetect
/dev/hdc2            46       810   6144862+  fd  Linux raid autodetect
/dev/hdc3           811      1065   2048287+  fd  Linux raid autodetect

mdstat:
---------

# cat /proc/mdstat
Personalities : [raid1] 
read_ahead 1024 sectors
md0 : active raid1 hda3[0] hdc3[1]
      2048192 blocks [2/2] [UU]

md2 : active raid1 hda2[0] hdc2[1]

      6144768 blocks [2/2] [UU]

md1 : active raid1 hda1[0] hdc1[1]

      361344 blocks [2/2] [UU]

Christian

AO> hi ya christian..

AO> did you use "fd" partition type when creating/partitioning the disk ??

AO> what does lilo.conf ( or grub ) look like ??

AO> thanx
AO> alvin

Quoted 41 lines · Christian Schmit
Quoted 41 lines

I installed RH 7.3 on raid1 using the standard RH 7.3 GUI setup.

Everything installs fine. According to mdstat raid1 seems to be running fine:

# cat /proc/mdstat 
Personalities : [raid1] 
read_ahead 1024 sectors
md1 : active raid1 hda5[0] hdc5[1]
      3494016 blocks [2/2] [UU]

md2 : active raid1 hda3[0] hdc3[1]

      16892224 blocks [2/2] [UU]

md3 : active raid1 hda2[0] hdc2[1]

      19454592 blocks [2/2] [UU]

md0 : active raid1 hda1[0] hdc1[1]

      361344 blocks [2/2] [UU]

unused devices: <none>

However when shutting down the system and disconnecting the 1st IDE drive I cannot boot from the mirrored disk. I assume this is because the MBR is not mirrored.

So to see if all the data is present on the mirrored disk I launch the "linux rescue" mode from the RH7.3 CD but it cannot find any partitions to mount from on the 2nd mirrored disk.

Making the same with the primary ide disk works fine, in thsi case "linux rescue" can mount all partitions.

How can I check if all data is being mirrored on the 2nd ide disk?

Quoted 6 lines
Quoted 6 lines

How do I make the 2nd ide disk bootable? (I use grub as bootloader)
I already tried:

root (hd1,0)
setup (hd1)

AO> -
AO> To unsubscribe from this list: send the line "unsubscribe linux-raid" in AO> the body of a message to [email protected]
AO> More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw

hi ya christian

looks okay too me... not that i played with grub too much but..

make a boot floppy so that we can recover if my experiment fails ...

dd=/vmlinuz-2.4.18-3 of=/dev/fd0 bs-1204

( or make a boot flop w/ syslinux
http://www.Linux-Consulting.com/Boot/boot.flop.syslinux.txt

( test that you can boot from floppy )
( you'll see lots of "...." on the screen as it boot

- should also work even if hda or hdc is disconnected

than comment out initrd in your grub.conf and "re-run/re-initialize" grub

- that'd be my guess of why if you disconnect hda that the system wont boot
- am guessing that the kernel that is in the initrd is NOT able to support raid1

- if its not the initrd.. ( guess i better go play with grub too one day )

- interesting problem... :-)

thanx
alvin

Quoted 30 lines

grub.conf:
-----------
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.18-3)

        root (hd0,0)
        kernel /vmlinuz-2.4.18-3 ro root=/dev/md2
        initrd /initrd-2.4.18-3.img

Partitions:
------------

Disk /dev/hda: 255 heads, 63 sectors, 5005 cylinders Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1        45    361431   fd  Linux raid autodetect
/dev/hda2            46       810   6144862+  fd  Linux raid autodetect
/dev/hda3           811      1065   2048287+  fd  Linux raid autodetect

Disk /dev/hdc: 255 heads, 63 sectors, 5005 cylinders Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hdc1   *         1        45    361431   fd  Linux raid autodetect
/dev/hdc2            46       810   6144862+  fd  Linux raid autodetect
/dev/hdc3           811      1065   2048287+  fd  Linux raid autodetect
#4 lore raw

Hi alvin,

I got it working by disconnecting the 1st disk and then booting from cd in linux rescue mode with the 2nd disk.

I mounted the "/" partition on the disk and launched grub. Here I issued root (hd0,0) and setup(hd1) to install grub in the mbr.

After this I can boot fine from both disks.

Christian

AO> hi ya christian

AO> looks okay too me... not that i played with grub too much but..

AO> make a boot floppy so that we can recover if my experiment fails ...

AO> dd=/vmlinuz-2.4.18-3 of=/dev/fd0 bs-1204

AO> ( or make a boot flop w/ syslinux
AO> http://www.Linux-Consulting.com/Boot/boot.flop.syslinux.txt

AO> ( test that you can boot from floppy )
AO> ( you'll see lots of "...." on the screen as it boot

AO> - should also work even if hda or hdc is disconnected

AO> than comment out initrd in your grub.conf and "re-run/re-initialize" grub

AO>         - that'd be my guess of why if you disconnect hda that the system
AO>         wont boot
AO>         - am guessing that the kernel that is in the initrd is NOT able
AO>         to support raid1

AO> - if its not the initrd.. ( guess i better go play with grub too one day )

AO> - interesting problem... :-)

AO> thanx
AO> alvin

Quoted 30 lines
Quoted 30 lines

grub.conf:
-----------
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.18-3)

        root (hd0,0)
        kernel /vmlinuz-2.4.18-3 ro root=/dev/md2
        initrd /initrd-2.4.18-3.img

Partitions:
------------

Disk /dev/hda: 255 heads, 63 sectors, 5005 cylinders Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1        45    361431   fd  Linux raid autodetect
/dev/hda2            46       810   6144862+  fd  Linux raid autodetect
/dev/hda3           811      1065   2048287+  fd  Linux raid autodetect

Disk /dev/hdc: 255 heads, 63 sectors, 5005 cylinders Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hdc1   *         1        45    361431   fd  Linux raid autodetect
/dev/hdc2            46       810   6144862+  fd  Linux raid autodetect
/dev/hdc3           811      1065   2048287+  fd  Linux raid autodetect