Endian Knowledge Base
Search:     Advanced search
Browse by category:

How to replace a failed hard disk from a raid

Add comment
Views: 2039
Votes: 0
Comments: 0
Posted: 12 Mar, 2008
by: Warasin P.
Updated: 20 Apr, 2010
by: Warasin P.
In order to replace a failed hard disk from a raid, do the following:

dd if=/dev/sd<OK> of=/dev/sd<NEW> count=10
sfdisk --re-read /dev/sd<NEW>
sync
MAKEDEV sd<NEW>
mkswap /dev/sd<NEW>2
mdadm -a /dev/md1 /dev/sd<NEW>1
mdadm -a /dev/md3 /dev/sd<NEW>3
mdadm -a /dev/md4 /dev/sd<NEW>4

where <OK> is the device of the hard disk which is OK, for example a, so the device would be /dev/sda
and <NEW> is the device of the hard disk which you newly mounted in, for example b, so the device would be /dev/sdb

Rebuild starts automatically. You can follow the progress with:
cat /proc/mdstat
Others in this Category
document My /var partition is full, what now?
document My SMTP proxy stops processing emails. No Emails will be send/received anymore.
document Greylisting does not work anymore?
document I have constantly high outgoing traffic. Do i have a worm?
document I lost my root password!! What now?
document Why is whitelist not working with http proxy authentication / contentfilter / antivirus?
document Smart fails with a traceback and exception StopIteration on EFW 2.1



RSS