I'd like to run a series of fio-based performance tests on a few drives in various RAID and non-RAID configurations. When assembling drives in RAID5, the rebuild process takes an incredibly long time (6TB HDD). Since I'm going to completely overwrite the disks as part of the performance tests (or at least all the sectors I plan on reading), is there any way I can configure mdadm to not bother rebuilding the parity and just calculate parity the next time the sector is written?
You can skip the initial sync with
mdadm --create /dev/md100 --assume-clean --level=5 --raid-devices=3 /dev/sdx1 /dev/sdy1 /dev/sdz1
Alternatively, leave a disk
missing so no sync can be performed. Doing so results in a degraded RAID, which might be a relevant use case for some tests.
mdadm --create /dev/md100 --level=5 --raid-devices=3 /dev/sdx1 missing /dev/sdz1
A completely different approach would be to perform the initial sync after all, but make the partition size so small that it finishes quickly. It should not be necessary to use a full size 6TB RAID for most tests.
Don't forget to also check the filesystem options, for example ext4 has some lazy init modes that might affect performance in a newly created filesystem. It also has options to optimize for RAID use, you can test whether those make any difference to you.