LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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
 
Search this Thread
Old 01-05-2010, 07:33 PM   #1
bibble_235
LQ Newbie
 
Registered: Jan 2010
Location: New Zealand
Distribution: ubuntu
Posts: 5

Rep: Reputation: 1
mdadm - Recovery


Hi,

Recently had an issue with my RAID1 array. I updated to Ubunt 9.blahhh and this left one of my disks not working.

From memory I found I now had a /dev/md/0 where before I had a /dev/md0.

Managed to mount one of the drives I think by doing mount /dev/md/0 and this gave me access to my drive and I thought that this was just a changed in how the mdadm stuff works.

Current state is

root@denise:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid1 sdc1[1]
488383936 blocks [2/1] [_U]

md_d0 : active raid1 sdd1[0]
488383936 blocks [2/1] [U_]

And I have the following devices

root@denise:~# ls -lR /dev/md*
brw-rw---- 1 root disk 9, 0 2010-01-05 19:38 /dev/md0
brw-rw---- 1 root disk 253, 0 2010-01-05 19:18 /dev/md_d0
lrwxrwxrwx 1 root root 7 2010-01-05 19:18 /dev/md_d0p1 -> md/d0p1
lrwxrwxrwx 1 root root 7 2010-01-05 19:18 /dev/md_d0p2 -> md/d0p2
lrwxrwxrwx 1 root root 7 2010-01-05 19:18 /dev/md_d0p3 -> md/d0p3
lrwxrwxrwx 1 root root 7 2010-01-05 19:18 /dev/md_d0p4 -> md/d0p4

/dev/md:
total 0
brw-rw---- 1 root disk 9, 0 2010-01-05 19:38 0
brw------- 1 root root 253, 0 2010-01-05 19:18 d0
brw------- 1 root root 253, 1 2010-01-05 19:18 d0p1
brw------- 1 root root 253, 2 2010-01-05 19:18 d0p2
brw------- 1 root root 253, 3 2010-01-05 19:18 d0p3
brw------- 1 root root 253, 4 2010-01-05 19:18 d0p4

A drive is mounted on from /dev/md/0 and does show the data. However I have a message that says

DegradedArray event on /dev/md0:denise.xxx.xx

I also noticed that it swaps between sdd1 and sdc1. I suspect this is me mount the drive from the wrong place.

Other detail which may be useful.

root@denise:~# mdadm --detail /dev/md/0
/dev/md/0:
Version : 00.90
Creation Time : Wed Jan 21 18:45:58 2009
Raid Level : raid1
Array Size : 488383936 (465.76 GiB 500.11 GB)
Used Dev Size : 488383936 (465.76 GiB 500.11 GB)
Raid Devices : 2
Total Devices : 1
Preferred Minor : 0
Persistence : Superblock is persistent

Update Time : Wed Jan 6 14:25:42 2010
State : clean, degraded
Active Devices : 1
Working Devices : 1
Failed Devices : 0
Spare Devices : 0

UUID : 5c3f9459:b5ba36d7:ecb97297:886d2585 (local to host denise.bibble.co.nz)
Events : 0.2424

Number Major Minor RaidDevice State
0 0 0 0 removed
1 8 33 1 active sync /dev/sdc1

My current approach is to copy it all off and then build the RAID however I would like to try and understand how I could recover from this.

Regards,
Iain
 
Old 01-06-2010, 10:01 AM   #2
esaym
Member
 
Registered: Nov 2006
Distribution: Lots of Debian
Posts: 165

Rep: Reputation: 32
What is in your /etc/mdadm/mdadm.conf ?
What does running sudo /usr/share/mdadm/mkconf say?
You are showing that you have 2 arrays: md0 and md_d0, is that correct?
What devices are supposed to be in the array? sda1, sdb1, ect...
 
Old 01-06-2010, 12:54 PM   #3
bibble_235
LQ Newbie
 
Registered: Jan 2010
Location: New Zealand
Distribution: ubuntu
Posts: 5

Original Poster
Rep: Reputation: 1
The configuration is empty.


# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#

# by default, scan all partitions (/proc/partitions) for MD superblocks.
# alternatively, specify devices to scan, using wildcards if desired.
DEVICE partitions

# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes

# automatically tag new arrays as belonging to the local system
HOMEHOST <system>

# instruct the monitoring daemon where to send mail alerts
MAILADDR root

# definitions of existing MD arrays

# This file was auto-generated on Wed, 21 Jan 2009 16:39:36 +1300
# by mkconf $Id$

And it is supposed to be sdc1 and sdd1
 
Old 01-06-2010, 03:04 PM   #4
esaym
Member
 
Registered: Nov 2006
Distribution: Lots of Debian
Posts: 165

Rep: Reputation: 32
It shouldn't be that way. Is there anything else in /etc/mdadm/ ?
does sudo /usr/share/mdadm/mkconf output what appears to be correct?

If so, you can create a new /etc/mdadm/mdadm.conf with:
sudo /usr/share/mdadm/mkconf > /etc/mdadm/mdadm.conf

The man pages have a good overview of how all of this stuff works:
http://linux.die.net/man/8/mdadm
http://www.howtoforge.com/how-to-set...n-debian-lenny
 
  


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
Software Raid 5 (md) recovery using mdadm fakeroot Linux - Server 24 04-15-2013 09:19 AM
Failed RAID5 disk array, questions about mdadm and recovery HellesAngel Linux - General 13 04-08-2012 05:30 AM
mdadm: no such device: md0 -- RAID doesn't work after system recovery jlinkels Linux - Server 1 11-30-2009 08:14 PM
RAID10 Recovery Issue - mdadm segfault marc2112 Linux - Server 2 02-15-2009 08:25 AM
mdadm RAID 5, 6 disks failed. recovery possible? ufmale Linux - Server 10 10-20-2008 08:24 AM


All times are GMT -5. The time now is 09:25 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