I have 4x2TB disks and I want to create a well-performing RAID5 array (server is HP N40L microserver with 8GB RAM, booting from a 64GB SSHD). The OS is Centos 6.3, x86_64.
I created the raid array with this command:
mdadm --create --verbose /dev/md0 --level=5 --raid-devices=4 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1
When I then do:
mdadm --examine /dev/sda1
...I am told my "Chunk Size" is 512K (apparently this is mdadm's new default value).
Now I want to format the array with XFS. I am told (at http://www.mythtv.org/wiki/Optimizing_Performance#Optimizing_XFS_on_RAID_Arrays) that "sunit" is equal to my Chunk size, expressed as a number of 512-byte blocks -so, in my case, 512KB = 1024 512byte blocks. Similarly, "swidth" is the number of effective disks in my array times sunit. In my case, I have 4 disks in raid 5, so 3 effective disks, and 3x1024=3072. Therefore, I formatted my new array with the command:
mkfs.xfs -b size=4096 -d sunit=1024,swidth=3072 /dev/md0
I now have two questions. The above command gave me this error:
mkfs.xfs -b size=4096 -d sunit=1024,swidth=3072 /dev/md0 log stripe unit (524288 bytes) is too large (maximum is 256KiB) log stripe unit adjusted to 32KiB [...]
...and I want to know if that means I've done something wrong or if I'll end up with a sub-optimal file system in some way, or if I can just ignore that error for some reason.
The second question is simply whether I have calculated the XFS parameters correctly or if I'm barking up completely the wrong tree (if it helps, the array will store large music and video files, for the most part). Have I understood "chunk size" and "stripe size", for example? Is the blocksize of 4096 in my mkfs command optimal? And so on.
I would appreciate any advice on this.