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

Re: Recontruction a failed raid array on root

On 07 May 2003, Craig wrote:
> We have a server running raid 1 mirroring and one of the HDD
> failed. We have since replaced the failed drive and have
> re-constructed 2 out of the 3 raid arrays. The problem we are
> having is with re-contructing the raid array runnning on the root
> partition.

I had exactly the same problem this morning. Our server allows hot
swapping drives so I was able to replace the failed drive without
taking the machine down.

I did the following steps:

- remove all partitions on the failed disk from the raid:
  mdadm --remove /dev/md0 /dev/sdb1

- remove the disk from the scsi bus:
  scsiadd -r 1

- replace the disk and add it to the scsi bus:
  scsiadd -a 1

- partition the disk (copy partition table from sda to sdb):
  sfdisk -d /dev/sda | sfdisk /dev/sdb

- add all partitions to the raid:
  mdadm --add /dev/md0 /dev/sdb1

- install lilo on /dev/sdb:

- now watch the mirror rebuilding in /proc/mdstat

Hope this helps. One of the partitions is the root partition, but
this is not important. The same procedure was applied as to all the
other partitions.



Reply to: