LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 04-12-2014, 05:07 AM   #1
postcd
Member
 
Registered: Oct 2013
Posts: 527

Rep: Reputation: Disabled
How to integrate HDD into raid array after replacement?


Quote:
Integration of the new drive
Once the defective drive has been removed and the new one installed, it needs to be intagrated into the RAID array. This needs to be done for each partition.
# mdadm /dev/md0 -a /dev/sdb1
# mdadm /dev/md1 -a /dev/sdb2
# mdadm /dev/md2 -a /dev/sdb3
# mdadm /dev/md3 -a /dev/sdb4
The new drive is now part of the array and will be synchronized. Depending on the size of the partitions this procedure can take some time. The status of the synchronization can be observed using cat /proc/mdstat.
I have only 2 drives, what exact commands to do after one was replaced as faulty please?
 
Old 04-12-2014, 10:17 PM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,341

Rep: Reputation: Disabled
You say you have two drives, but that doesn't really say anything about how your RAID array is configured.

Both devices (entire drives) and partitions can be components in an mdadm RAID array. You may have only two drives, but you could still have more than one md device.

If one drive fails, this is what you'll need to do after the drive has been replaced:
  1. Partition the new drive in a similar fashion to the remaining drive (or not at all, if the array components are raw devices)
  2. Run mdadm --add <md_array> <new_device_component> to add the new device to the existing md array
  3. Repeat step 2 for every md array
  4. (optional) Run mdadm --detail <md_array> to verify that the rebuild process has started
The rebuild/resync process will take some time, depending on the size of the array.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Misaligned partition on replacement drive in RAID 5 array, Fedora 14 Ta-mater Linux - Hardware 5 06-05-2013 03:16 PM
[SOLVED] mdadm: only give one device per ARRAY line: /dev/md/:raid and array laughing_man77 Linux - Hardware 4 03-23-2012 04:05 PM
how to configure SuSE Linux native multipath to integrate EMC Storage array rhce5 Linux - Newbie 0 03-20-2012 12:01 AM
Perl string replacement within an array? Seventh Programming 1 09-07-2004 02:50 PM
Dirty "RAID"-array in linear mode after hdd went offline tomas412 Linux - Software 1 08-14-2004 10:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 03:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration