[zh] sync /concepts/storage/volumes.md
This commit is contained in:
parent
ff29e084bf
commit
2eb63f92a1
|
|
@ -2162,15 +2162,25 @@ in `Container.volumeMounts`. Its values are:
|
|||
In similar fashion, no mounts created by the container will be visible on
|
||||
the host. This is the default mode.
|
||||
|
||||
This mode is equal to `private` mount propagation as described in the
|
||||
[Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt)
|
||||
This mode is equal to `rprivate` mount propagation as described in
|
||||
[`mount(8)`](https://man7.org/linux/man-pages/man8/mount.8.html)
|
||||
|
||||
However, the CRI runtime may choose `rslave` mount propagation (i.e.,
|
||||
`HostToContainer`) instead, when `rprivate` propagation is not applicable.
|
||||
cri-dockerd (Docker) is known to choose `rslave` mount propagation when the
|
||||
mount source contains the Docker daemon's root directory (`/var/lib/docker`).
|
||||
-->
|
||||
|
||||
* `None` - 此卷挂载将不会感知到主机后续在此卷或其任何子目录上执行的挂载变化。
|
||||
类似的,容器所创建的卷挂载在主机上是不可见的。这是默认模式。
|
||||
|
||||
该模式等同于 [Linux 内核文档](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt)中描述的
|
||||
`private` 挂载传播选项。
|
||||
该模式等同于 [`mount(8)`](https://man7.org/linux/man-pages/man8/mount.8.html)中描述的
|
||||
`rprivate` 挂载传播选项。
|
||||
|
||||
然而,当 `rprivate` 传播选项不适用时,CRI 运行时可以转为选择 `rslave` 挂载传播选项
|
||||
(即 `HostToContainer`)。当挂载源包含 Docker 守护进程的根目录(`/var/lib/docker`)时,
|
||||
cri-dockerd (Docker) 已知可以选择 `rslave` 挂载传播选项。
|
||||
。
|
||||
|
||||
<!--
|
||||
* `HostToContainer` - This volume mount will receive all subsequent mounts
|
||||
|
|
@ -2184,7 +2194,7 @@ in `Container.volumeMounts`. Its values are:
|
|||
propagation will see it.
|
||||
|
||||
This mode is equal to `rslave` mount propagation as described in the
|
||||
[Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt)
|
||||
[`mount(8)`](https://man7.org/linux/man-pages/man8/mount.8.html)
|
||||
-->
|
||||
* `HostToContainer` - 此卷挂载将会感知到主机后续针对此卷或其任何子目录的挂载操作。
|
||||
|
||||
|
|
@ -2193,7 +2203,7 @@ in `Container.volumeMounts`. Its values are:
|
|||
类似的,配置了 `Bidirectional` 挂载传播选项的 Pod 如果在同一卷上挂载了内容,挂载传播设置为
|
||||
`HostToContainer` 的容器都将能看到这一变化。
|
||||
|
||||
该模式等同于 [Linux 内核文档](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt)中描述的
|
||||
该模式等同于 [`mount(8)`](https://man7.org/linux/man-pages/man8/mount.8.html)中描述的
|
||||
`rslave` 挂载传播选项。
|
||||
|
||||
<!--
|
||||
|
|
@ -2205,12 +2215,12 @@ in `Container.volumeMounts`. Its values are:
|
|||
a Pod that needs to mount something on the host using a `hostPath` volume.
|
||||
|
||||
This mode is equal to `rshared` mount propagation as described in the
|
||||
[Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt)
|
||||
[`mount(8)`](https://man7.org/linux/man-pages/man8/mount.8.html)
|
||||
-->
|
||||
* `Bidirectional` - 这种卷挂载和 `HostToContainer` 挂载表现相同。
|
||||
另外,容器创建的卷挂载将被传播回至主机和使用同一卷的所有 Pod 的所有容器。
|
||||
|
||||
该模式等同于 [Linux 内核文档](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt)中描述的
|
||||
该模式等同于 [`mount(8)`](https://man7.org/linux/man-pages/man8/mount.8.html)中描述的
|
||||
`rshared` 挂载传播选项。
|
||||
|
||||
{{< warning >}}
|
||||
|
|
|
|||
Loading…
Reference in New Issue