LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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
 
LinkBack Search this Thread
Old 09-18-2013, 12:58 PM   #1
Lyuokdea
LQ Newbie
 
Registered: Mar 2005
Posts: 5

Rep: Reputation: 0
Rebuild Raid5 Array with mdadm


Hi All,

I have a raid5 array (4 2TB disks) which has one disk reporting down (the raid is still functional though). GSmartControl reports that all disks have Passed the Basic Health Check, and they all seem to be working.

cat /proc/mdstat returns:

Personalities : [raid6] [raid5] [raid4] [linear] [multipath] [raid0] [raid1] [raid10]
md0 : active raid5 sde[0] sdf[3] sdd[2]
5860543488 blocks level 5, 64k chunk, algorithm 2 [4/3] [U_UU]

/dev/sdc is the other disk that should be on the array, but appears to be down. I ran tests through GSmartControl on it, and it seemed fine.


However:

sudo mdadm --examine /dev/hdc returns:

t@chasm:/zdata$ sudo mdadm --examine /dev/sdc
/dev/sdc:
Magic : a92b4efc
Version : 0.90.00
UUID : 7b38c320:eced2a6d:6d905266:b51eeb64 (local to host chasm)
Creation Time : Sun Jan 2 01:30:12 2011
Raid Level : raid5
Used Dev Size : 1953514496 (1863.02 GiB 2000.40 GB)
Array Size : 5860543488 (5589.05 GiB 6001.20 GB)
Raid Devices : 4
Total Devices : 4
Preferred Minor : 0

Update Time : Wed Aug 21 08:20:18 2013
State : active
Active Devices : 4
Working Devices : 4
Failed Devices : 0
Spare Devices : 0
Checksum : 47dcd114 - correct
Events : 3549410

Layout : left-symmetric
Chunk Size : 64K

Number Major Minor RaidDevice State
this 1 8 32 1 active sync /dev/sdc

0 0 8 64 0 active sync /dev/sde
1 1 8 32 1 active sync /dev/sdc
2 2 8 48 2 active sync /dev/sdd
3 3 8 80 3 active sync /dev/sdf

which seems to disagree with mdstat, and says that everything is working.

What do I trust, is my raid ok?

Thanks,

~Lyuokdea
 
Old 09-19-2013, 02:18 PM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 1,821

Rep: Reputation: Disabled
What does mdadm --detail /dev/md0 say?
 
Old 09-23-2013, 10:21 AM   #3
Lyuokdea
LQ Newbie
 
Registered: Mar 2005
Posts: 5

Original Poster
Rep: Reputation: 0
/dev/md0:
Version : 0.90
Creation Time : Sun Jan 2 01:30:12 2011
Raid Level : raid5
Array Size : 5860543488 (5589.05 GiB 6001.20 GB)
Used Dev Size : 1953514496 (1863.02 GiB 2000.40 GB)
Raid Devices : 4
Total Devices : 3
Preferred Minor : 0
Persistence : Superblock is persistent

Update Time : Mon Sep 23 10:20:18 2013
State : clean, degraded
Active Devices : 3
Working Devices : 3
Failed Devices : 0
Spare Devices : 0

Layout : left-symmetric
Chunk Size : 64K

UUID : 7b38c320:eced2a6d:6d905266:b51eeb64 (local to host chasm)
Events : 0.3713634

Number Major Minor RaidDevice State
0 8 64 0 active sync /dev/sde
1 0 0 1 removed
2 8 48 2 active sync /dev/sdd
3 8 80 3 active sync /dev/sdf


So it looks like it thinks one of the disks was removed from the raid -- but they are all plugged in, and a disk manager (like gsmartcontrol) seems to find them all.
 
Old 09-23-2013, 10:37 AM   #4
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 1,821

Rep: Reputation: Disabled
Well, mdadm --detail doesn't lie; it shows the actual state of the array.

Re-add the missing drive with
Code:
mdadm --manage /dev/md0 --add /dev/sdc
You should check your logs to find out when and why /dev/sdc was removed from the array.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help me to recover my mdadm RAID5 array Slingky Linux - Server 1 05-12-2012 08:22 PM
mdadm raid5 module blocks array rebuild angry.tangerine Linux - Server 0 09-25-2011 11:07 AM
raid5 with mdadm does not ron or rebuild adiehl Linux - General 12 07-26-2010 10:01 AM
mdadm RAID5 degraded/rebuild access issues. dbrazeau Linux - Software 5 04-15-2010 12:12 PM
cannot rebuild RAID5 array after two disks went offline waimea Linux - General 2 03-22-2007 03:40 AM


All times are GMT -5. The time now is 08:21 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
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration