LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 02-19-2014, 04:24 PM   #1
trancephorm
Member
 
Registered: Nov 2004
Posts: 34

Rep: Reputation: 0
Exclamation Broken mdadm RAID0 array, but data is there, only can't mount it.


TL;DR; complete RAID0 array data on both disks is most probably still there, it's only that something little is broken with /dev/sda member so I can't mount raid array anymore, /dev/sdb should be intact, but read on... pls...

I messed up... Plugged in new USB external disk and did not pay good attention which drive I'm formatting. Size of the drive I wanted to format is the same as size of /dev/sda disk that is member of /dev/md0 raid0 mdadm array...

So I tried to format /dev/sda instead of /dev/sde and some kind of error showed up, the moment I saw it I realised what I did, and I was thinking then ok, I can say goodbye to data because I formatted the member of raid0 array, but it's not how it turned out to be: seems like gparted didn't touch the data, but just the partition table. All in all - I was still able to access the data, so I was thinking ok, everything is alright, gparted throwed an error - actually did not do any damage.

Even if I was able to access data, after a reboot, md0 raid partition couldn't be mounted, so I can't access data anymore... can't mount raid array.

I feel this can be solved with just few lines... Any data and logs you may need, please ask, will provide it gladly.

Thanks!
 
Old 02-19-2014, 04:59 PM   #2
trancephorm
Member
 
Registered: Nov 2004
Posts: 34

Original Poster
Rep: Reputation: 0
cat /etc/mdadm/mdadm.conf gives:
ARRAY /dev/md0 metadata=1.2 name=mm:0 UUID=35cf5ffd:b1f550da:189c2d40:7138e5f9
MAILADDR root

-------------------------------------------------------
mdadma --examine --scan gives:
ARRAY /dev/md/0 metadata=1.2 UUID=35cf5ffd:b1f550da:189c2d40:7138e5f9 name=mm:0

-------------------------------------------------------
cat /proc/mdstat gives:
Personalities : [raid0] [linear] [multipath] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid0 sdb1[1] sda1[0]
3907025984 blocks super 1.2 64k chunks
unused devices: <none>

-------------------------------------------------------
Excerpt from dmesg:
[ 3.555436] udevd[138]: starting version 175
[ 3.687737] md: bind<sda1>
[ 3.736762] md: bind<sdb1>
[ 3.738136] Disabling lock debugging due to kernel taint
[ 3.738258] md: raid0 personality registered for level 0
[ 3.738452] md/raid0:md0: md_size is 7814051968 sectors.
[ 3.738460] md: RAID0 configuration for md0 - 2 zones
[ 3.738461] md: zone0=[sda1/sdb1]
[ 3.738465] zone-offset= 0KB, device-offset= 0KB, size=3907024896KB
[ 3.738466] md: zone1=[sda1]
[ 3.738468] zone-offset=3907024896KB, device-offset=1953512448KB, size= 1088KB
[ 3.738469]
[ 3.738476] md0: detected capacity change from 0 to 4000794607616
[ 3.742087] md0: unknown partition table

-------------------------------------------------------
mdadm --examine /dev/sda gives:
/dev/sda:
MBR Magic : aa55
Partition[0] : 3907027120 sectors at 2048 (type fd)

mdadm --examine /dev/sdb gives this:
/dev/sdb:
MBR Magic : aa55
Partition[0] : 3907025007 sectors at 2048 (type fd)

-------------------------------------------------------
testdisk utility says there are hidden sectors on /dev/sdb, which I think is normal, but it's not the same with sda (which was messed up)

-------------------------------------------------------
mdadm --assemble --scan -v gives:
mdadm: looking for devices for /dev/md0
mdadm: no RAID superblock on /dev/md0
mdadm: no RAID superblock on /dev/sdd2
mdadm: no RAID superblock on /dev/sdd1
mdadm: no RAID superblock on /dev/sdd
mdadm: cannot open device /dev/sr0: No medium found
mdadm: no RAID superblock on /dev/sdc1
mdadm: no RAID superblock on /dev/sdc
mdadm: /dev/sdb1 is busy - skipping
mdadm: no RAID superblock on /dev/sdb
mdadm: /dev/sda1 is busy - skipping
mdadm: no RAID superblock on /dev/sda

-------------------------------------------------------
fdisk -l gives this:
Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
81 heads, 63 sectors/track, 765633 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x6dcc917b

Device Boot Start End Blocks Id System
/dev/sda1 2048 3907029167 1953513560 fd Linux raid autodetect

Disk /dev/sdb: 2000.4 GB, 2000397852160 bytes
48 heads, 29 sectors/track, 2806772 cylinders, total 3907027055 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x6dcc917d

Device Boot Start End Blocks Id System
/dev/sdb1 2048 3907027054 1953512503+ fd Linux raid autodetect

Last edited by trancephorm; 02-19-2014 at 05:06 PM.
 
  


Reply



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 mdadm RAID6 recovery - how to reassemble badly broken array eduardr Linux - Server 0 09-20-2011 11:00 AM
A special steps require to re-initial RAID0 array created with mdadm? CyyberspaceCowboy Linux - Software 3 10-19-2010 04:48 PM
How to mount hard RAID5 array with software RAID0 and GPT? Chunky77 Linux - Newbie 9 08-13-2009 12:32 AM
Migrate RAID0 array to RAID10 with mdadm jimbro727 Linux - General 6 07-17-2009 07:01 PM
ntfs windows raid0 mdadm and mount iainmackay85 Linux - Software 0 11-16-2008 12:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:27 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
Open Source Consulting | Domain Registration