LinuxQuestions.org
Help answer threads with 0 replies.
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 07-31-2008, 12:50 PM   #1
shamgar03
Member
 
Registered: Jul 2004
Distribution: Gentoo, CentOS
Posts: 92

Rep: Reputation: 15
mdadm: no md superblock


So I seriously screwed up. I am reinstalling gentoo on my system and during the install I tried to create my software raid using the following:

(DONT USE THIS)
mdadm --assemble /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1

the correct syntax would have been:
mdadm --assemble /dev/md0 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1
which now tells me that one or more drives is missing its superblock

which is of course is the WRONG syntax. I then proceeded to run that same command with different drives at the front of the list, which appears to erased the superblocks on all my drives. The last time I ran examine I got the following:

/dev/sdc1:
Magic : a92b4efc
Version : 00.90.00
UUID : c362e3fb:514a460d:26f3c1cd:393ff9ac
Creation Time : Thu Oct 18 05:18:43 2007
Raid Level : raid5
Used Dev Size : 488383488 (465.76 GiB 500.10 GB)
Array Size : 1465150464 (1397.28 GiB 1500.31 GB)
Raid Devices : 4
Total Devices : 4
Preferred Minor : 0

Update Time : Thu Jul 31 15:54:06 2008
State : clean
Active Devices : 4
Working Devices : 4
Failed Devices : 0
Spare Devices : 0
Checksum : caeb45fd - correct
Events : 0.331696

Layout : left-symmetric
Chunk Size : 1024K

Number Major Minor RaidDevice State
this 2 8 33 2 active sync /dev/sdc1

0 0 8 1 0 active sync
1 1 8 49 1 active sync
2 2 8 33 2 active sync /dev/sdc1
3 3 8 17 3 active sync

Of course now running mdadm -E /dev/sdc1 returns
mdadm: No md superblock detected on /dev/sdc1.
Same for all the others. Is there a way to recreate the superblocks with this information?

I know there are other postings similiar to this, but considering this is loads of my data I would sort of like assurance that I won't screw things up (more).
 
Old 07-31-2008, 01:00 PM   #2
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Arch/Slackware/Knoppix
Posts: 1,799
Blog Entries: 14

Rep: Reputation: 280Reputation: 280Reputation: 280
Erggh - I did that once, but only to one of my drives fortunately, allowing me to rebuild.
 
Old 07-31-2008, 02:02 PM   #3
shamgar03
Member
 
Registered: Jul 2004
Distribution: Gentoo, CentOS
Posts: 92

Original Poster
Rep: Reputation: 15
So I found this: http://kev.coolcavemen.com/2007/03/h...d-superblocks/

but when I when I run:
mdadm --create /dev/md0 --chunk=1024 --verbose --level=5 --raid-devices=4 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1

I get:

mdadm: layout defaults to left-symmetric
mdadm: /dev/sda1 is too small: 0K
mdadm: /dev/sdb1 is too small: 0K
mdadm: /dev/sdc1 is too small: 0K
mdadm: /dev/sdd1 is too small: 0K
mdadm: create aborted

Any idea on that?
 
Old 07-31-2008, 02:40 PM   #4
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Arch/Slackware/Knoppix
Posts: 1,799
Blog Entries: 14

Rep: Reputation: 280Reputation: 280Reputation: 280
Unfortunately, the only solution I know of is to rebuild the whole shooting match from backup.
 
Old 07-31-2008, 04:48 PM   #5
shamgar03
Member
 
Registered: Jul 2004
Distribution: Gentoo, CentOS
Posts: 92

Original Poster
Rep: Reputation: 15
Hmm, I think the file descriptors are just messed up. For instance any attempts to access the sda1/b1/c1/d1 device files results in unable to read. Obviously I wouldn't actually want to fdisk /dev/sda1 but it should open the tool at least when I try to. Instead I get:

livecd gentoo # fdisk /dev/sda1

Unable to read /dev/sda1

We'll see what happens when I reboot (after I finish the gentoo install).
 
Old 07-31-2008, 09:29 PM   #6
shamgar03
Member
 
Registered: Jul 2004
Distribution: Gentoo, CentOS
Posts: 92

Original Poster
Rep: Reputation: 15
oops

So turns out I didn't erase the superblocks, I just destroyed the device files in /dev. If I had erased the superblock then the create method above would have fixed it, instead a reboot did the trick.
 
Old 08-01-2008, 12:20 PM   #7
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Arch/Slackware/Knoppix
Posts: 1,799
Blog Entries: 14

Rep: Reputation: 280Reputation: 280Reputation: 280
That's good to know; I'll try to remember that next time I forget the /dev/md0...
 
  


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
mdadm says "mdadm: /dev/md1 not identified in config file" when booting FC7 raffeD Linux - Server 1 08-11-2008 11:47 AM
mdadm : mount = specify filesystem or bad superblock error ron7000 Linux - Software 3 05-14-2008 02:48 PM
Changing superblock for MDADM raid0 harddrives? TefoZi Linux - Newbie 1 04-07-2008 09:22 PM
mdadm reports no superblock trying to rebuild failed RAID 5 hotcut23 Linux - Hardware 0 08-18-2007 01:39 AM
mdadm: cannot examine md device because there is superblock hamish Linux - Software 6 08-29-2006 12:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:20 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration