Raid finalisation

The system is up again with root an /dev/md/1 and swap on /dev/md/5:
fcmaster01:~# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/md/1              3842296    297036   3350076   9% /
fcmaster01:~# cat /proc/swaps
Filename                        Type            Size    Used    Priority
/dev/md/5                       partition       979832  0       -1
fcmaster01:~#
Now are ready to complete the raid's. For this first set the partitions on disk hdc to fd:
fcmaster01:~# fdisk -l /dev/hdc

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

   Device Boot    Start       End    Blocks   Id  System
/dev/hdc1             1       486   3903763+  fd  Linux raid autodetect
/dev/hdc2           487       608    979965    5  Extended
/dev/hdc5           487       608    979933+  fd  Linux raid autodetect
fcmaster01:~#
and add the partitions to your arrays:
fcmaster01:~# mdadm -a /dev/md/1 /dev/hdc1
mdadm: hot added /dev/hdc1
fcmaster01:~# mdadm -a /dev/md/5 /dev/hdc5
mdadm: hot added /dev/hdc5
fcmaster01:~#
Now check the recovery status in "/proc/mdstat". If you have slow disks (don't forget "hdparm") and/or big partition sizes you can maybe drink a coffee (or beer;). ... Now our raids are complete (note the "[2/2] [UU]":
fcmaster01:~# cat /proc/mdstat
Personalities : [raid1]
read_ahead 1024 sectors
md5 : active raid1 ide/host0/bus1/target0/lun0/part5[1] ide/host0/bus0/target0/lun0/part5[0]
      979840 blocks [2/2] [UU]

md1 : active raid1 ide/host0/bus1/target0/lun0/part1[1] ide/host0/bus0/target0/lun0/part1[0]
      3903680 blocks [2/2] [UU]

unused devices: >none<
fcmaster01:~#
Remember the initrd script which starts the root raid with only ONE disc (hda). So don't forget to call mkinitrd again because now mdadm lists both disks in the array:
fcmaster01:~# mkinitrd -o /boot/initrd.img-2.4.18-1-k7.raid /lib/modules/2.4.18-1-k7/
...
fcmaster01:~# mount -t cramfs -o loop /boot/initrd.img-2.4.18-1-k7.raid /mnt
fcmaster01:~# cat /mnt/script
mdadm -A /devfs/md/1 -R -u 8dfdd70c:ba733329:6f499349:fb2c1b43 /dev/ide/host0/bus0/target0/lun0/part1 /dev/ide/host0/bus1/target0/lun0/part1
fcmaster01:~# umount /mnt
The script start the raid now with both disks - fine :) Also dont' forget to correct "/etc/mdadm/mdadm.conf"
fcmaster01:/# cat /etc/mdadm/mdadm.conf
DEVICE /dev/hd[ac]*
# root raid will be started from initrd
#ARRAY /dev/md/1 devices="/dev/hda1,/dev/hdc1"
ARRAY /dev/md/5 devices="/dev/hda5,/dev/hdc5"
fcmaster01:/#
Now we can delete the old initrd:
rm /boot/initrd.img-2.4.18-1-k7 /initrd.img
and remove the old (LinuxSAV) entry from lilo.conf. Also we put a "raid-extra-boot" (causes lilo to write the boot sector to both disks, hda and hdc) option in "/etc/lilo.conf" and correct the "boot" entry.
fcmaster01:~# cat /etc/lilo.conf
lba32
root=/dev/md/1
boot=/dev/md/1
raid-extra-boot="/dev/hda,/dev/hdc"
install=/boot/boot-menu.b
map=/boot/map

# message=/boot/bootmess.txt
        prompt
#       single-key
        delay=20
        timeout=50
vga=normal

default=Linux
append="devfs=mount"
image=/vmlinuz
        label=Linux
        initrd=/initrd.img.raid
        read-only
#       restricted
#       alias=1
fcmaster01:~# lilo
Warning: using BIOS device code 0x80 for RAID boot blocks
Added Linux *
The boot record of  /dev/md/1  has been updated.
The boot record of  /dev/hda  has been updated.
Warning: /dev/hdc is not on the first disk
The boot record of  /dev/hdc  has been updated.
fcmaster01:~#
FINISH :))