LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 01-21-2010, 03:03 AM   #1
Ciesko
LQ Newbie
 
Registered: Jan 2010
Posts: 1

Rep: Reputation: 0
mdadm raid 5 recovery / reassemble


Hi there,
so that's my first post, quite hard to solve I think.

Here's the situation:
- NAS with a Linux embedded OS installed
- 4 500Gb hard drives that's supposed to be in raid 5 managed by mdadm.

What's happened:
I was moving all the docs from the NAS to another HDD via SMB and suddenly it stuck! After that I powered off the NAS, from that moment It seems that mdadm it's not able to find the arrays and mount them..

What I tried:

1. I know for sure that there was 2 arrays one md0 and one md1. If i try

Code:
mdadm --assemble /dev/md0 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1
the result is

Code:
mdadm: no recogniseable superblock
mdadm: /dev/sda1 has no superblock - assembly aborted
2. I looked into my mdadm.conf in the /etc dir and it's just

Code:
DEVICE /dev/hd*[0-9] /dev/sd*[0-9]
3. I tried to mdadm --assemble --scan but since I do not know how to fix the mdadm.conf the error is

Code:
mdadm: No arrays found in config file
4. All the hard disks are showed:

Code:
HYDRA-LAN> fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sda1               1          22      176714+  fd  Linux raid autodetect
/dev/sda2              23       60785   488078797+  fd  Linux raid autodetect
/dev/sda3           60786       60801      128520   82  Linux swap

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sdb1               1          22      176714+  fd  Linux raid autodetect
/dev/sdb2              23       60785   488078797+  fd  Linux raid autodetect
/dev/sdb3           60786       60801      128520   82  Linux swap

Disk /dev/sdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sdc1               1          22      176714+  fd  Linux raid autodetect
/dev/sdc2              23       60785   488078797+  fd  Linux raid autodetect
/dev/sdc3           60786       60801      128520   82  Linux swap

Disk /dev/sdd: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sdd1               1          22      176714+  fd  Linux raid autodetect
/dev/sdd2              23       60785   488078797+  fd  Linux raid autodetect
/dev/sdd3           60786       60801      128520   82  Linux swap
So the main question is: am I able to reasseble this raid? And if not Am I able at least to mount the single partitions and recover my data?

Thanks a lot

Update

What if I edit my mdadm.conf with

Code:
DEVICE  /dev/md0 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1
ARRAY /dev/md0 level=raid5 num-devices=4

DEVICE  /dev/md1 /dev/sda2 /dev/sdb2 /dev/sdc2 /dev/sdd2
ARRAY /dev/md1 level=raid5 num-devices=4

Last edited by Ciesko; 01-21-2010 at 03:10 AM. Reason: Update...
 
Old 04-15-2010, 12:53 PM   #2
pasha_suse
LQ Newbie
 
Registered: Apr 2010
Posts: 4

Rep: Reputation: 0
Hey... I am not an expert so be very cautious with what you do on a raid 5 setup as you might lose your data. To reassemble those arrays you will need a little more information for instance what your /proc/mdstat looks like (cat /proc/mdstat) then I would also run the following command:

mdadm --examine /dev/sda1 (every partition with linux raid type) see which partitions belong to which raid array, what slot they belong it etc, maybe that will give you more information on how it has to be reassembled.

Hope that helps.
 
  


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
mdadm - Recovery bibble_235 Linux - Hardware 3 01-06-2010 03:04 PM
mdadm: no such device: md0 -- RAID doesn't work after system recovery jlinkels Linux - Server 1 11-30-2009 08:14 PM
Dell/Intel ICH7 soft-RAID and mdadm raid-level mistake PhilipTheMouse Linux - General 0 03-14-2009 05:59 PM
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 05:47 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