LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Tags used in this thread
Popular LQ Tags ,

Reply
 
Thread Tools
Old 09-05-2009, 05:35 PM   #1
viperuk
LQ Newbie
 
Registered: Jan 2008
Location: UK
Distribution: Debian
Posts: 8
Thanked: 0
Raid 5 array messing around


[Log in to get rid of this advertisement]
I have a server running a raid 5 array. 2 SATA and 2 IDE drives. for some resin when one of the IDE drives seems to have stopped working, that is ok, but the problem is now that the second drive on the IDE interface seems to have excluded its self form the array perusal when i do a mdadm --detail /dev/md0 i get
Code:
/dev/md0:
        Version : 00.90
  Creation Time : Mon Aug 25 13:59:13 2008
     Raid Level : raid5
  Used Dev Size : 478126464 (455.98 GiB 489.60 GB)
   Raid Devices : 4
  Total Devices : 2
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Fri Sep  4 22:44:59 2009
          State : active, degraded, Not Started
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

         Layout : left-symmetric
     Chunk Size : 64K

           UUID : e4b653bb:d10a5cef:399aafef:fdf3ae5e
         Events : 0.1639022

    Number   Major   Minor   RaidDevice State
       0       0        0        0      removed
       1       0        0        1      removed
       2       8        3        2      active sync   /dev/sda3
       3       8       19        3      active sync   /dev/sdb3
which shows both SATA drive working in the array but both IDE drives excluded but when I do mdadm --examine /dev/hdc3 wich is the remaining IDE drive that is working I get.
Code:
/dev/hdc3:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : e4b653bb:d10a5cef:399aafef:fdf3ae5e
  Creation Time : Mon Aug 25 13:59:13 2008
     Raid Level : raid5
  Used Dev Size : 478126464 (455.98 GiB 489.60 GB)
     Array Size : 1434379392 (1367.93 GiB 1468.80 GB)
   Raid Devices : 4
  Total Devices : 4
Preferred Minor : 0

    Update Time : Fri Sep  4 13:43:08 2009
          State : active
 Active Devices : 4
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 0
       Checksum : 4667a71c - correct
         Events : 1633875

         Layout : left-symmetric
     Chunk Size : 64K

      Number   Major   Minor   RaidDevice State
this     1       3       67        1      active sync

   0     0       3        3        0      active sync
   1     1       3       67        1      active sync
   2     2       8        3        2      active sync   /dev/sda3
   3     3       8       19        3      active sync   /dev/sdb3
which from what I can tell the drive is fine. hasnt been formatted or anything but is just not being included in the array. is there anyway to re-add it to the array without losing everything on it then I can replace the problem drive also. any help would be greatly appreciated

viperuk
windows_xp_2003 viperuk is offline  
Tag This Post ,
Reply With Quote
Old 09-06-2009, 09:17 AM   #2
esaym
Member
 
Registered: Nov 2006
Distribution: Lots of Debian
Posts: 157
Thanked: 3
Probably something like
mdadm --fail /dev/md0 /dev/hdc3
mdadm --remove /dev/md0 /dev/hdc3
mdadm --add /dev/md0 /dev/hdc3
linuxdebian esaym is offline     Reply With Quote
Old 09-06-2009, 09:23 AM   #3
esaym
Member
 
Registered: Nov 2006
Distribution: Lots of Debian
Posts: 157
Thanked: 3
If the array has been stopped already then you might have to force it to assemble with:
mdadm --assemble --force /dev/md0 /dev/hdc3 /dev/sda3 /dev/sdb3 (note that I left out the other ide drive, not sure if that is what you want or not...) Regardless of how many drives you list here, forcing assemble will only assemble the array with 3 of the 4 drives so you will still have to add the other drive before it will begin to resync.

Either way, after you are done with either adding the drive or assembling, you will have to fsck the filesystem to fix all of the errors induced by the broken array. With /dev/md0 NOT mounted:
e2fsck -f -D /dev/md0

Make sure to only run that after you have the array working right!
linuxdebian esaym is offline     Reply With Quote
Thanked by:
Old 09-07-2009, 07:41 PM   #4
viperuk
LQ Newbie
 
Registered: Jan 2008
Location: UK
Distribution: Debian
Posts: 8
Thanked: 0

Original Poster
Thumbs up

I got it resolved, I had to include all 4 drives in the --assemble --force as every time I attempted with only 3 it was coming up saying there weren't enough drives to start the array. When I did build saying to use all 4 drives it only used the 3 good drives and then I replaced the faulty drive and was then able to resync the whole array.

although before I got as far as completing the rebuild I took a copy of any data that was available from the 3 drives to ensure I had a current backup just in case things went down hill again. I didnt like the --force command is why I turned here for an answer but now I have a bit more confidants and more understanding of mdadm

thank you for your help

viperuk
windows_xp_2003 viperuk is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
RAID array gone, can't get it working again! 1N4148 Linux - Hardware 6 07-16-2009 05:48 AM
Adding an old software-RAID array to a software-RAID installation.. Boot problems GarethM Linux - Hardware 2 05-05-2008 04:16 PM
same raid array on 2 O.S. tataiermail Linux - Server 5 06-27-2007 10:22 AM
Raid Array wwnexc Linux - Hardware 1 09-25-2005 06:47 PM
Help!! Mounting a raid array Cannedsoup Linux - Hardware 1 07-07-2003 07:26 PM


All times are GMT -5. The time now is 02:18 PM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration