LinuxQuestions.org
Have you heard the LinuxQuestions.org Podcast?
Go Back   LinuxQuestions.org > Forums > Linux > Linux - General
User Name
Password
Linux - General This forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Tags used in this thread
Popular LQ Tags , ,

Reply
 
Thread Tools
Old 03-20-2009, 05:34 PM   #1
deck-
LQ Newbie
 
Registered: Mar 2009
Posts: 5
Thanked: 0
Recovering mdadm superblocks


[Log in to get rid of this advertisement]
Hello everyone

I have a raid5 mdadm array which has four drives. My new motherboard has inexplicably cleared three of the super blocks, and I am now left with only one intact superblock.

fdisk -l

Code:
Disk /dev/sda: 20.4 GB, 20490559488 bytes
255 heads, 63 sectors/track, 2491 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x03930393

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1982    15920383+  83  Linux
/dev/sda2            1983        2491     4088542+  82  Linux swap / Solaris

Disk /dev/sdb: 1000.2 GB, 1000203804160 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000


Disk /dev/sdc: 1000.2 GB, 1000203804160 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000


Disk /dev/sdd: 1000.2 GB, 1000203804160 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000


Disk /dev/sde: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000


Disk /dev/sdf: 1044 MB, 1044250624 bytes
33 heads, 32 sectors/track, 1931 cylinders
Units = cylinders of 1056 * 512 = 540672 bytes
Disk identifier: 0x9348a58e
mdadm --examine /dev/sdb

Code:
mdadm: No md superblock detected on /dev/sdb
mdadm --examine /dev/sdc

Code:
mdadm: No md superblock detected on /dev/sdc
mdadm --examine /dev/sdd

Code:
mdadm: No md superblock detected on /dev/sdd

mdadm --examine /dev/sde

Code:
/dev/sde:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : f781ba39:3975fa64:c36d41f1:ea056919
  Creation Time : Mon Jan  5 14:18:27 2009
     Raid Level : raid5
  Used Dev Size : 976762496 (931.51 GiB 1000.20 GB)
     Array Size : 2930287488 (2794.54 GiB 3000.61 GB)
   Raid Devices : 4
  Total Devices : 4
Preferred Minor : 0

    Update Time : Thu Mar 19 22:39:52 2009
          State : clean
 Active Devices : 4
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 0
       Checksum : 54f44664 - correct
         Events : 0.92

         Layout : left-symmetric
     Chunk Size : 64K

      Number   Major   Minor   RaidDevice State
this     3       8       32        3      active sync   /dev/sdc

   0     0       8       16        0      active sync   /dev/sdb
   1     1       8       64        1      active sync   /dev/sde
   2     2       8       48        2      active sync   /dev/sdd
   3     3       8       32        3      active sync   /dev/sdc


I have now moved the raid array back to the original file server, but the superblocks are still missing. I am able to assemble the array with only the one drive, but obviously the array cannot be started. I am also unsure about the order of the drives connected to the old server and I am worried that the drives are no longer connected in the same physical order that they originally were.

I am hoping someone with more knowledge than myself can answer a few question:

1. Can this raid array be restored? I am confident that none of the actual data has been impacted, I have only lost my superblocks...


2. If I try to recreate the raid array using mdadm --create --assume-clean and the order of the devices is not the same as the original configuration, will mdadm erase the data on the drives?


3. If I were to buy four more identical drives to the ones that comprise the raid array, dd everything to the new drives, would I be able to test recreating the array on the new drives?


4. Is there anyway to recover data from a mdadm raid array without successfully recreating the array? I am sure the data is still there, I just can't construct the array.


thanks in advance for any advice on how to proceed with this problem.
deck- is offline  
Tag This Post , ,
Reply With Quote
Old 03-30-2009, 05:08 PM   #2
mostlyharmless
Member
 
Registered: Jan 2008
Distribution: Slackware 12.1
Posts: 817
Thanked: 44
(1) Looks like this fellow succeeded in fixing this with the -create option, so it's possible
http://episteme.arstechnica.com/eve/...m/697004072931
(2) I think so.
(3) I think so, but what a pain! It'd be easier to rebuild the array and restore the data from backup. You do have a backup?
(4) Probably not, if I were a forensics guy I'd probably do (3) and alternate the order of drives per (2) until success in (1)
mostlyharmless is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
MDADM screws up the LVM partitions? Can't mount the LVMs after mdadm stopped alirezan1 Linux - Newbie 3 11-18-2008 05:42 PM
unable to load MDADM module BUT mdadm works?!?!?! alirezan1 Linux - Software 2 09-08-2008 08:58 PM
mdadm says "mdadm: /dev/md1 not identified in config file" when booting FC7 raffeD Linux - Server 1 08-11-2008 12:47 PM
Recovering a Raid 5 array, mdadm mess-up somebox Linux - Server 4 10-17-2007 07:57 PM
Recovering data from an ext3 fs with no superblocks UncleTaz Linux - General 2 03-07-2004 02:22 PM


All times are GMT -5. The time now is 11:18 AM.

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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration