MDADM Raid 5 Array - OS Drive Failure. Help Urgently Needed.
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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
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
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.
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#
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.