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
 
LinkBack Search this Thread
Old 12-02-2007, 04:01 PM   #1
mafrica
LQ Newbie
 
Registered: May 2007
Posts: 8

Rep: Reputation: 0
Red face RAID 5 / Superblock bizzaro-ness


Hi,

I'm getting superblock errors on one of the drives in my RAID 5 array.
There are 4 drives in the SATA array
/dev/sda
/dev/sdb
/dev/sdc
/dev/sdd


So I tried to "heal" sdb (the affected drive) with e2fsck -b 8193 /dev/sdb and I even tried the other locations . After I did this it still gave me superblock errors after I tried to reassemble the arrary.

I have checked sdb for bad blocks with mkfs -c, no bad blocks (drives are under 6 months old.


the result of the mdadm assemble is :
ubuntu@ubuntu:~$ sudo mdadm --assemble /dev/sda /dev/sdb /dev/sdc /dev/sdd
mdadm: no recogniseable superblock on /dev/sdb
mdadm: /dev/sdb has no superblock - assembly aborted


I have formatted (fdisk) /dev/sdb hoping to create a superblock of some sort so that I can re-assemble the array but I still get "no superblock" error? Why is this if I create a filesystem on the drive? (I've done mkfs.ext3 /dev/sdb several times and I see the progress etc)


----------------------------
ubuntu@ubuntu:~$ sudo fdisk -l

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

Disk /dev/sdb doesn't contain a valid partition table

Disk /dev/sdc: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00009410

Device Boot Start End Blocks Id System
/dev/sdc1 1 30401 244196001 fd Linux raid autodetect

Disk /dev/sdd: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0001b6d2

Device Boot Start End Blocks Id System
/dev/sdd1 * 1 30401 244196001 fd Linux raid autodetect

----
And for some reason gparted is now showing sda as unallocated 512B ??
even though I haven't touched it *at all*.

So that's bizarre, I'm using the 7.10 live CD. There's also a new device called md127 in gparted with 0 size.

Any thoughts on how to reassemble my array?

much appreciated,

MLM
 
Old 12-03-2007, 02:55 PM   #2
lanart
LQ Newbie
 
Registered: Dec 2007
Distribution: Slackware
Posts: 13

Rep: Reputation: 0
There is something wrong with your setup. It's strange that you're creating array with whole drives and not partitions.
I am using RAID 1 and never used RAID 5, but things should be quite similar. You should first start your array with survived disks and then try to add a new drive (/dev/sdb). But where is your sda drive? RAID 5 can't work if you lost 2 drives...
Superblock is created at the moment of RAID creation. It will be recreated when you add drive to array which is up and running.
 
Old 12-03-2007, 03:10 PM   #3
juu801
LQ Newbie
 
Registered: Jul 2005
Posts: 23

Rep: Reputation: 15
If you've formatted sdb several times using the whole disk than you should have /dev/sdb1 as the only primary partition on the drive.

If the other three drives are fine then
Code:
sudo mdadm --assemble /dev/md0 /dev/sda /dev/sdc /dev/sdd
should activate degraded. Then re-add sdb1 to the array and it should rebuild it.
Code:
sudo mdadm --re-add /dev/md0 /dev/sdb1
Or, I recently had problems with my raid 5 and
Code:
sudo mdadm --assemble -f /dev/md0 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1
worked for me.
 
Old 12-04-2007, 03:02 AM   #4
mafrica
LQ Newbie
 
Registered: May 2007
Posts: 8

Original Poster
Rep: Reputation: 0
lanart: I think you're right IIRC, you can't make array's out of physical
drives. I wonder if I'm not formatting with fdisk correctly , setting up the RAID flags on sdb? (sda seems fine btw, gparted seems to act bizzare on the 7.10 live disk I'm using to rescue the system).


juu801: I tried sudo mdadm --assemble /dev/md0 /dev/sda /dev/sdc /dev/sdd
and got:

no recogniseable superblock on /dev/sda
mdadm: /dev/sda has no superblock - assembly aborted


sudo mdadm --assemble -f /dev/md0 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1
yeilds:

mdadm: no RAID superblock on /dev/sdb1
mdadm: /dev/sdb1 has no superblock - assembly aborted


it's odd that when I use sda I get a superblock error and then
when I use sdb1 I get a persistant suerpblock error!

To backtrack one day the array just came crashing down.
Could two of the drives have been affected?
 
Old 12-05-2007, 01:31 AM   #5
lanart
LQ Newbie
 
Registered: Dec 2007
Distribution: Slackware
Posts: 13

Rep: Reputation: 0
fdisk -l shows that /dev/sdb was not partitioned. You should partition it like other drives. By the way fdisk shows no /dev/sda.
 
Old 12-08-2007, 05:54 PM   #6
mafrica
LQ Newbie
 
Registered: May 2007
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks for the replies,

I was able to:
sudo mdadm --re-add /dev/md0 /dev/sdb1
mdadm: added /dev/sdb1

I *think* my error was in trying to use Gparted. It initially
had crashed several times and was giving me erroneous info.

After using fdisk several times and following the advice
of starting it degraded then re-adding the last drive
it seemed to work.

> cat proc/mdstat is so far like this
-----
cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4]
md0 : active raid5 sdb1[4] sdc1[0] sda1[3] sdd1[2]
732587712 blocks level 5, 64k chunk, algorithm 2 [4/3] [U_UU]
[>....................] recovery = 1.1% (2805248/244195904) finish=249.9min speed=16090K/sec
unused devices: <none>
---

I think I'm in the clear.


Thank you very much for your help!
 
  


Reply

Tags
e2fsck, fdisk, fsck, gparted, mdadm, mkfs, superblock


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
raid partition has no superblock Furlinastis Slackware 1 11-10-2007 10:59 PM
Repeatable RAID 0 Superblock Corruption wpeloqui Linux - Hardware 1 09-14-2007 02:32 PM
SATA RAID 0 errors on bootup -- invalid raid superblock vonst Slackware 3 07-04-2006 03:55 PM
RAID problem with Superblock EwanG Linux - Software 1 05-21-2004 03:17 PM
Raid 1 - Superblock is corrupt pyfsapple Debian 1 04-19-2004 12:01 PM


All times are GMT -5. The time now is 11:10 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
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration