Welcome to the new Linux Foundation Forum!

9.8. Shared Volume Example - incomplete

jzimnowojzimnowo Posts: 5
edited October 8 in LFS258 Class Forum

Hi,
In the example, there are incorrect indentations.

I would also suggest to add 'command' attribute to each container, so the Pod will be in running phase after its creation. A more complete in attachment.

Regards

Comments

  • chrispokornichrispokorni Posts: 286
    edited October 8

    Hi @jzimnowo,
    Thanks for your feedback. The focus on this slide may have been on the volume and volume mounts definitions and usage.
    Also, in the attachment, the mount paths at the 2 containers do not have to match, they can be different while the containers still mount the same shared volume. The mount path is local to a container's environment, isolated from another container.

    Regards,
    -Chris

  • jzimnowojzimnowo Posts: 5

    Hi @chrispokorni,

    About shared volume mount point, thanks for pointing this out. Indeed that makes sense.

    I have further questions regarding mounting emptyDir volume:

    After I connect to a given container within a Pod and inspect mounted volumes, I see that:

    / # mount|grep busy
    /dev/sda1 on /busy type ext4 (rw,relatime,data=ordered)

    / # df -h |grep busy
    /dev/sda1 9.6G 4.9G 4.7G 51% /busy

    / # ls -l /busy/
    total 0

    Could you tell me:
    1) from where the limit of 9.6G volume space comes?
    2) why 4.9G is already used ?

    Kind regards

  • chrispokornichrispokorni Posts: 286

    Hi @jzimnowo,
    Below is a link that explains in more detail the emptyDir volume type.

    https://kubernetes.io/docs/concepts/storage/volumes/#emptydir

    Then, think about the following:
    Where is sda1 coming from? Is sda1 on the container, on the pod, on the node?
    Once you answer these questions, you should be able to answer your 1 and 2 :wink:

    Regards,
    -Chris

  • jzimnowojzimnowo Posts: 5

    Hi @chrispokorni,

    Since sda1 comes from node, within a container (that is running on that node) we see node's disk capacity and usage.
    Thanks for helping me :smile:
    Regards

Sign In or Register to comment.