I want to benchmark my SSD using Fio (Flexible I/O) I/O benchmarking tool inside Docker containers.
I am running my Docker containers like
docker run -it -v /dev/nvme0n1:/mount saurabhd04/docker_fio
where I am mounting my SSD as a Docker volume.
But, whenever I run fio inside Docker container, I get following error:
fio: blocksize too large for data set
.
Am I missing anything? Any help regarding this would be of great help!
Mapping directories and files does not mean "mounting" them.
You need to follow 2 steps:
Share the /dev/nvme0n1
to the container
docker run --cap-add SYS_ADMIN --device /dev/nvme0n1 -it saurabhd04/docker_fio
With the container running mount the nvme0n1
:
docker exec <container-id> mount /dev/nvme0n1 /mnt