In <1244343455.32414.1319142...@webmail.messagingengine.com>, whollyg...@letterboxes.org wrote: >Can anyone tell me why the following command >creates 2 spares instead of just one? > ># mdadm -C /dev/md0 -v -e1 -l5 -b internal \ > -n3 /dev/hde1 /dev/hdg1 /dev/hdi1 \ > -x1 /dev/hdk1 --name FileServ -a yes
It's mdadm being "smart". Evidently, something about the raid5 personality makes it faster to sync a single disk rather than to sync across the whole array.[1] So, unless given the "-f" flag, mdadm creates all RAID 5 arrays as "X-1" synced disks and one spare. Once anything is written to the array, it will start "recovery" of the spare. You can either let mdadm create it it with one more spare than you expect, or you can force the behavior with "-f". The former will be faster. IIRC, this is all documented on in the mdadm man page. It's a long read, but I'm pretty sure it is in there. -- Boyd Stephen Smith Jr. ,= ,-_-. =. b...@iguanasuicide.net ((_/)o o(\_)) ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-' http://iguanasuicide.net/ \_/ [1] I'm not sure why this is. When doing the initial RAID 5 sync you should be able to spread writes across all the disks, and sync very quickly. However, the way mdadm does it, all the writes go to a single disk and it's sustained write speed becomes a bottleneck.
signature.asc
Description: This is a digitally signed message part.