I am trying to create a script for my coworkers to use in the field that will stress the internal disks to a Linux server. I plan to put some logic in for finding the /dev/sd's available and such. But I wanted to put in a write test. I am aware that fio will blast away data existing on a /dev/ device and I don't want that. I was thinking I could instead create a file with dd and run fio against that file. Essentially it should still stress the drive and put it under load, but retain all the data.
I figure I would create a file the 90% of the size of the remaining space on the partition, so that I can hopefully cause more arm actuating while the disk is under stress.
With this plan shouldn't destroy data on the disk correct?
basic commands I plan to run:
create 10 GB file
dd if=/dev/zero of=myFileSystem.img bs=512 count=19531250
start fio
device=myFileSystem.img runtime=30 fio default.fio