> It is only possible the mirror partitions, not whole physical drives.

Thomas,

Stop it. I know you are keen to help, but don't talk about what you don't know
about. It _is_ possible to mirror whole physical drives.

> Theoretically it would be possible to take whole physical drives, link it
> together with raid 1 (for example: /dev/md0), partition the /dev/md0
> drive with the partitions as you like it.

This, to the contrary, is not possible with software RAID. With hardware RAID
you could combine two drives and then partition the RAID just as you would a
normal disk. With software RAID, you can combine devices or partitions, but you
cannot then repartition them. LVM may provide solutions to this once it is
ready.

> > 1) Is it possible to have two disks (hda & hdc), having exact copies of
> > eachother (that means including swap, etc....)?? I read something about
> > that it was not possible to mirror swapspace .....

It has been possible to mirror (or RAID-5) swapspace with the last couple of
releases of the raidtools. Just in case you considered it, don't bother with
RAID-0 on swap as this is handled already by the kernel for swap of equal
priority.

If you want to mirror a disk with various partitions, the best way would be to
setup matching partitions on the second disk, mkraid the arrays using
failed-disk instead of raid-disk in the raidtab for the partitions on the first
disk, copy the data from the partitions on the first disk to their respective
arrays, edit /etc/fstab to point to the arrays, reboot and raidhotadd the
partitions on the first disk to their respective arrays.

The only problem with this is the root partition. Lilo cannot load the kernel
from a software-RAID, so you will want to create a separate, un-RAIDed partition
for /boot (where the kernel, map etc. reside on most systems). If the disk is
full, use ext2resize or Partition Magic to shrink one of the existing partitions
to make space for a tiny partition (you only need a few MB, depending how many
kernel images you want) for /boot. Move the contents of /boot to the new
partition and set it up to mount on /boot (you will need to run lilo to point it
at the new location of the kernel image). Now you can create the arrays as above
for all but the /boot partition, and you will have root on RAID, but lilo will
still be able to find the kernel image on a non-RAIDed partition.

A couple of points remain: if /boot is on your first disk, your first disk dies
and takes the system with it, or you need to reboot, then you will lose your
kernel image, and therefore your ability to bring the system back up. You need
to have a copy of /boot on the second disk and lilo installed on that disk as
well. You will need to take account, when installing lilo on the second disk,
that if it is ever needed, it will probably be the first disk at that time. What
you do about this depends on what controllers and disks you are using and how
they are setup.

This inconvenience leads to the second point. As individual partitions of a
RAID-1 array contain a copy of the filesystem on that array that can be mounted
successfully if the array is not running, it is theoretically possible to do
without a separate /boot partition if root is on RAID-1. You would need to
reboot into a system where one of the constituent partitions of the root array
is mounted as root (preferably read-only to prevent corruption of the array)
whenever you wanted to run lilo. But this might be worth some experimentation
for a system such as the one envisaged.

Cheers,


Bruno Prior         [EMAIL PROTECTED]

Reply via email to