2004-09-03 01:08:06

by J.A. Magallon

[permalink] [raw]
Subject: buildin a RAID5 md vith 6 drives

Hi all...

I tried to build a RAID5 array with 6 drivres, just with:


mdadm --create --verbose --run \
/dev/md0 --level=5 --chunk=256 \
--raid-devices=6 \
/dev/sda1 /dev/sdb1 /dev/sdc1 \
/dev/sdd1 /dev/sde1 /dev/sdf1

And the raid looks in an strange state:

nada:~# mdadm -D /dev/md0
/dev/md0:
Version : 00.90.01
Creation Time : Fri Sep 3 02:17:28 2004
Raid Level : raid5
Array Size : 1225557760 (1168.78 GiB 1254.97 GB)
Device Size : 245111552 (233.76 GiB 250.99 GB)
Raid Devices : 6
Total Devices : 6
Preferred Minor : 0
Persistence : Superblock is persistent

Update Time : Fri Sep 3 02:42:32 2004
State : clean, degraded, recovering
Active Devices : 5
Working Devices : 6
Failed Devices : 0
Spare Devices : 1

Layout : left-symmetric
Chunk Size : 256K

Rebuild Status : 8% complete

UUID : fd6fcad0:21da140b:072a82b1:11b3db21
Events : 0.30

Number Major Minor RaidDevice State
0 8 1 0 active sync /dev/sda1
1 8 17 1 active sync /dev/sdb1
2 8 33 2 active sync /dev/sdc1
3 8 49 3 active sync /dev/sdd1
4 8 65 4 active sync /dev/sde1
5 0 0 - removed

6 8 81 5 spare rebuilding /dev/sdf1

Why does it think a drive has been removed, and the last drive is a spare ?
Isn't raid5 symmetric over all drives ?

TIA

--
J.A. Magallon <jamagallon()able!es> \ Software is like sex:
werewolf!able!es \ It's better when it's free
Mandrakelinux release 10.1 (Beta 1) for i586
Linux 2.6.8.1-mm4 (gcc 3.4.1 (Mandrakelinux (Alpha 3.4.1-3mdk)) #8



2004-09-03 03:48:48

by NeilBrown

[permalink] [raw]
Subject: Re: buildin a RAID5 md vith 6 drives

On Friday September 3, [email protected] wrote:
> Hi all...
>
> I tried to build a RAID5 array with 6 drivres, just with:
...
> Why does it think a drive has been removed, and the last drive is a spare ?
> Isn't raid5 symmetric over all drives ?

Read
man mdadm
the section on "CREATE MODE", the last paragraph before the "General
Management options" are listed. Be sure that you have mdadm 1.4.0 or
later.

NeilBrown


[ the paragraph reads:
When creating a RAID5 array, mdadm will automatically create a degraded
array with an extra spare drive. This is because building the spare
into a degraded array is in general faster than resyncing the parity on
a non-degraded, but not clean, array. This feature can be over-ridden
with the --force option.
if you remove the "-I" that really shoudn't be there... :-(
]




>
> TIA
>
> --
> J.A. Magallon <jamagallon()able!es> \ Software is like sex:
> werewolf!able!es \ It's better when it's free
> Mandrakelinux release 10.1 (Beta 1) for i586
> Linux 2.6.8.1-mm4 (gcc 3.4.1 (Mandrakelinux (Alpha 3.4.1-3mdk)) #8
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/