Cannot create raid5 with 4 disks corectly
Hi all,
on my Debian Lenny system (with latest updates), I have the following
problem:
I would like to create another RAID5 array consisting of 4 2TB disks.
When creating the array with
/sbin/mdadm --create --verbose /dev/md5 --level=5 --raid-devices=4
/dev/sdm1 /dev/sdn1 /dev/sdo1 /dev/sdp1
the array is created but with one failed disk and a spare instead of 4
working disks:
bilbo:~# mdadm --detail /dev/md5
/dev/md5:
Version : 00.90
Creation Time : Sat Dec 4 12:55:01 2010
Raid Level : raid5
Array Size : 5860540416 (5589.05 GiB 6001.19 GB)
Used Dev Size : 1953513472 (1863.02 GiB 2000.40 GB)
Raid Devices : 4
Total Devices : 4
Preferred Minor : 5
Persistence : Superblock is persistent
Update Time : Sat Dec 4 12:55:01 2010
State : clean, degraded
Active Devices : 3
Working Devices : 4
Failed Devices : 0
Spare Devices : 1
Layout : left-symmetric
Chunk Size : 64K
UUID : cd14d406:2f66f930:ac80d277:73fa76dc (local to host
bilbo.lan.buehl.net)
Events : 0.1
Number Major Minor RaidDevice State
0 8 193 0 active sync /dev/sdm1
1 8 209 1 active sync /dev/sdn1
2 8 225 2 active sync /dev/sdo1
3 0 0 3 removed
4 8 241 - spare /dev/sdp1
The funny thing is, that this is not related to one disk: If I change
the order of the devices in the mdadm command line, another device gets
marked as spare instead of /dev/sdp1. It is always the device that was
specified last in the mdadm --create command line.
dmesg shows no obvious errors and gives no hint, why one disk is not
added and is treated as spare instead:
[ 5634.208141] md: bind<sdm1>
[ 5634.216134] md: bind<sdn1>
[ 5634.224044] md: bind<sdo1>
[ 5634.231632] md: bind<sdp1>
[ 5634.273202] raid5: device sdo1 operational as raid disk 2
[ 5634.273210] raid5: device sdn1 operational as raid disk 1
[ 5634.273214] raid5: device sdm1 operational as raid disk 0
[ 5634.273470] raid5: allocated 4222kB for md5
[ 5634.273555] 2: w=1 pa=0 pr=4 m=1 a=2 r=4 op1=0 op2=0
[ 5634.273557] 1: w=2 pa=0 pr=4 m=1 a=2 r=4 op1=0 op2=0
[ 5634.273558] 0: w=3 pa=0 pr=4 m=1 a=2 r=4 op1=0 op2=0
[ 5634.273560] raid5: raid level 5 set md5 active with 3 out of 4
devices, algorithm 2
[ 5634.273562] RAID5 conf printout:
[ 5634.273563] --- rd:4 wd:3
[ 5634.273564] disk 0, o:1, dev:sdm1
[ 5634.273566] disk 1, o:1, dev:sdn1
[ 5634.273567] disk 2, o:1, dev:sdo1
[ 5634.273588] md5: detected capacity change from 0 to 6001193385984
[ 5634.275048] md5: unknown partition table
Any ideas how I can fix this?
Regards,
Reiner Buehl.
Reply to: