LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
 
Search this Thread
Old 03-08-2008, 04:39 AM   #1
jacktripper1000
LQ Newbie
 
Registered: Mar 2008
Posts: 3

Rep: Reputation: 0
Raid-5 degraded array but shows clean problem


Hi, I am using openfiler and for past 3 months it has been working without a problem.

Just today, when I booted the server, I got an error via email that the raid array has been degraded.
The setup is as follows:
Boot Device: /dev/hda1 (IDE disk)
Array was composed of sda1,sdb1,sdc1 and sdd1. All 4 SCSI discs. There are no other partitions on these.


However I am confused looking at the output:

[root@storage ~]# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4]
md0 : active raid5 sdd1[4] sdc1[2] sdb1[1] sda1[0]
732587712 blocks level 5, 64k chunk, algorithm 2 [4/3] [UUU_]

unused devices: <none>
[root@storage ~]#


[root@storage ~]# mdadm -D /dev/md0
/dev/md0:
Version : 00.90.03
Creation Time : Mon Dec 10 18:26:21 2007
Raid Level : raid5
Array Size : 732587712 (698.65 GiB 750.17 GB)
Device Size : 244195904 (232.88 GiB 250.06 GB)
Raid Devices : 4
Total Devices : 4
Preferred Minor : 0
Persistence : Superblock is persistent

Update Time : Sat Mar 8 17:59:41 2008
State : clean
Active Devices : 4
Working Devices : 4
Failed Devices : 0
Spare Devices : 0

Layout : left-symmetric
Chunk Size : 64K

UUID : 5ffc8c47:7f6bec1a:781cf971:0cba099e
Events : 0.110924

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

4 8 49 4 active sync /dev/sdd1
[root@storage ~]#

[root@storage ~]# cat /etc/mdadm.conf

#
# PLEASE DO NOT MODIFY THIS CONFIGURATION FILE!
# This configuration file was auto-generated
# by Openfiler. Please do not modify it.
#
# Generated at: Tue Dec 25 11:46:02 IST 2007
#

DEVICE partitions
ARRAY /dev/md0
PROGRAM /opt/openfiler/bin/mdalert
[root@storage ~]#


What should I do to recover the array from this without corrupting my data?

Thanks
Jack
 
Old 03-08-2008, 05:07 PM   #2
Unknown_User
Member
 
Registered: Jan 2003
Location: EU (UK)
Distribution: Ubuntu 14.x, Raspbian, Kali
Posts: 226

Rep: Reputation: 30
What is confusing about the output?

sdd1 has become faulty and, as you have no spare drive in the array, the drive has been marked as faulty and the array is working in degraded mode. sdd1 will still appear but the array will not write to it, hence you are seeing 3x250Mb and not 1Tb of capacity.

You should replace the drive immediately and allow the array to reconstruct.
 
Old 03-09-2008, 05:49 AM   #3
jacktripper1000
LQ Newbie
 
Registered: Mar 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Here's what is confusing (from output listed above):

[root@storage ~]# mdadm -D /dev/md0
/dev/md0:
....
Raid Devices : 4
Total Devices : 4
....
State : clean
Active Devices : 4
Working Devices : 4
Failed Devices : 0
Spare Devices : 0
......
Number Major Minor RaidDevice State
0 8 1 0 active sync /dev/sda1
1 8 17 1 active sync /dev/sdb1
2 8 33 2 active sync /dev/sdc1
0 0 0 0 removed
4 8 49 4 active sync /dev/sdd1


This shows that sdd1 was removed as faulty and re-added as spare (probably).


No, I am not seeing loss of capacity, since only one of the 4 devices has reported a failure.

- Jack
 
Old 03-09-2008, 11:19 AM   #4
Unknown_User
Member
 
Registered: Jan 2003
Location: EU (UK)
Distribution: Ubuntu 14.x, Raspbian, Kali
Posts: 226

Rep: Reputation: 30
Yep, that sounds right.

sdd1 has been removed and added back but is shown as faulty, therefore no writes can be made.

You could remove the drive and perform checks/low level format but I would caution against doing anything on the array.

If the checking and/or format resolve the issue then you may be safe to put the drive back into the array however experience dictates that when a drive failes it will usually return to bad sooner rather than later...
 
Old 03-10-2008, 01:04 AM   #5
jacktripper1000
LQ Newbie
 
Registered: Mar 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Isn't there a way for mdadm to accept this drive back into array and rebuild without losing data?

I am not very comfortable with mdadm so could you please suggest me the commands I need to use (don't worry about syntax).


Regards
Jack.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Degraded Array on Software Raid pcinfo-az Linux - Hardware 8 07-03-2008 10:43 AM
Degraded raid1 array problem on slack 12.0.0 / mdadm slack-12.0.0 Slackware 5 10-12-2007 06:36 AM
RAID help restoring a degraded array partition jahlewis Linux - Hardware 2 10-17-2006 07:55 PM
Trouble booting a degraded RAID-1 array aluchko Linux - Software 3 09-09-2006 10:26 PM
RAID 1 Degraded Array gsoft Debian 2 08-18-2006 02:17 PM


All times are GMT -5. The time now is 11:13 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration