Hi,

On Thu, 1 Jun 2000, John Saunders wrote:
> I have a RH6.1 box with two mirrored drives in a RAID1 config.
> 
> I am wanting to add a spare disk and would like advice on the correct
> procedure for adding it to the existing config.

With RAID1 there is little point in adding a "spare disk" - you can just
add another disk to the running array, ie:

  md0: sda1 sdb1 sdc1 [RAID1]

Means that partitions sdb1 and sdc1 /always/ contains an exact copy of
sda1. This array can survive the failure of any two devices.

The way I have configured my server is:

  md0: sda1 sdb1 sdc1      [RAID1] /
  md1: sda2 sdb2 sdc2 sdd2 [RAID5] /home

  (sdd1 is a "cold" mirror of sda1)

This means that everything will work under a one-disk failure, and the
root partition will still work under a two-disk failure.

The reasons that adding these disks to the RAID1 mirror is better than
having it as a spare are:

 i) Performance will increase with Mika's read-balancing patch (great!)
ii) When a disk fails in the case of the 'spare', the data has to be
    copied over to the it. This will impair performance for a short time,
    and means that if there is another failure before the duplication is
    completed, then the array will go down.

> What I planned was:
> 
> 1. Bring the system down.
> 2. Install the spare drive
> 3. Boot up and edit the /etc/raidtab to include the spare drive
> 4. fdisk the drive to be identical to the mirror'd drives
> 5. raidhotadd the drive
> 
> Is this correct and will the drive then be added automatically should a
> drive fail and the system is rebooted  ?.

AFAIK this will work perfectly.

If you decide to go with adding it to the array proper instead of as a
spare disk, then just change that in the raidtab.

As an aside, I was wondering if there might ever be support for having a
spare disk assigned to more than one array? ie you could assign a pool of
spare disks to all arrays, which would be removed as spare disks if used
in the event of a failure... just a thought :)

Hope this helps!

Corin

/------------------------+-------------------------------------\
| Corin Hartland-Swann   | Mobile: +44 (0) 79 5854 0027        |
| Commerce Internet Ltd  |    Tel: +44 (0) 20 7491 2000        |
| 22 Cavendish Buildings |    Fax: +44 (0) 20 7491 2010        |
| Gilbert Street         |                                     |
| Mayfair                |    Web: http://www.commerce.uk.net/ |
| London W1Y 1FE         | E-Mail: [EMAIL PROTECTED]        |
\------------------------+-------------------------------------/

Reply via email to