LinuxQuestions.org
Review your favorite Linux distribution.
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 04-16-2012, 11:04 AM   #1
elrodri
LQ Newbie
 
Registered: Sep 2011
Posts: 5

Rep: Reputation: Disabled
Problem with disk/raid


I had a raid 1 working with two devices sdc1 and sdd1, 2TB each. I needed some space, so I decided to undo the raid. I must say I'm too new with raids, and I successfully removed sdc1 with "fail" and "remove" mdadm commands, but not with sdd1, so I left the raid working and mounted the filesystem as follows:

/dev/sdc1 -> /data
/dev/md0 -> /data2

But a few days ago this "workaround" end up with a very bad and serious message forcing the server a reboot and rescue mode working.


I successfully removed the raid and mounted /dev/sdc1 into /data, but when I try to mount sdd1 into /data2 I get:

Code:
mount: you must specify the filesystem type
So, I exec:
Code:
mount -t ext4 /dev/sdd1 /data2
And I get the same error message. I tried with ext2 and ext3, but had the same result.

I also get this on dmesg:

VFS: Can't find ext3 filesystem on dev sdd1.

When I execute "fsck /dev/sdd1" I get the following:

Code:
fsck 1.39 (29-May-2006)
e2fsck 1.39 (29-May-2006)
Couldn't find ext2 superblock, trying backup blocks...
fsck.ext3: Bad magic number in super-block while trying to open /dev/sdd1




The superblock could not be read or does not describe a correct ext2
filesystem. *If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
* * e2fsck -b 8193 <device>
"fdisk -l /dev/sdd" reveals the following:

Code:
WARNING: GPT (GUID Partition Table) detected on '/dev/sdd'! The util fdisk doesn't support GPT. Use GNU Parted.


Disco /dev/sdd: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Unidades = cilindros de 16065 * 512 = 8225280 bytes

Device                 Begin      End      Blocks  Id  System
/dev/sdd1               1      243201  1953512032   83  Linux

I successfully executed "mdadm --zero-superblock /dev/sdd1", but I got "mdadm: Unrecognised md component device - /dev/sdd1"


I tried everything my expertise could, but with no positive results.


Please, note that sdc1 and sdd1 have now different data, so I can't create a new raid 1 and put these disks into this raid.

Last edited by elrodri; 04-16-2012 at 11:27 AM.
 
Old 04-16-2012, 11:56 AM   #2
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
The only thing I could suggest would be a file system check specifying a new superblock as indicated in the error message. Try running dumpe2fs /dev/sdd | grep -i superblock and see what your results are.
 
Old 04-16-2012, 12:04 PM   #3
elrodri
LQ Newbie
 
Registered: Sep 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Kustom42 View Post
The only thing I could suggest would be a file system check specifying a new superblock as indicated in the error message. Try running dumpe2fs /dev/sdd | grep -i superblock and see what your results are.
Thank you.

This is what i get:

Code:
dumpe2fs bad magic number in super-block while trying to open /dev/sdd
Couldn’t find valid filesystem superblock.
I'm afraid the only solution is dumping /dev/sdd1 into /dev/sdc1 with 'dd', but I'll need to migrate the whole system into a new one if I don't want to loose all sdd1's data

Last edited by elrodri; 04-16-2012 at 12:09 PM. Reason:
 
Old 04-16-2012, 01:49 PM   #4
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
Do a dd to a flat file then try running a file system check, with a bad super-block a fsck should correct it but you never know with fsck.. in the Linux world fsck is closely associated with another similar four letter word that is usually spoke when having to run an fsck.
 
Old 04-17-2012, 03:58 PM   #5
kitgerrits
LQ Newbie
 
Registered: Dec 2008
Posts: 23

Rep: Reputation: 1
Are you sure that re-mounting sdc1 after removing it from the RAID array went right the first time around (no mkfs in between?)
I would guess that sdd1 does not start with a superblock, but with some devicemapper metadata.

Have you tried re-assembling the array with a single disk and mounting that?

Maybe something along the lines of:
mdadm --assemble --scan
or:
mdadm --assemble /dev/md4 /dev/sdd1
 
Old 04-17-2012, 07:19 PM   #6
rrdonovan
LQ Newbie
 
Registered: Nov 2011
Location: Ingleside, Texas
Distribution: openSUSE 12.1
Posts: 14

Rep: Reputation: Disabled
dumpe2fs bad magic number in super-bl..............

Whoa! You are out of magic dude.......! That's it man, it has hit the fan........ About the best thing to do is start over as the data is most probably corrupt. Raid under linux can be a horror story. Once up and running, don't mess with it. Do backups to an external HD. Even a shadow copy would be good. I use Raid 0. Good speed, but a heartbreak when it breaks. If you use Raid 1, then if one drive breaks, you should be able to replace it. Join it to the array, and it will rebuild. So what happened to sda and sdb?

Master Rod
 
Old 04-17-2012, 07:21 PM   #7
elrodri
LQ Newbie
 
Registered: Sep 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
Hi, guys. Thank you for your anwers. Finally I decided to run mkfs.ext3 and loose all disk data. I already tried all mdadm commands and testdisk to recover this disk, but no luck. So I formatted it and started to use it.
 
  


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
[SOLVED] Problem with LVM - 3-disk RAID 0 has an uninitialized Drive (Fedora 12) wildcard Linux - Software 3 04-24-2010 11:46 AM
[SOLVED] Software RAID (mdadm) - RAID 0 returns incorrect status for disk failure/disk removed Marjonel Montejo Linux - General 4 10-04-2009 07:15 PM
Is my problem raid or disk failure mburu Linux - Hardware 2 11-24-2008 08:36 AM
Major problem with software raid (mdadm) and disk failure norwolf Linux - Server 8 07-27-2007 07:14 AM

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

All times are GMT -5. The time now is 05:29 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