LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-07-2011, 05:06 PM   #1
wazz72
LQ Newbie
 
Registered: Apr 2005
Distribution: Sus 9.2
Posts: 14

Rep: Reputation: 0
MDADM Raid 5 Array - OS Drive Failure. Help Urgently Needed.


MDADM Help Urgently Needed!!! Raid 5 Array not starting.
I have 4 WD10EARS drives running in a RAID 5 array using MDADM.
Yesterday my OS Drive failed. I have replaced this and installed a fresh copy of Ubuntu 11.04 on it.
I then installed MDADM, and rebooted the machine, hoping that it would automatically rebuild the array.
It hasnt, when i look at the array using Disk Utility, it says that the array is not running. If i try to start the array it says :

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.

I have tried MDADM --assemble --scan and it gives this output:

mdadm: /dev/md0 assembled from 2 drives - not enough to start the array.

I know that there are 4 drives present as they are all showing, but it is only using 2 of them.

I also ran MDADM -- detail /dev.md0 which gave:


root@warren-P5K-E:~# mdadm --detail /dev/md0
/dev/md0:
Version : 0.90
Creation Time : Tue Dec 21 20:00:42 2010
Raid Level : raid5
Used Dev Size : 976762496 (931.51 GiB 1000.20 GB)
Raid Devices : 4
Total Devices : 2
Preferred Minor : 0
Persistence : Superblock is persistent

Update Time : Thu Jun 2 08:27:09 2011
State : active, FAILED, Not Started
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0

Layout : left-symmetric
Chunk Size : 64K

UUID : 78bded27:4f36b420:b8c93aaa:68704163
Events : 0.61

Number Major Minor RaidDevice State
0 0 0 0 removed
1 8 32 1 active sync /dev/sdc
2 0 0 2 removed
3 8 48 3 active sync /dev/sdd


By looking at this it looks like only 2 of th 4 drives are activated.

How do I get them all active and start the array again.

There has been nothing written to any of the 4 drives.

Any help would be appreciated.
 
Old 06-07-2011, 06:54 PM   #2
brak44
Member
 
Registered: Aug 2010
Location: Brisbane Australia
Distribution: Centos, Fedora
Posts: 87

Rep: Reputation: 24
Are the missing drives physically present?
i.e. is there supposed to be a /dev/sdb etc
Do a sudo fdisk -l to check.
If they are then you could try
mdadm --assemble /dev/md0 --uuid={UUID-of-raid5-array} --force
 
Old 06-07-2011, 07:38 PM   #3
wazz72
LQ Newbie
 
Registered: Apr 2005
Distribution: Sus 9.2
Posts: 14

Original Poster
Rep: Reputation: 0
Hi, Thanks for the reply.

What is the {UUID-of-raid5-array} ?

Do I need to tell the system the order of the 4 drives?

Im not sure if the system is trying to mount the drives in the array in the wrong order.

If I run:

root@warren-P5K-E:/home/warren# mdadm --assemble --scan -v

I get : (I have removed the other OS drive info)

mdadm: looking for devices for /dev/md0
mdadm: /dev/sdd is identified as a member of /dev/md0, slot 3.
mdadm: /dev/sdc is identified as a member of /dev/md0, slot 1.
mdadm: /dev/sdb is identified as a member of /dev/md0, slot 2.
mdadm: /dev/sda is identified as a member of /dev/md0, slot 0.
mdadm: added /dev/sda to /dev/md0 as 0
mdadm: added /dev/sdb to /dev/md0 as 2
mdadm: added /dev/sdd to /dev/md0 as 3
mdadm: added /dev/sdc to /dev/md0 as 1
mdadm: /dev/md0 assembled from 2 drives - not enough to start the array.


I cant get hold of my mdadm.conf file, as it was on the OS drive that died.

Any help would be appreciated. I really don't want to loose the data

Last edited by wazz72; 06-07-2011 at 07:39 PM.
 
Old 06-08-2011, 04:21 AM   #4
brak44
Member
 
Registered: Aug 2010
Location: Brisbane Australia
Distribution: Centos, Fedora
Posts: 87

Rep: Reputation: 24
as you have already discovered
UUID : 78bded27:4f36b420:b8c93aaa:68704163
 
Old 06-08-2011, 08:48 AM   #5
wazz72
LQ Newbie
 
Registered: Apr 2005
Distribution: Sus 9.2
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks Brak,

WIll it try to rebuild the array in the right order?
If you look at the second post, it looks like 2 of the disks are in the wrong order.
If I force it with them in the wrong order will it ruin my data?
I had a problem with the array before the os drive went, it couldnt find the mdadm.conf file then, and could not start it for some reason. As soon as I fixed the OS drive and it could access the mdadm.conf file it worked fine. Unfortunatley I cant find a backup of the mdadm.conf file (I think its backed up on the array)
Thanks again for your speedy reply, and all your help.
I will let you know how it goes tonight when I return home.
 
Old 06-08-2011, 02:38 PM   #6
wazz72
LQ Newbie
 
Registered: Apr 2005
Distribution: Sus 9.2
Posts: 14

Original Poster
Rep: Reputation: 0
Hi There,

I tried :

root@warren-P5K-E:/home/warren# mdadm --assemble /dev/md0 --uuid={78bded27:4f36b420:b8c93aaa:68704163} --force

and it came back with:

mdadm: Bad uuid: {78bded27:4f36b420:b8c93aaa:68704163}
 
Old 06-08-2011, 07:12 PM   #7
wazz72
LQ Newbie
 
Registered: Apr 2005
Distribution: Sus 9.2
Posts: 14

Original Poster
Rep: Reputation: 0
I still cant get it started, so any help would be appreciated,
 
Old 06-08-2011, 07:20 PM   #8
brak44
Member
 
Registered: Aug 2010
Location: Brisbane Australia
Distribution: Centos, Fedora
Posts: 87

Rep: Reputation: 24
What does
mdadm -A /dev/md0 /dev/sd[a-d]
come back with?
 
Old 06-09-2011, 03:09 AM   #9
wazz72
LQ Newbie
 
Registered: Apr 2005
Distribution: Sus 9.2
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks Brak, I really need to get this sorted.

root@warren-P5K-E:/home/warren# mdadm -A /dev/md0 /dev/sd[a-d]
mdadm: /dev/md0 assembled from 2 drives - not enough to start the array.
root@warren-P5K-E:/home/warren#
 
Old 06-09-2011, 06:20 PM   #10
wazz72
LQ Newbie
 
Registered: Apr 2005
Distribution: Sus 9.2
Posts: 14

Original Poster
Rep: Reputation: 0
Whooo..

Got my array working with:

sudo mdadm --assemble --scan -f

It built in seconds, and all the data is still there.

Time to finish the backup now I think.

How do I save a copy of the current config to mdadm.conf ?
Or backup the arrays settings to store on a flash drive?

Thanks to anyone that helped.

Last edited by wazz72; 06-09-2011 at 06:43 PM.
 
Old 06-09-2011, 07:40 PM   #11
brak44
Member
 
Registered: Aug 2010
Location: Brisbane Australia
Distribution: Centos, Fedora
Posts: 87

Rep: Reputation: 24
It may have already re-created the /etc/mdadm.conf file as the man page says
in the assemble scan section

If udev is active, mdadm does not create any entries in /dev but leaves
that to udev. It does record information in /var/run/mdadm/map which
will allow udev to choose the correct name.

If mdadm detects that udev is not configured, it will create the
devices in /dev itself.
 
  


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
mdadm RAID 5 single drive failure atarghe1 Linux - Server 7 12-14-2012 07:20 PM
mdadm raid 5 and failing drive doesn't drop out of array elpresidente44 Linux - Server 1 05-24-2008 08:38 PM
I need help on repairing a mdadm raid 5 array compgeek50 Linux - Hardware 0 02-24-2008 09:06 AM
RAID mdadm - Sending E-Mails on RAID Failure? rootking Linux - General 1 12-25-2007 04:59 AM
can't boot raid array after drive failure Rascale Linux - Hardware 4 02-12-2006 07:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:48 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration