Fedora Linux Support Community & Resources Center
  #1  
Old 18th November 2011, 06:32 PM
Tamater Offline
Registered User
 
Join Date: Nov 2011
Posts: 35
linuxchrome
Unable to replace drive in software RAID-5 array (Fedora 14)

I'm new to managing a RAID-5 array here at work. This is now the second drive that has failed on us out of a batch of 4 in less than a year and we're quite unhappy about it (looking at you, WD). I can't seem to get the new drive to be accepted into the RAID.

Here's my setup:

OS: Fedora 14
Drives: 1 System drive, 3 exisiting 2TB drives in RAID-5 (of the original 4) All SATA


So, I removed the old failing drive (it has been sent off to WD) and inserted my new drive.

Upon boot, I loaded up palimpsest and clicked on the RAID listed on the left:

State: Not running, partially assembled
Components: 4
in the red "Volume" bar graphic it says "RAID Array is not running" however, the "Stop RAID Array" button is enabled. It also says "/dev/md127" in the title bar.

When I click Edit Components, and Add Spare, it allows me to add the new drive.
Then, back on the main palimpsest screen, it still shows the RAID as not running....I click Start Array and gives the following error:

Error assembling array: mdadm exited with exit code 1: mdadm: failed to RUN_ARRAY /dev/md0: Input/output error
mdadm: Not enough devices to start the array.

This error occurs whether I add the new drive or not.


[aside] Is this normal that it automounts the RAID to md127 on boot, but tries to be md0 after stopping then restarting?


Also, when I do a /sbin/mdadm --detail /dev/md127, I get the following:


[root@spectrum ~]# /sbin/mdadm --detail /dev/md127
/dev/md127:
Version : 1.2
Creation Time : Mon May 9 11:46:07 2011
Raid Level : raid5
Used Dev Size : 1953510400 (1863.01 GiB 2000.39 GB)
Raid Devices : 4
Total Devices : 2
Persistence : Superblock is persistent

Update Time : Tue Nov 15 15:55:43 2011
State : active, FAILED, Not Started
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0

Layout : left-symmetric
Chunk Size : 512K

Name : :RAID
UUID : 68fba474:da41eab6:7071f9fc:baa56434
Events : 56793

Number Major Minor RaidDevice State
0 8 17 0 active sync /dev/sdb1
1 8 1 1 active sync /dev/sda1
2 0 0 2 removed
3 0 0 3 removed



It's as if it is saying there are only 2 drives connected when I definitely have the original 3 (plus the new one).



