LinuxQuestions.org
Visit Jeremy's Blog.
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 05-07-2016, 02:34 PM   #1
bkeahl
LQ Newbie
 
Registered: May 2016
Posts: 1

Rep: Reputation: Disabled
How to add accidentally removed drive from broken RAID 10


The short story is I think I need to add drives back that were removed from a raid array by accident.

My power supply started failing but didn't just shut down. The computer was running but the drives spun down (yikes!). This made the raid software, I assume, think the drives failed and removed them from the array.

The problem is, too many were removed from one of the partitions (naturally the one I need the most). I replaced the power supply and all drives spin up and are recognized in the bios.

On boot I get:

Warning: /dev/disk/by-uuid/105f2e75-6900-42d1-85c5-8d9ab70da32a does not exist
I also get a notice that md126 does not have enough operational mirrors
then ...
Entering emergency mode
then ...
dracut:/#


mdstat has:
md125 : active (auto-read-only) raid10 sda5[0] sdc5[2]
md126 : inactive sda3[0]
md127 : active (auto-read-only) raid10 sda2[0] sdc2[2]


Tried mdadm --assemble --scan
I got:
mdadm: /dev/md/localhost.localdomain:databases assembled from drive - not enough to start the array
mdadm: /dev/md/localhost.localdomain:root_0 assembled from drive - not enough to start the array
mdadm: /dev/md/localhost.localdomain:swap_0 assembled from drive - not enough to start the array
mdadm: /dev/md/localhost.localdomain:home assembled from drive - not enough to start the array

Tried mdadm --assemble --scan /dev/md126
I got:
mdadm : /dev/md126 not identified in config file

I ran mdadm --detail on each of the above. md125 and md127 each have raid drives 1 and 3 missing (the array has 4 total). md126 has raid drives 1,2 & 3 missing.
md125 shows /dev/sda5 and /dev/sdc5 are there. I'm guessing I could run mdadm --manage /dev/md125 --add /dev/sdb5 --add sdd5 to put them back in
md126 shows /dev/sda3 as there. I'm guessing I could run mdadm --manage /dev/md126 --add /dev/sdb3 --add sdc3 --add sdd3 to put them back in
md127 shows /dev/sda2 and /dev/sdc3 are there. I'm guessing I could run mdadm --manage /dev/md127 --add /dev/sdb2 --add /dev/sdd2 to put them back in


Since I've never done this before, I'm looking for some input from folks who have experience with this.

Last edited by bkeahl; 05-07-2016 at 02:35 PM.
 
Old 05-08-2016, 03:18 AM   #2
frostschutz
Member
 
Registered: Apr 2004
Distribution: Gentoo
Posts: 95

Rep: Reputation: 28
Quote:
Originally Posted by bkeahl View Post
I ran mdadm --detail on each of the above. md125 and md127 each have raid drives 1 and 3 missing (the array has 4 total). md126 has raid drives 1,2 & 3 missing.
Always show the actual output, instead of telling us what the output looked like...

Run both `mdadm --detail /dev/md*` and `mdadm --examine /dev/sd*` and copy-paste the whole thing in a [ code ] block.

mdadm --add usually only works when the RAID itself is still running.
 
  


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
linux raid fails to add a hard drive to the raid on boot up evansmb Linux - Software 3 09-24-2014 09:31 AM
[SOLVED] kde panel accidentally removed 13.1 ferrel Slackware 4 08-21-2012 07:15 PM
mdadm: Removed two drives (still valid) from raid-5 and need to add them back in. mjtice Linux - Newbie 5 03-13-2011 04:00 PM
Accidentally rc0.d directory removed!!! jastazv Linux - Software 7 02-25-2009 01:44 PM
I removed a drive from my raid array, how can I get it to boot alone? abefroman Linux - Hardware 2 10-04-2005 08:40 AM

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

All times are GMT -5. The time now is 11:44 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