View Full Version : [ubuntu] 12.04 lost my RAID

September 23rd, 2012, 11:56 AM
My system has 1x500Gb used for OS and other SW. It also has 2x1Tb drives as a mirrored Raid array containing data. All of this was working correctly under Hardy Heron.

The upgrade to Pangolin caused problems and left the system in an unusable state so I formatted the 500Gb drive and performed a full install. This is fine and works well.

Problem is I can't mount /dev/md0 the Raid array. Disk manager shows me that the discs are healthy and it can see /dev/sdb1 and /dev/sdc1. It will create and start the array without problem but I can't mount it and can't therefore see the data.

I don't want to reformat as this was my Subversion drive hence the need for the Raid.

Any help or suggestions gratefully accepted.

Cheers - MO

September 23rd, 2012, 12:50 PM
What do you mean "create the array"? When you have existing array you assemble it, not create it (it already exists). I hope you didn't try to use --create since you need to use --assemble.

What does:
cat /proc/mdstat

show? If you didn't assemble and mount the array during the install (and according to what you said you never said you did), it might be that mdadm.conf is not correct. What's its content?

For assembling existing array, you use:
sudo mdadm --assemble --scan

After it's assembled maybe you only need to write the config to mdadm.conf so that it's correct.

September 23rd, 2012, 02:10 PM
MO@Linux-U2:~$ cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]

I haven't had to use the command line to do anything to the array. I've used the GUI Disk Utility and it tells me that all is well with the array and I can stop and start it. I just can't mount it. I'm assuming that I need to do a command line mount the first time I mount the array and that Disk Utility will then allow me to do the mount/umount in the future.

I get this result from mdadm

MO@Linux-U2:~$ sudo mdadm --detail /dev/md0
Version : 1.2
Creation Time : Fri Sep 14 14:42:06 2012
Raid Level : raid1
Array Size : 976628736 (931.39 GiB 1000.07 GB)
Used Dev Size : 976628736 (931.39 GiB 1000.07 GB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent

Update Time : Sun Sep 23 14:07:23 2012
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0

Name : Linux-U2:0 (local to host Linux-U2)
UUID : c5a97cf9:1d1f3d2b:06338f81:866e4e07
Events : 22

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

September 23rd, 2012, 03:15 PM
I think it's better to use the command line and not Disk Utility. Maybe that's why it doesn't show anything in mdstat when it should.

Try stopping it in Disk Utility and assembling it in terminal:
sudo mdadm --assemble --scan

Then check /proc/mdstat again and see if it shows the array there.

If it does, I think you need to update mdadm.conf with the commands in this post:

NOTE: DO NOT do the first code box, the mdadm --create command is specific to that thread. Only do the second and third boxes with code to update the mdadm.conf and iniramfs.

September 23rd, 2012, 06:45 PM
No joy there. Raid is stopped but I guess that it leaves it assembled because I get:

MO@Linux-U2:~$ sudo mdadm -assemble -scan
[sudo] password for MO:
mdadm: option -s not valid in manage mode

Is there a way to "disassemble" and then re-assemble it?

September 23rd, 2012, 07:51 PM
Did you try with two dashes or only one? It's sometimes difficult to read the font. The - symbol is doubled in front of both parameters:

sudo mdadm --assemble --scanNo problem if it's assembled, even better since you need it assembled.

Try what the above does, and even if it doesn't work, try adding the info in mdadm.conf as per the posted link.

September 26th, 2012, 08:54 AM
Two "-". I had a read through man first.

I'm away from home atm so I'll try it when I get back.

Thanks for your help.

Cheers - MO