<p>I am just wondering when k8s mounts a volume to pod, does the size of the directory to mount matters or not, when I say 'matter', I mean if it will take more time with large directory.</p>

<p>For example, if below file1 and dir1 is very large, will it take more time?</p>

<pre><code>        volumeMounts:
        - name: "config"
          mountPath: "/&lt;existing folder&gt;/&lt;file1&gt;"
          subPath: "&lt;file1&gt;"
        - name: "config"
          mountPath: "/&lt;existing folder&gt;/&lt;dir1&gt;"
          subPath: "&lt;dir1&gt;"
      restartPolicy: Always
      volumes:
        - name: "config"
          configMap:
            name: "config"
</code></pre>

donglinjy
<p>The size does not matter, the 'mount' is a bind-mount which overlays and unifies multiple filesystems to a virtual view. There is no real mount happening like with external filesystems where a metadata check or even filesystem check might be performed.</p>

<p>You can imagine the bind mount a little bit like a symlink, so it is cheap and independent of the size.</p>
