[Hampshire] RAID advice please

Top Page

Reply to this message
Author: Chris Dennis
Date:  
To: Hampshire
CC: 
New-Topics: Re: [Hampshire] RAID advice please - summary
Subject: [Hampshire] RAID advice please
Hello folks

I'm after some advice about managing a RAID array.

It's a simple system: Debian running on a server with two 120GB drives
in a RAID1 array. There are two RAIDed partitions: /dev/sda1 and
/dev/sdb1 form /dev/md0 (where / lives), /dev/sda3 and /dev/sdb3 form
/dev/md2 (where /data lives). (There's a swap partition on each drive too).

The server suffered a hiccup, so one drive was removed to allow the data
to be copied off it while I sorted out the problem, which has included
updating Debian in various ways. Now I want to replace the second
drive, and resynchronise the disks.

I've found lots of instructions for replacing a *failed* drive, but I
want to be sure the following will work in this situation:

0) (the second drive has already been physically removed)
1) mdadm /dev/md0 -r /dev/sdb1  # remove the absent drive from the array
2) reinstall the second drive
3) mdadm /dev/md0 -a /dev/sdb1  # replace it
4) watch as mdadm magically turns the second partition into a mirror
    of the first.
5) repeat for the other partition


Will this work? Will mdadm know that the second drive is out of date,
and make it match the first one? Or do I have to completely blank the
second drive to make mdadm think it's a brand-new one?

cheers

Chris

-- 
Chris Dennis                                  cgdennis@???
Fordingbridge, Hampshire, UK