Skip to content

Commit 2eb63f9

Browse files
committed
[zh] sync /concepts/storage/volumes.md
1 parent ff29e08 commit 2eb63f9

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

content/zh-cn/docs/concepts/storage/volumes.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2162,15 +2162,25 @@ in `Container.volumeMounts`. Its values are:
21622162
In similar fashion, no mounts created by the container will be visible on
21632163
the host. This is the default mode.
21642164

2165-
This mode is equal to `private` mount propagation as described in the
2166-
[Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt)
2165+
This mode is equal to `rprivate` mount propagation as described in
2166+
[`mount(8)`](https://man7.org/linux/man-pages/man8/mount.8.html)
2167+
2168+
However, the CRI runtime may choose `rslave` mount propagation (i.e.,
2169+
`HostToContainer`) instead, when `rprivate` propagation is not applicable.
2170+
cri-dockerd (Docker) is known to choose `rslave` mount propagation when the
2171+
mount source contains the Docker daemon's root directory (`/var/lib/docker`).
21672172
-->
21682173

21692174
* `None` - 此卷挂载将不会感知到主机后续在此卷或其任何子目录上执行的挂载变化。
21702175
类似的,容器所创建的卷挂载在主机上是不可见的。这是默认模式。
21712176

2172-
该模式等同于 [Linux 内核文档](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt)中描述的
2173-
`private` 挂载传播选项。
2177+
该模式等同于 [`mount(8)`](https://man7.org/linux/man-pages/man8/mount.8.html)中描述的
2178+
`rprivate` 挂载传播选项。
2179+
2180+
然而,当 `rprivate` 传播选项不适用时,CRI 运行时可以转为选择 `rslave` 挂载传播选项
2181+
(即 `HostToContainer`)。当挂载源包含 Docker 守护进程的根目录(`/var/lib/docker`)时,
2182+
cri-dockerd (Docker) 已知可以选择 `rslave` 挂载传播选项。
2183+
21742184

21752185
<!--
21762186
* `HostToContainer` - This volume mount will receive all subsequent mounts
@@ -2184,7 +2194,7 @@ in `Container.volumeMounts`. Its values are:
21842194
propagation will see it.
21852195

21862196
This mode is equal to `rslave` mount propagation as described in the
2187-
[Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt)
2197+
[`mount(8)`](https://man7.org/linux/man-pages/man8/mount.8.html)
21882198
-->
21892199
* `HostToContainer` - 此卷挂载将会感知到主机后续针对此卷或其任何子目录的挂载操作。
21902200

@@ -2193,7 +2203,7 @@ in `Container.volumeMounts`. Its values are:
21932203
类似的,配置了 `Bidirectional` 挂载传播选项的 Pod 如果在同一卷上挂载了内容,挂载传播设置为
21942204
`HostToContainer` 的容器都将能看到这一变化。
21952205

2196-
该模式等同于 [Linux 内核文档](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt)中描述的
2206+
该模式等同于 [`mount(8)`](https://man7.org/linux/man-pages/man8/mount.8.html)中描述的
21972207
`rslave` 挂载传播选项。
21982208

21992209
<!--
@@ -2205,12 +2215,12 @@ in `Container.volumeMounts`. Its values are:
22052215
a Pod that needs to mount something on the host using a `hostPath` volume.
22062216

22072217
This mode is equal to `rshared` mount propagation as described in the
2208-
[Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt)
2218+
[`mount(8)`](https://man7.org/linux/man-pages/man8/mount.8.html)
22092219
-->
22102220
* `Bidirectional` - 这种卷挂载和 `HostToContainer` 挂载表现相同。
22112221
另外,容器创建的卷挂载将被传播回至主机和使用同一卷的所有 Pod 的所有容器。
22122222

2213-
该模式等同于 [Linux 内核文档](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt)中描述的
2223+
该模式等同于 [`mount(8)`](https://man7.org/linux/man-pages/man8/mount.8.html)中描述的
22142224
`rshared` 挂载传播选项。
22152225

22162226
{{< warning >}}

0 commit comments

Comments
 (0)