美文网首页
k8s mount propagation简介

k8s mount propagation简介

作者: wwq2020 | 来源:发表于2023-10-08 10:08 被阅读0次

    volume的MountPropagation有如下三种

    None
    HostToContainer
    Bidirectional

    linux的mount propagation mountflags有如下四种mountflags

    MS_SHARED
    MS_PRIVATE
    MS_SLAVE
    MS_UNBINDABLE
    对应的mount命令分别为
    mount --make-shared mountpoint
    mount --make-slave mountpoint
    mount --make-private mountpoint
    mount --make-unbindable mountpoint
    如果是递归的话,则分别为
    mount --make-rshared mountpoint
    mount --make-rslave mountpoint
    mount --make-rprivate mountpoint
    mount --make-runbindable mountpoint

    简单总结

    None通过MS_PRIVATE实现
    HostToContainer通过MS_PRIVATE实现
    Bidirectional通过MS_SHARED实现

    相关文章

      网友评论

          本文标题:k8s mount propagation简介

          本文链接:https://www.haomeiwen.com/subject/ktrvbdtx.html