Re: Questions on RAID 1 - Mirroring
[email protected] Mon, 02 Dec 2002 13:45:37 -0500
| Newsgroups | gmane.linux.redhat.release.guinness |
|---|---|
| Organization | B. L. Kline & Associates, Inc. |
| Message-ID | <[email protected]> |
"K. Allan Wilson" wrote:
>
> What would be the best way to put lilo on the second drive also and make
> it bootable without messing with lilo on the first harddrive. I am also
> unable to boot when I try to mirror the /boot partition. It hangs on a
> kernel panic. The only way I am able to setup raid is if I only mirror
> the / partition. Thanks for the help
>
Allan.
I've done to an internet server what you're trying to do now. Below
are the notes I made to myself when developing/testing the procedure.
Actually, I was replacing a single 18Gb drive with two 36Bg drives
that were to be RAID1. So the steps below are a little extensive as
they include the swap.
If you have any questions about these notes (and I imagine that you
will) feel free to contact me off-list.
Barry
Install newer large drive into system.
o Original drive will be /dev/sda
o New drive (n1) will be /dev/sdb
Create a boot disk for the existing system.
o mkbootdisk $(uname -r)
o TEST THE BOOT DISK!
Partition the new drive in whatever way you wish.
o fdisk /dev/sdb
o make the appropriate partitions, but be aware
that changes to existing structions will require
changes to fstab.
o Mark the new partitions as type 83 or 82, as appropriate.
Copy the data from the existing disk to the new one.
o Format the new paritions
mkfs.ext2 -L LABEL /dev/sdb*
mkswap /dev/sdb*
o cd /source;find . -print -xdev | cpio -pdm /mnt/t
- repeat for each partition
- be sure to unmount /boot, etc so they aren't copied.
Shutdown, them move new disk to position of old one.
Move second new disk (n2) into place.
o Boot using boot disk.
o fdisk on n2, create same paritions but make type "fd"
o create appropriate /etc/raidtab entries
o mkraid -R on /dev/md0, /dev/md1, /dev/md2
o Copy the data once again.
Create a second boot disk, this time equipped for raid:
o mkbootdisk --verbose --mkinitrdargs '--preload raid1'
$(uname -r)
o Boot using this diskette, kernel args:
linux root=/dev/md1 single (md? as appropriate)
Set the first drive as available:
o change "failed-drive" to "raid-drive" in raidtab
o raidhotadd /dev/mdN /dev/sdaN as appropriate
o Wait unti the array has been rebuild.
Make the system bootable from the drive.
o change the grub.conf file to boot from md0
o need to create a new initrd image to include raid1
- mkinitrd --preload raid1 kernel name
--
Please avoid sending me Word, PowerPoint or Excel attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html