LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   RAID 5 / Superblock bizzaro-ness (http://www.linuxquestions.org/questions/linux-server-73/raid-5-superblock-bizzaro-ness-603982/)

mafrica 12-02-2007 05:01 PM

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

lanart 12-03-2007 03:55 PM

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.

juu801 12-03-2007 04:10 PM

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.

mafrica 12-04-2007 04:02 AM

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?

lanart 12-05-2007 02:31 AM

fdisk -l shows that /dev/sdb was not partitioned. You should partition it like other drives. By the way fdisk shows no /dev/sda.

mafrica 12-08-2007 06:54 PM

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!


All times are GMT -5. The time now is 01:22 AM.