Re: mdadm dropped disk, won't re-add

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


Hi,

On Feb 15, 2012, at 3:45 PM, Robin Hill wrote:

>> I have tried re-adding sdc1 with the --re-add command, but mdadm again
>> refuses to re-add the drive.
>> 
> That's a safety measure. If it can't actually re-add the drive then it
> fails, rather than changing to do an --add instead (as older mdadm
> versions did), potentially losing data.

Aha, thanks for clarifying.

>> My primary question is whether mdadm actually deletes any important data
>> on the remaining disks (sd{b,c,d}1) while rebuilding or whether it just
>> writes data to the newly added disk sde1.
>> 
> It just writes data/checksums to the newly added disk. The only writes
> to the remaining disks will be if other applications are writing to the
> array during the rebuild process.

Great :). I was hoping so.

>> Can anyone give further advise?
>> 
> What errors does dmesg give about why sdc1 was failed? You'll need to
> fix that before you try recovering the array. If it's a drive error then
> using ddrescue to clone it (or as much of it as possible) to sde1 would
> probably be your best bet, then get a replacement drive.

Those were errors related to the cable, the SATA link failed, the disk is ok,
smart log is clean.

> Once you've fixed that issue then you should be able to force assemble
> the array (mdadm -S /dev/md0; mdadm -Af /dev/md0) and continue/restart
> the recovery process. I'd recommend doing a fsck on the filesystem
> afterwards as well, especially if you've replaced sdc.

It did work, the raid is now rebuilding. I had actually had a friend who has
more expertise (he is a casual kernel hacker himself) have a look at it and
he fixed everything.

Basically, he reassembled the array from sd{b,c,d}1 with the --force option,
corrected the partitioning on the sde disk (I created a partition larger than
on the other disks accidentally, so he just copied the partition table from
one of the other disks in the array) and then added sde1 as a new disk.

Raid is no rebuilding and will be finished in 4 hours.

Thanks a lot for your quick help!

Adrian
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ATA RAID]     [Linux SCSI Target Infrastructure]     [Managing RAID on Linux]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device-Mapper]     [Kernel]     [Linux Books]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Photos]     [Yosemite Photos]     [Yosemite News]     [AMD 64]     [Linux Networking]

Add to Google Powered by Linux