EDIT: Solutions to my issue are below
I want to create a well optimized RAID6 array with mdadm with an XFS partition on a CentOS system. It'll involve ten ST3000DM001 Seagate 3TB drives and I'll be writing a few terabytes at a time, all in files of over 100 MB, over a gigabit ethernet connection. The more I read about configuring RAIDs (making things align with each other etc) the more I feel like I don't know what I'm doing.
Specifically I'd love some help with my mdadm --create and mkfs.xfs commands, and advice on if I need to change anything else in the hardware or OS.
From looking at online resources my best guess is
RAID6 Chunk size: 2MiB (this is just a guess)
XFS Block size: 4KiB (I'm assuming that's the pagesize for my system and I gather I can't go higher)
XFS agcount: 64 (this is just a guess)
sunit=4096,swidth=32768
So it looks like my commands should be:
# mdadm --create /dev/md0 --chunk=2048 --level=6 --raid-devices=10 /dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdh /dev/sdi /dev/sdj /dev/sdk
# parted /dev/md0
mklabel gpt
mkpart primary 0.00TB 27.00TB
# mkfs.xfs -L /big_raid -b size=4096 -d agcount=64,sunit=4096,swidth=32768 /dev/md0p1
But I would just love any advice. I made a RAID5 array with similar settings and it was pretty slow, writing at 20 MB/sec (which was 1/5th the speed I could get with a single drive)
EDIT:
So I found out that the Seagate ST3000DM001 may have been the worst drive I could possibly have chosen according to Backblaze so first thing: don't buy them! I've had I think 4 out of 10 fail in a year and a half
I built the RAID6 with the following changes and it worked at 5 times the speed, but I'm not sure how much each individual change made a difference
- Create aligned partitions on each drive and build the RAID from them, as mentioned by the answer below
From this page
Disable NCQ on each drive. For each drive
# echo 1 > /sys/block/sd[driveletterhere]/device/queue_depth
Set read-ahead
# blockdev --setra 65536 /dev/md[raidnumberhere]
Set stripe-cache_size for RAID
# echo 16384 > /sys/block/md[raidnumberhere]/md/stripe_cache_size
Hope that helps anyone who finds this looking for the same thing I was! For the record my CPU is AMD A4-5300 and I have 8GB of RAM and this setup barely touches either one