[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Now What do you do when you blow a Raid 1 disk?

Neal Rhodes wrote:
> So, software Raid 1 in Fedora is just the bee's knees.   Until a drive
> actually fails.    Then it's not so much.   How do you get out of this
> swamp?
> What are the steps to take out a dead drive, stuff in a brand new
> identical disk drive, and get the Raid back going again?   In my case,
> the system still boots, and has /,  /boot, and /u as three Raid1
> filesystems.    Each filesystem is running degraded.
> Let's presume my 2nd drive is toast, and I've got a replacement.  What
> are the steps?    Seems like I can't do anything with mdadm while it's
> up, because the drives are busy.  
> In my case, we can assume it's either Core 6 or Core 7 - This all
> happened when I was cloning drives to test upgrading from 6 to 7.

The first step is to physically install the new drive.
You will have to power off the machine (if you're not using hotplug
Maybe you also want to remove the bad drive (if you don't have
additional drive connectors available).

Partition the new drive with the same layout of the good drive.
I personally like to have "fdisk -l" in one konsole tab and fdisk
in another one, so I can switch with Shift-cursor left or right
and visually see il the numbers are identical).

At that point, you will still have the RAID-1 in degraded mode.

Now the important part:

mdadm /dev/md0 --add /dev/sda1
(adjust to use appropriate device names)

There are also --remove and --fail options which could be useful
in some cases.

Watch the reconstruction going on with cat /proc/mdstat.

Best regards.

   Roberto Ragusa    mail at robertoragusa.it

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]