Mailing List Archive

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

Re: [tlug] How to proceed with RAID drive failure

On Wed, 13 Jul 2011 21:08:14 +0900
Martin G <> wrote:

> As you suggested, I unplugged one drive at a time, rebooted, and the one
> that didn't work was the one I replaced.
> I managed to get a drive of almost exactly the same specs. It's plugged in
> now, and according to the partition manager, it's all unallocated space so
> far. I was kind of hoping that there might be some kind of automagic
> detection and setup, but it doesn't look like that's going to happen.
> It's a software RAID that was put together from the Ubuntu alternative
> install CD when I first installed Ubuntu on this machine, so I'm assuming
> there's some configuration tool somewhere that I can use to get the new
> drive to mirror the old drive, but beats me where the heck that is.

That's the one of the two big disadvantages of software RAID, there
is no automagic reconstruction, because the RAID system does not
know whether a drive will end up in the RAID or whether it will be
used for something else.

If you have a RAID1, then both disks were most probably set up the same way,
ie you can copy the partition table over to the new disk and rebuild the RAID.

You can use
sfdisk -d /dev/source | sfdisk /dev/dest
to copy the partition table over
or, if you are using GPT
sgdisk -R /dev/dest /dev/source # copy partition table, be carefull about order
sgdisk -G /dev/dest # randomize the GUIDs

an then it's a 
mdadm --add /dev/mdX /dev/destY 
where X and Y are the "partition" numbers you were using.

Also check whether you had any non-RAID partitions (like for swap),
those have to be initialized on their own (mkswap).

While the RAID is recovering from the failure, you can watch its
progress at /proc/mdstat


			Attila Kinali

The trouble with you, Shev, is you don't say anything until you've saved
up a whole truckload of damned heavy brick arguments and then you dump
them all out and never look at the bleeding body mangled beneath the heap
		-- Tirin, The Dispossessed, U. Le Guin

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links