[kwlug-disc] MDADM and RAID

Rashkae rashkae at tigershaunt.com
Tue Mar 2 10:23:59 EST 2010


Chris Irwin wrote:
> Is anybody running RAID5 with mdadm and getting extremely horrible write
> performance? I understand there is an overhead, but I'm looking at 18
> hours to copy ~500GB thus far. Did I leave out some --actually-usable
> option somewhere?
> 
> The long story: I'm changing my RAID configuration on my (at home)
> server. Yes, I have a backup.
> 
> I was originally running Raid10 -- the internal mdadm version, not
> manually stacking arrays. My issues revolved around not knowing which
> disks were configured how. I know that in theory I could lose two (very
> specific) disks, but I couldn't tell you which two. I don't know if it
> was a mirrored stripe or a striped mirror. I didn't like not knowing how
> the data was sitting on disk. Getting only 50% of my storage capacity
> wasn't the best either, but I'm willing to sacrifice for not having to
> reach for my (offsite) backups.
> 
> Basically my options as I see them are:
> - two plain raid1 arrays. This would give me simplicity, but still only
> 50% capacity.
> - one raid5 array. This gives me 75% storage (1.5TB! WOO), keeps
> simplicity in my disk layout (only one pv) and gives me something to
> brag about at meetings ("ppft! I run raid5 at home!").
> 
> I migrated all my logical volumes to an esata disk. It took about two
> hours if I recall. I then stopped the array, and created a new one with
> the following command:
> 	mdadm --create --verbose /dev/md1 \
> 	--level=5 --raid-devices=4 --spare-devices=0 \
> 	/dev/sda2 /dev/sdb2 /dev/sdc2 /dev/sdd2
> 
> No problems, created and added my pv, and started migrating volumes
> back. I'm now at about 18 hours, and I'm still only 92% complete. I
> ensured that the device was finished syncing itself before I started
> doing anything with it.
> 
> So what gives? Does mdadm just suck with raid5? Did I do it wrong? Are
> there any reasonably cheap raid cards that are worthwhile that I can
> just throw at the problem?
> 

Looks right, and you should actually be getting very, very good 
performance from that setup.  Since your copied your data to Esata, I'm 
assuming these 4 devices are SATA and you aren't trying to do something 
like connect master/slave ide drives on the same raid array.  I would 
furthermore check the SMART logs of each device and make sure you don't 
have one that's failing on you.




More information about the kwlug-disc mailing list