Solved

Recover from dead hard drive (RAID 1)

Posted on 2009-05-20
6
610 Views
Last Modified: 2013-11-08
Hi,

I have a server running four hard drives:
System RAID 1: 2 x 20GB IDE
Storage RAID 1: 2 X 500GB SATA

I am in the process of creating a disaster recovery plan. Say if one of the 20GB drives were to fail I would like to have some instructions on how to configure a new drive to replace the dead drive.

System configuration:

OS: Centos 5
CPU AMD Athlon 3500+
RAM 1.0GB
HDD hard drives running software raid configuration
2 x 20GB IDE system
2 x 500GB SATA storage

Pablo.
0
Comment
Question by:pabgm
  • 2
  • 2
6 Comments
 
LVL 39

Expert Comment

by:PUNKY
ID: 24437361
Turn off the system.
Replace the failed hard drives with new hard drives that are of equal or greater capacity.
If the raid is already set recovery automatically, the recovery process will start automatically when turn on the system.
If the raid recovery is not set up yet, when prompted during system startup, press Ctrl and i (or whatever your raid card) at the same time to enter the raid configuration, check there see if recovery option is set.
 
0
 

Author Comment

by:pabgm
ID: 24439429
Hi,

This is software raid configured by the OS. There is no hardware raid.

Pablo.

0
 
LVL 4

Accepted Solution

by:
colinvann earned 500 total points
ID: 24483861
After you have replaced the physical drive and have booted the system you will be running in a degraded RAID state.

You can check this by running the following command:
  cat /proc/mdstat

Before adding the new disk into the array you would need to create a partition on the new drive of type 'Linux RAID auto' (assuming the new disk is /dev/hda)
  fdisk /dev/hda
  n - new partition
  p - primary partition
  1 - partition 1
  t - change type of partition
  fd - Linux RAID (software RAID)
  w - write the partition table to disk
  q - quit

Now that you have a partition you can add it to the array and it will start rebuilding (assuming /dev/md0 is the RAID device):
  mdadm --manage /dev/md0 -a /dev/hda1

you can check the progress of replication of data to the new disk by watching the contents of the /proc/mdstat file:
  watch "cat /proc/mdstat"

Note: If you do not have mdadm installed you can install it as follows:
  yum install mdadm

Hope that helped.
Colin
0
 

Author Comment

by:pabgm
ID: 24599185
So lets say I remove a disk, my system should still boot?
0
 
LVL 4

Expert Comment

by:colinvann
ID: 24619039
Correct.

If your initial ram disk has the drivers for software RAID (which it must do already because the system is currently booting off a software RAID1 partition) you should be fine.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
linux redhat 7.2 10 88
Windows shadowcopy - space allocated - exclusive? 4 41
benchmarks for comparing CPU head to head.. 13 61
Can't install Windows 7 on Intel NUC 9 47
In 2017, ransomware will become so virulent and widespread that if you aren’t a victim yourself, you will know someone who is.
Many businesses neglect disaster recovery and treat it as an after-thought. I can tell you first hand that data will be lost, hard drives die, servers will be hacked, and careless (or malicious) employees can ruin your data.
In this Micro Tutorial viewers will learn how to use Windows Server Backup to create full image of their system. Tutorial shows how to install Windows Server Backup Feature on Windows 2012R2 and how to configure scheduled Bare Metal Recovery backup.…
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question