LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 11-17-2018, 08:19 AM   #1
nitinm
Member
 
Registered: Jul 2016
Posts: 31

Rep: Reputation: Disabled
raid5:- how to replace a new hard disk with old one and rebuild it?


I have installed centOS 7 and configured raid5 with 3 hard disk.
I am presently testing the raid. How do i remove an working hard disk which is in raid array and replace it with a new one and rebuild it to work with the raid and recover data.

Thanks
 
Old 11-17-2018, 09:42 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
To mark a disk as failed:
Code:
mdadm /dev/md0 -f /dev/sdx
Then you remove it:
Code:
mdadm /dev/md0 -r /dev/sdx
To test the procedure, wipe the disk. Then add it back in:
Code:
mdadm /dev/md0 -add /dev/sdx
 
Old 11-17-2018, 07:47 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Go to the linux RAID wiki and start reading.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] btrfs RAID5 vs MD RAID5 + LVM eRJe Linux - General 4 01-20-2014 05:54 PM
Recreate a Raid5 MD0 into a Raid5 MD3 CADIT Linux - Server 2 01-11-2010 04:46 AM
Multi Layer RAID50 fail (Intel SRCS14L RAID5 + 3ware 9550SX-4LP RAID5)+Linux RAID 0 BaronVonChickenPants Linux - Server 4 09-27-2009 04:06 AM
replace failure disk and rebuild RAID with mdadm ufmale Linux - Software 0 11-15-2007 02:24 PM
New install on new hard drive messed up old install of old hard drive. AbsoluteMonkey Linux - General 26 01-10-2007 12:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 07:28 AM.

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