How do I get this sorted out? I am not familiar with using mdadm or any other text-based admin of RAID..... These drives contain important medical research data backups and I absolutely must get it back. (some stuff on it has no other backups I've now realized)

Thanks in advance,

Matt
Reply With Quote
  #2  
Old 18th November 2011, 07:31 PM
leigh123linux's Avatar
leigh123linux Offline
Retired Administrator
 
Join Date: Oct 2006
Posts: 21,509
linuxfirefox
Re: Unable to replace drive in software RAID-5 array (Fedora 14)

Post


Code:
mdadm --detail --scan >> /etc/mdadm.conf
And

Code:
fdisk -l
Also list the dev names for the new and missing drives
Reply With Quote
  #3  
Old 18th November 2011, 07:33 PM
Tamater Offline
Registered User
 
Join Date: Nov 2011
Posts: 35
linuxchrome
Re: Unable to replace drive in software RAID-5 array (Fedora 14)

Quote:
Originally Posted by leigh123linux View Post
Post


Code:
mdadm --detail --scan >> /etc/mdadm.conf
And

Code:
fdisk -l
Also list the dev names for the new and missing drives
When I do that command, it does nothing but go back to the prompt.

Here is my /etc/mdadm.conf file:


# mdadm.conf written out by anaconda
MAILADDR root
AUTO +imsm +1.x -all
ARRAY /dev/md0 metadata=1.2 name=:RAID UUID=68fba474:da41eab6:7071f9fc:baa56434
ARRAY /dev/md0 metadata=1.2 name=:RAID UUID=68fba474:da41eab6:7071f9fc:baa56434
Reply With Quote
  #4  
Old 18th November 2011, 07:40 PM
leigh123linux's Avatar
leigh123linux Offline
Retired Administrator
 
Join Date: Oct 2006
Posts: 21,509
linuxfirefox
Re: Unable to replace drive in software RAID-5 array (Fedora 14)

Quote:
Originally Posted by Tamater View Post
When I do that command, it does nothing but go back to the prompt.

Here is my /etc/mdadm.conf file:


# mdadm.conf written out by anaconda
MAILADDR root
AUTO +imsm +1.x -all
ARRAY /dev/md0 metadata=1.2 name=:RAID UUID=68fba474:da41eab6:7071f9fc:baa56434
ARRAY /dev/md0 metadata=1.2 name=:RAID UUID=68fba474:da41eab6:7071f9fc:baa56434

Ok post

Code:
mdadm --detail /dev/md0
Reply With Quote
  #5  
Old 18th November 2011, 07:42 PM
Tamater Offline
Registered User
 
Join Date: Nov 2011
Posts: 35
linuxchrome
Re: Unable to replace drive in software RAID-5 array (Fedora 14)

/sbin/mdadm --detail /dev/md0
/dev/md0:
Version : 1.2
Creation Time : Mon May 9 11:46:07 2011
Raid Level : raid5
Used Dev Size : 1953510400 (1863.01 GiB 2000.39 GB)
Raid Devices : 4
Total Devices : 2
Persistence : Superblock is persistent

Update Time : Tue Nov 15 15:55:43 2011
State : active, FAILED, Not Started
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0

Layout : left-symmetric
Chunk Size : 512K

Name : :RAID
UUID : 68fba474:da41eab6:7071f9fc:baa56434
Events : 56793

Number Major Minor RaidDevice State
0 8 17 0 active sync /dev/sdb1
1 8 1 1 active sync /dev/sda1
2 0 0 2 removed
3 0 0 3 removed
Reply With Quote
  #6  
Old 18th November 2011, 07:50 PM
leigh123linux's Avatar
leigh123linux Offline
Retired Administrator
 
Join Date: Oct 2006
Posts: 21,509
linuxfirefox
Re: Unable to replace drive in software RAID-5 array (Fedora 14)

Ok add the missing drives using (change/dev/sdxx to match the missing drives)

add the first drive

Code:
mdadm --add /dev/md0 /dev/sdxx
check it's added with

Code:
 mdadm --detail /dev/md0
then add the second drive


Code:
mdadm --add /dev/md0 /dev/sdxx
check it again

Code:
mdadm --detail /dev/md0
Reply With Quote
  #7  
Old 18th November 2011, 07:53 PM
Tamater Offline
Registered User
 
Join Date: Nov 2011
Posts: 35
linuxchrome
Re: Unable to replace drive in software RAID-5 array (Fedora 14)

Quote:
Originally Posted by leigh123linux View Post
Ok add the missing drives using (change/dev/sdxx to match the missing drives)

add the first drive

Code:
mdadm --add /dev/md0 /dev/sdxx
check it's added with

Code:
 mdadm --detail /dev/md0
then add the second drive


Code:
mdadm --add /dev/md0 /dev/sdxx
check it again

Code:
mdadm --detail /dev/md0
what do you mean by first/second drive? there are 4. 3 that should have the degraded RAID on them and a new empty one. in that --detail, it only shows 2 of the 3 RAID drives being connected.....so which order do you mean?
Reply With Quote
  #8  
Old 18th November 2011, 07:58 PM
leigh123linux's Avatar
leigh123linux Offline
Retired Administrator
 
Join Date: Oct 2006
Posts: 21,509
linuxfirefox
Re: Unable to replace drive in software RAID-5 array (Fedora 14)

Quote:
Originally Posted by Tamater View Post
what do you mean by first/second drive? there are 4. 3 that should have the degraded RAID on them and a new empty one. in that --detail, it only shows 2 of the 3 RAID drives being connected.....so which order do you mean?

Post

Code:
su
fdisk -l
The array only has two members currently, whats the dev address for the third drive (missing drive) and the dev address for the new drive?
It doesn't matter which order they are added in.
Reply With Quote
  #9  
Old 18th November 2011, 08:15 PM
Tamater Offline
Registered User
 
Join Date: Nov 2011
Posts: 35
windows_7chrome
Re: Unable to replace drive in software RAID-5 array (Fedora 14)

Ok, I understand. I won't be back at that server today, but I will do that on Monday and post my results.

Thanks for your help.
Reply With Quote
  #10  
Old 18th November 2011, 08:19 PM
leigh123linux's Avatar
leigh123linux Offline
Retired Administrator
 
Join Date: Oct 2006
Posts: 21,509
linuxfirefox
Re: Unable to replace drive in software RAID-5 array (Fedora 14)

Quote:
Originally Posted by Tamater View Post
Ok, I understand. I won't be back at that server today, but I will do that on Monday and post my results.

Thanks for your help.

You also need to prepare the new drive before adding it. i.e partition and add raid flag (see step #1)

http://www.jamierf.co.uk/2009/11/04/...n-ubuntu-9-10/
Reply With Quote
  #11  
Old 23rd November 2011, 08:04 PM
Tamater Offline
Registered User
 
Join Date: Nov 2011
Posts: 35
linuxchrome
Re: Unable to replace drive in software RAID-5 array (Fedora 14)

Hi guys, I hope you're still with me. Finally found some time to get back to this problem. Here's an update.

I tried adding the 3rd drive to the array (as mentioned above) using /sbin/mdadm --add /dev/md0 /dev/sda1

Result:
Code:
[root@spectrum ~]# /sbin/mdadm --detail /dev/md0
/dev/md0:
        Version : 1.2
  Creation Time : Mon May  9 11:46:07 2011
     Raid Level : raid5
  Used Dev Size : 1953510400 (1863.01 GiB 2000.39 GB)
   Raid Devices : 4
  Total Devices : 3
    Persistence : Superblock is persistent

    Update Time : Wed Nov 23 14:52:18 2011
          State : active, FAILED, Not Started
 Active Devices : 2
Working Devices : 3
 Failed Devices : 0
  Spare Devices : 1

         Layout : left-symmetric
     Chunk Size : 512K

           Name : :RAID
           UUID : 68fba474:da41eab6:7071f9fc:baa56434
         Events : 56794

    Number   Major   Minor   RaidDevice State
       0       8       17        0      active sync   /dev/sdb1
       1       8       33        1      active sync   /dev/sdc1
       2       0        0        2      removed
       3       0        0        3      removed

       4       8        1        -      spare   /dev/sda1
Now it has that one as a spare? How do I make it RaidDevice 2 or 3 as it should be?

Actually, now when I try to add it is saying:

Code:
[root@spectrum ~]# /sbin/mdadm --add /dev/md0 /dev/sda1
mdadm: add new device failed for /dev/sda1 as 4: Invalid argument

This is obviously a much bigger problem than adding the new drive.


I should also mention that these 4 drives were moved from an older computer into a much better giant case with better CPUs recently. So, it was moved into a new installation of Fedora. However, it mounted and worked just fine in this new system. It was at this point that I noticed one of the drives had a whole bunch of bad sectors and I sent it back to WD. Would this move have anything to do with it? I could try putting the 3 drives back into the old system to see if that works...

Thanks in advance,

Matt
Reply With Quote
  #12  
Old 23rd November 2011, 09:05 PM
leigh123linux's Avatar
leigh123linux Offline
Retired Administrator
 
Join Date: Oct 2006
Posts: 21,509
linuxfirefox
Re: Unable to replace drive in software RAID-5 array (Fedora 14)

Try
Code:
su
mdadm --grow /dev/md0 --raid-devices=3
mdadm /dev/md0 --assemble -u  68fba474:da41eab6:7071f9fc:baa56434
Reply With Quote
  #13  
Old 24th November 2011, 06:46 PM
Tamater Offline
Registered User
 
Join Date: Nov 2011
Posts: 35
linuxchrome
Re: Unable to replace drive in software RAID-5 array (Fedora 14)

Result:

Code:
[root@spectrum ~]# mdadm --grow /dev/md0 --raid-devices=3
mdadm: /dev/md0: Cannot get array details from sysfs
The assemble line doesn't do anything.....

---------- Post added at 01:43 PM ---------- Previous post was at 01:28 PM ----------

I just don't understand what happened between me taking out the old error-ridden drive and putting in this new drive to make me lose yet another drive from the original 3?? How is this even possible? This is the second time I have lost a RAID. Makes me wonder what RAID is even good for since both times a drive has failed, I have lost the whole thing.

Any more suggestions? (thanks for your help so far)

---------- Post added at 01:46 PM ---------- Previous post was at 01:43 PM ----------

This has turned from Unable to replace drive into lost 2nd drive in 4-drive RAID-5 array, inexplicably....

Why is it just adding it as a spare when it is clearly NOT a spare, but a part of the original array?
Reply With Quote
  #14  
Old 24th November 2011, 06:51 PM
leigh123linux's Avatar
leigh123linux Offline
Retired Administrator
 
Join Date: Oct 2006
Posts: 21,509
linuxfirefox
Re: Unable to replace drive in software RAID-5 array (Fedora 14)

Post
Code:
mount -i |grep sysfs
Reply With Quote
  #15  
Old 24th November 2011, 06:54 PM
Tamater Offline
Registered User
 
Join Date: Nov 2011
Posts: 35
linuxchrome
Re: Unable to replace drive in software RAID-5 array (Fedora 14)

Code:
[root@spectrum ~]# mount -i |grep sysfs
sysfs on /sys type sysfs (rw)
[root@spectrum ~]# mdadm --grow /dev/md0 --raid-devices=3
mdadm: /dev/md0: Cannot get array details from sysfs


---------- Post added at 01:54 PM ---------- Previous post was at 01:53 PM ----------

Still getting this:


Code:
[root@spectrum ~]# /sbin/mdadm --detail /dev/md0
/dev/md0:
        Version : 1.2
  Creation Time : Mon May  9 11:46:07 2011
     Raid Level : raid5
  Used Dev Size : 1953510400 (1863.01 GiB 2000.39 GB)
   Raid Devices : 4
  Total Devices : 3
    Persistence : Superblock is persistent

    Update Time : Thu Nov 24 13:29:45 2011
          State : active, FAILED, Not Started
 Active Devices : 2
Working Devices : 3
 Failed Devices : 0
  Spare Devices : 1

         Layout : left-symmetric
     Chunk Size : 512K

           Name : :RAID
           UUID : 68fba474:da41eab6:7071f9fc:baa56434
         Events : 56796

    Number   Major   Minor   RaidDevice State
       0       8       17        0      active sync   /dev/sdb1
       1       8       33        1      active sync   /dev/sdc1
       2       0        0        2      removed
       3       0        0        3      removed

       4       8        1        -      spare   /dev/sda1

sda1 is listed as a spare still and it is NOT a spare, but one of the original 3.
Reply With Quote
Reply

Tags
array, drive, fedora, raid5, replace, software, unable

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Software raid how replace drive Dangermouse Using Fedora 5 4th July 2009 07:54 AM
Need help creating a software raid array. Thaidog Using Fedora 8 10th March 2009 05:09 AM
Software RAID 1 Array Fedora10 andy2008 Using Fedora 4 21st February 2009 06:00 PM
Trouble Getting Software RAID Array Assembled After Installing Fedora 7 ImNtReal Installation and Live Media 0 7th June 2007 03:45 PM
Need help recovering software RAID array verbatim Servers & Networking 1 14th November 2006 06:24 PM


Current GMT-time: 12:42 (Sunday, 19-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat