Problems creating RAID 5 using mdadm



Hello,

I've been messing around with problem for over a week now and did not find any solution, so this is why I hope to find help in this way...

I have a fresh debian sarge installation (kernel 2.6.8-2-386) on a RAID 1 array (this array was created during the installation process using the debian setup routine).
The RAID1 array /dev/md0 consists of 2 different hard disks and works fine.

Now I have 4 separate hard disks (400 GB each) and I want to to use them in a RAID 5 array.
So I did create a blank "Linux raid autodetect" partition on each of the 4 hard disks using fdisk, this is what "fdisk -l" gives me:
__________________________
fdisk -l /dev/sda

Disk /dev/sda: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 48641 390708801 fd Linux raid autodetect
__________________________
(same for /dev/sdb, /dev/sdc and /dev/sdd)

Then I did:
mdadm --create --force /dev/md1 --level=raid5 --chunk=64 -- parity=left-symmetric --raid-devices=4 /dev/sda1 /dev/sdb1 /dev/sdc1 / dev/sdd1

After the sync had finished, I wrote the new mdadm config file:
mdadm --detail --scan > /etc/mdadm/mdadm.conf
I added a DEVICE line, becaus I read this would help the arrays to be recognized. This is how the mdadm.conf looks like:
__________________________
DEVICE /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/hda1 /dev/hdb1
ARRAY /dev/md1 level=raid5 num-devices=4 UUID=a2e5426c:b2830333:accac389:9393124d
devices=/dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=b5e33bba: 3509dbed:aed82fc4:46628aec
devices=/dev/hda1,/dev/hdb1
__________________________

Then I created the file system:
mkfs.ext3 -b 4096 -R stride=16 /dev/md1

I edited the /etc/fstab, it looks like this:
__________________________
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/md0 / ext3 defaults,errors=remount-ro 0 1
/dev/md1 /pacs ext3 defaults 0 2
/dev/hda3 /tmp ext3 defaults 0 2
/dev/hdb3 /tmp2 ext3 defaults 0 2
/dev/hda2 none swap sw 0 0
/dev/hdb2 none swap sw 0 0
/dev/hdc /media/cdrom0 iso9660 ro,user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
__________________________
(the /pacs mount point exists)

When rebooting, the fsck fails, giving me the following warning:
__________________________
fsck.ext3: Invalid argument while trying to open /dev/md1
/dev/md1:
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>
__________________________

I continue the boot process, then the /proc/mdstat looks like this:
__________________________
Personalities : [raid1]
md0 : active raid1 hda1[0] hdb1[1]
39061952 blocks [2/2] [UU]

unused devices: <none>
__________________________

Then I do "mdadm -A -s", it gives:
mdadm: /dev/md1 has been started with 4 drives.

and the /proc/mdstat:
__________________________
Personalities : [raid1] [raid5]
md1 : active raid5 sda1[0] sdd1[3] sdc1[2] sdb1[1]
1172126208 blocks level 5, 64k chunk, algorithm 2 [4/4] [UUUU]

md0 : active raid1 hda1[0] hdb1[1]
39061952 blocks [2/2] [UU]

unused devices: <none>
__________________________

This is what I get with "mdadm --examine /dev/sda1":
__________________________
/dev/sda1:
Magic : a92b4efc
Version : 00.90.00
UUID : a2e5426c:b2830333:accac389:9393124d
Creation Time : Tue May 9 09:33:20 2006
Raid Level : raid5
Raid Devices : 4
Total Devices : 4
Preferred Minor : 1

Update Time : Tue May 9 18:52:03 2006
State : clean
Active Devices : 4
Working Devices : 4
Failed Devices : 0
Spare Devices : 0
Checksum : defd3829 - correct
Events : 0.12

Layout : left-symmetric
Chunk Size : 64K

Number Major Minor RaidDevice State
this 0 8 1 0 active sync /dev/sda1

0 0 8 1 0 active sync /dev/sda1
1 1 8 17 1 active sync /dev/sdb1
2 2 8 33 2 active sync /dev/sdc1
3 3 8 49 3 active sync /dev/sdd1
__________________________


I can mount the array without problems, but I cannot read/write on it:
mount -t ext3 /dev/md1 /pacs

Can you please help me with that?

Thank you _very_ much in advance!

Best regards,

Stephan


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: insufficient space in super block for rotational layout
    ... Occurs typically on very high density disks. ... the file system structure cannot ... Is this really an issue with a RAID 5 storage ... It doesn't sound like a problem with the array, but the size of the array. ...
    (comp.unix.solaris)
  • Strange RAID-5 rebuild problem
    ... I created a RAID-5 with a 1.0 superblock and let the RAID resync. ... I had to reboot the computer for another update and did not think about thw rebuilding process since it should continue just fine after a restart. ... After a reboot I noticed that the RAID was in the following state. ... I stopped the array started it again, and THEN it removed the disk. ...
    (Linux-Kernel)
  • Re: Need help with corrupted RAID array
    ... How do you know it is the file system that is damaged and not the raid ... Have you run a chkdsk yet from the Recovery Console? ... One of the biggest dangers with a raid 0 array is that if something goes ...
    (microsoft.public.windowsxp.general)
  • Re: Re Help with ES v3 Raid
    ... Then try rebooting and see what happens. ... I fear your array is not being ... >I followed your advice and was able to make a file system on /dev/mdo. ... >>1) create physical partitions on sdb and sdc of type linux raid ...
    (RedHat)
  • Re: Need help with corrupted RAID array
    ... So what happens when you try to load Windows? ... I have no experience troublshooting a RAID setup, ... >> array? ... Is there any way to repair the file system? ...
    (microsoft.public.windowsxp.general)