<p>I want to benchmark my SSD using Fio (Flexible I/O) I/O benchmarking tool inside Docker containers. </p>

<p>I am running my Docker containers like </p>

<p><code>docker run -it -v /dev/nvme0n1:/mount saurabhd04/docker_fio</code> </p>

<p>where I am mounting my SSD as a Docker volume. </p>

<p>But, whenever I run fio inside Docker container, I get following error: </p>

<p><code>fio: blocksize too large for data set</code>.</p>

<p>Am I missing anything? Any help regarding this would be of great help!</p>

<p>Mapping directories and files does not mean "mounting" them.</p>

<p>You need to follow 2 steps:</p>

<ol>
<li><p>Share the <code>/dev/nvme0n1</code> to the container</p>

<pre><code>docker run --cap-add SYS_ADMIN --device /dev/nvme0n1 -it saurabhd04/docker_fio
</code></pre></li>
<li><p>With the container running mount the <code>nvme0n1</code>:</p>

<pre><code>docker exec &lt;container-id&gt; mount /dev/nvme0n1 /mnt
</code></pre></li>
</ol>
