Mount an existing RAID5 array? (software RAID)

Okay, the situation is… I got 3 disks (sda/sdb/sdd) with a single ‘raid’ partition that were a raid array in my server.
Now I’ve hooked the disks up to my desktop and created a RAID out of them again (no formatting).

The Filesystem is ext2 and I tried adding it by adding the following line to my fstab file

/dev/md0      /home/Pascal/Shared     ext2    defaults    1 2

and then running mount -a as root, which resulted in the following error:

mount: wrong fs type, bad option, bad superblock on /dev/md0,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

So as it suggests dmesg | tail

md0: detected capacity change from 0 to 2000404086784
 md0: unknown partition table
SFW2-INext-DROP-DEFLT IN=eth0 OUT= MAC=01:00:5e:00:00:fb:00:1c:25:e3:00:af:08:00 SRC=192.168.1.100 DST=224.0.0.251 LEN=143 TOS=0x00 PREC=0x00 TTL=255 ID=0 DF PROTO=UDP SPT=5353 DPT=5353 LEN=123
SFW2-INext-DROP-DEFLT IN=eth0 OUT= MAC=01:00:5e:00:00:fb:00:1c:25:e3:00:af:08:00 SRC=192.168.1.100 DST=224.0.0.251 LEN=143 TOS=0x00 PREC=0x00 TTL=255 ID=0 DF PROTO=UDP SPT=5353 DPT=5353 LEN=123
SFW2-INext-DROP-DEFLT IN=eth0 OUT= MAC=01:00:5e:00:00:fb:00:1c:25:e3:00:af:08:00 SRC=192.168.1.100 DST=224.0.0.251 LEN=143 TOS=0x00 PREC=0x00 TTL=255 ID=0 DF PROTO=UDP SPT=5353 DPT=5353 LEN=123
SFW2-INext-DROP-DEFLT IN=eth0 OUT= MAC=01:00:5e:00:00:fb:00:1c:25:e3:00:af:08:00 SRC=192.168.1.100 DST=224.0.0.251 LEN=131 TOS=0x00 PREC=0x00 TTL=255 ID=0 DF PROTO=UDP SPT=5353 DPT=5353 LEN=111
SFW2-INext-DROP-DEFLT IN=eth0 OUT= MAC=01:00:5e:00:00:fb:00:1c:25:e3:00:af:08:00 SRC=192.168.1.100 DST=224.0.0.251 LEN=257 TOS=0x00 PREC=0x00 TTL=255 ID=0 DF PROTO=UDP SPT=5353 DPT=5353 LEN=237
SFW2-INext-DROP-DEFLT IN=eth0 OUT= MAC=01:00:5e:00:00:fb:00:1c:25:e3:00:af:08:00 SRC=192.168.1.100 DST=224.0.0.251 LEN=485 TOS=0x00 PREC=0x00 TTL=255 ID=0 DF PROTO=UDP SPT=5353 DPT=5353 LEN=465
SFW2-INext-DROP-DEFLT IN=eth0 OUT= MAC=01:00:5e:00:00:fb:00:1c:25:e3:00:af:08:00 SRC=192.168.1.100 DST=224.0.0.251 LEN=413 TOS=0x00 PREC=0x00 TTL=255 ID=0 DF PROTO=UDP SPT=5353 DPT=5353 LEN=393
EXT2-fs: md0: couldn't mount because of unsupported optional features (7d18000).

The array itself is a simple RAID5 array (default settings everything) and not bootable, simply contains data.
So how exactly do I go about mounting it?
And here’s a pretty graph from the partitioner in openSUSE 11.2
http://thumbnails19.imagebam.com/3597/28e67f35960995.gif](http://www.imagebam.com/image/28e67f35960995)

Have you already got data on it with ext2 file system?

What is the output of:

cat /proc/mdstat

Yes there’s already data on it.

# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4]
md0 : active raid5 sdd1[3] sdb1[1] sda1[0]
      1953519616 blocks super 1.0 level 5, 128k chunk, algorithm 0 [3/2] [UU_]
      ==========>..........]  recovery = 54.2% (530137472/976759808) finish=79.3min speed=93752K/sec
      bitmap: 0/466 pages [0KB], 1024KB chunk

unused devices: <none>

Looks like the disks were not in sync. That is why, it is re-building.
Can you check the disk to see if it has got errors?

e2fsck -f /dev/md0

I’m just not the command-line type, and I was able to go into YaST and open the Partitioner tool and add a RAID1 and a RAID5 array, and even an encrypted partiton. It created fstab and cryptotab entries for me. Have you thought of trying that?

Axeia adjusted his/her AFDB on Saturday 16 May 2009 19:06 to write:

>
> Okay, the situation is… I got 3 disks (sda/sdb/sdd) with a single
> ‘raid’ partition that were a raid array in my server.
> Now I’ve hooked the disks up to my desktop and created a RAID out of
> them again (no formatting).
>
> The Filesystem is ext2 and I tried adding it by adding the following
> line to my fstab file
>
> Code:
> --------------------
> /dev/md0 /home/Pascal/Shared ext2 defaults 1 2
> --------------------
>
> and then running mount -a as root, which resulted in the following
> error:
>
> Code:
> --------------------
> mount: wrong fs type, bad option, bad superblock on /dev/md0,
> missing codepage or helper program, or other error
> In some cases useful info is found in syslog - try
> dmesg | tail or so
> --------------------

I ahve seen this before when I had a raid setup, I think I just tried and
mounted it else where try putting it in :

/mnt/back-up

or somewhere like that but not in your /home folder

HTH

Mark

Nullus in verba
Nil illigitimi carborundum

First thing I attempted :wink: despise the commandline as the next time I run into this problem I wont remember the commands, remembering what you clicked in which order is way easier.

# e2fsck -f /dev/md0
e2fsck 1.41.4 (27-Jan-2009)
e2fsck: Filesystem revision too high while trying to open /dev/md0
The filesystem revision is apparently too high for this version of e2fsck.
(Or the filesystem superblock is corrupt)


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>

It’s at 97.2% of the recovery now btw.

Full 100%, however it still wont mount. (not in a directory outside the home directory either)

Did you preserve the order when you built the RAID again?
I’m asking this because if the specified order was incorrect, it would have incorrectly reconstructed - and this can corrupt the whole data.

No I did not, most likely.

Unplugged them and hooked them up to another PC so the chances of them ending up in the exact same order are lower than that of the opposite.

That’s quite a challenge on its own tbh. Guess I can kiss my data goodbye then? If it is than I’m going to reconsider doing the same thing again and might just get another disk and go for a dual raid 1.

Errr, before I format the entire thing… is there any way to retrieve the superblock number?

32 doesn’t seem to work, and newfs is not installed… can’t find it in the repository either.

I think something really went wrong somewhere. And, the disks are now rebuilt with wrong set of data already (it was re-syncing).

I haven’t used newfs before. In my knowledge, it creates a file system and that is not what you want.

Before you reformat, let us hear from others who have more expertise on this.

Site does warn about not ommitting the N parameter

Caution –

Be sure to use the newfs -N in the next step. If you omit the -N option, you will create a new, empty file system.

So it should show it just fine… but it’s not installed and YaST / webpin come up blank when searching for it… so not quite sure how I would get it installed

I too cant locate a newfs port for Linux. It is a BSD stuff and used to be in System V unices.

Yeah same, can only find BSD/Solaris posts about it.

So if I don’t find a solution in the next 2 weeks then I’ll just wipe the disks clean and find out how much my ISP considers fair under their ‘fair use policy’

OK.
By the by, what is ISP’s involvement here?

Well I’ll have to restore my files some way, and since my disks seem like a lost cause it will be over the internet… and hauling in over a terabyte is probably not something my ISP will appreciate :wink:

Hmmm… Over a TB… That is really big for the ISP :slight_smile: