Skip to content

Commit 47f7260

Browse files
committed
[zh] sync persistent-volumes.md
1 parent fbf9b4f commit 47f7260

File tree

1 file changed

+46
-30
lines changed

1 file changed

+46
-30
lines changed

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

Lines changed: 46 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,13 @@ weight: 20
2727

2828
<!--
2929
This document describes _persistent volumes_ in Kubernetes. Familiarity with
30-
[volumes](/docs/concepts/storage/volumes/) is suggested.
30+
[volumes](/docs/concepts/storage/volumes/), [StorageClasses](/docs/concepts/storage/storage-classes/)
31+
and [VolumeAttributesClasses](/docs/concepts/storage/volume-attributes-classes/) is suggested.
3132
-->
32-
本文描述 Kubernetes 中的**持久卷(Persistent Volume)**
33-
建议先熟悉[卷(Volume)](/zh-cn/docs/concepts/storage/volumes/)的概念。
33+
本文描述 Kubernetes 中的**持久卷(Persistent Volumes)**
34+
建议先熟悉[卷(volume)](/zh-ch/docs/concepts/storage/volumes/)
35+
[存储类(StorageClass)](/zh-cn/docs/concepts/storage/storage-classes/)
36+
[卷属性类(VolumeAttributesClass)](/zh-cn/docs/concepts/storage/volume-attributes-classes/)
3437

3538
<!-- body -->
3639

@@ -63,14 +66,14 @@ A _PersistentVolume_ (PV) is a piece of storage in the cluster that has been pro
6366
A _PersistentVolumeClaim_ (PVC) is a request for storage by a user. It is similar
6467
to a Pod. Pods consume node resources and PVCs consume PV resources. Pods can
6568
request specific levels of resources (CPU and Memory). Claims can request specific
66-
size and access modes (e.g., they can be mounted ReadWriteOnce, ReadOnlyMany or
67-
ReadWriteMany, see [AccessModes](#access-modes)).
69+
size and access modes (e.g., they can be mounted ReadWriteOnce, ReadOnlyMany,
70+
ReadWriteMany, or ReadWriteOncePod, see [AccessModes](#access-modes)).
6871
-->
6972
**持久卷申领(PersistentVolumeClaim,PVC)** 表达的是用户对存储的请求。概念上与 Pod 类似。
7073
Pod 会耗用节点资源,而 PVC 申领会耗用 PV 资源。Pod 可以请求特定数量的资源(CPU
71-
和内存)同样 PVC 申领也可以请求特定的大小和访问模式
72-
(例如,可以要求 PV 卷能够以 ReadWriteOnce、ReadOnlyMany 或 ReadWriteMany
73-
模式之一来挂载,参见[访问模式](#access-modes))。
74+
和内存)同样 PVC 申领也可以请求特定的大小和访问模式
75+
(例如,可以挂载为 ReadWriteOnce、ReadOnlyMany、ReadWriteManyReadWriteOncePod,
76+
请参阅[访问模式](#access-modes))。
7477

7578
<!--
7679
While PersistentVolumeClaims allow a user to consume abstract storage resources,
@@ -982,19 +985,16 @@ mounting of NFS filesystems.
982985
### Capacity
983986

984987
Generally, a PV will have a specific storage capacity. This is set using the PV's
985-
`capacity` attribute. Read the glossary term
986-
[Quantity](/docs/reference/glossary/?all=true#term-quantity) to understand the units
987-
expected by `capacity`.
988+
`capacity` attribute which is a {{< glossary_tooltip term_id="quantity" >}} value.
988989

989990
Currently, storage size is the only resource that can be set or requested.
990991
Future attributes may include IOPS, throughput, etc.
991992
-->
992993
### 容量 {#capacity}
993994

994995
一般而言,每个 PV 卷都有确定的存储容量。
995-
容量属性是使用 PV 对象的 `capacity` 属性来设置的。
996-
参考词汇表中的[量纲(Quantity)](/zh-cn/docs/reference/glossary/?all=true#term-quantity)
997-
词条,了解 `capacity` 字段可以接受的单位。
996+
这是通过 PV 的 `capacity` 属性设置的,
997+
该属性是一个{{< glossary_tooltip text="量纲(Quantity)" term_id="quantity" >}}。
998998

999999
目前,存储大小是可以设置和请求的唯一资源。
10001000
未来可能会包含 IOPS、吞吐量等属性。
@@ -1062,7 +1062,8 @@ The access modes are:
10621062

10631063
`ReadWriteOnce`
10641064
: the volume can be mounted as read-write by a single node. ReadWriteOnce access
1065-
mode still can allow multiple pods to access the volume when the pods are running on the same node.
1065+
mode still can allow multiple pods to access the volume when the pods are
1066+
running on the same node. For single pod access, please see ReadWriteOncePod.
10661067

10671068
`ReadOnlyMany`
10681069
: the volume can be mounted as read-only by many nodes.
@@ -1071,21 +1072,17 @@ The access modes are:
10711072
: the volume can be mounted as read-write by many nodes.
10721073

10731074
`ReadWriteOncePod`
1074-
: {{< feature-state for_k8s_version="v1.27" state="beta" >}}
1075+
: {{< feature-state for_k8s_version="v1.29" state="stable" >}}
10751076
the volume can be mounted as read-write by a single Pod. Use ReadWriteOncePod
10761077
access mode if you want to ensure that only one pod across whole cluster can
1077-
read that PVC or write to it. This is only supported for CSI volumes and
1078-
Kubernetes version 1.22+.
1079-
1080-
The blog article
1081-
[Introducing Single Pod Access Mode for PersistentVolumes](/blog/2021/09/13/read-write-once-pod-access-mode-alpha/)
1082-
covers this in more detail.
1078+
read that PVC or write to it.
10831079
-->
10841080
访问模式有:
10851081

10861082
`ReadWriteOnce`
10871083
: 卷可以被一个节点以读写方式挂载。
1088-
ReadWriteOnce 访问模式也允许运行在同一节点上的多个 Pod 访问卷。
1084+
ReadWriteOnce 访问模式仍然可以在同一节点上运行的多个 Pod 访问该卷。
1085+
对于单个 Pod 的访问,请参考 ReadWriteOncePod 访问模式。
10891086

10901087
`ReadOnlyMany`
10911088
: 卷可以被多个节点以只读方式挂载。
@@ -1094,13 +1091,32 @@ covers this in more detail.
10941091
: 卷可以被多个节点以读写方式挂载。
10951092

10961093
`ReadWriteOncePod`
1097-
: {{< feature-state for_k8s_version="v1.27" state="beta" >}}
1094+
: {{< feature-state for_k8s_version="v1.29" state="stable" >}}
10981095
卷可以被单个 Pod 以读写方式挂载。
10991096
如果你想确保整个集群中只有一个 Pod 可以读取或写入该 PVC,
1100-
请使用 ReadWriteOncePod 访问模式。这只支持 CSI 卷以及需要 Kubernetes 1.22 以上版本。
1097+
请使用 ReadWriteOncePod 访问模式。
1098+
1099+
{{< note >}}
1100+
<!--
1101+
The `ReadWriteOncePod` access mode is only supported for
1102+
{{< glossary_tooltip text="CSI" term_id="csi" >}} volumes and Kubernetes version
1103+
1.22+. To use this feature you will need to update the following
1104+
[CSI sidecars](https://kubernetes-csi.github.io/docs/sidecar-containers.html)
1105+
to these versions or greater:
11011106

1102-
这篇博客文章 [Introducing Single Pod Access Mode for PersistentVolumes](/blog/2021/09/13/read-write-once-pod-access-mode-alpha/)
1103-
描述了更详细的内容。
1107+
* [csi-provisioner:v3.0.0+](https://github.com/kubernetes-csi/external-provisioner/releases/tag/v3.0.0)
1108+
* [csi-attacher:v3.3.0+](https://github.com/kubernetes-csi/external-attacher/releases/tag/v3.3.0)
1109+
* [csi-resizer:v1.3.0+](https://github.com/kubernetes-csi/external-resizer/releases/tag/v1.3.0)
1110+
-->
1111+
1112+
`ReadWriteOncePod` 访问模式仅适用于 {{< glossary_tooltip text="CSI" term_id="csi" >}} 卷和 Kubernetes v1.22+。
1113+
要使用此特性,你需要将以下
1114+
[CSI 边车](https://kubernetes-csi.github.io/docs/sidecar-containers.html)更新为下列或更高版本:
1115+
1116+
- [csi-provisioner:v3.0.0+](https://github.com/kubernetes-csi/external-provisioner/releases/tag/v3.0.0)
1117+
- [csi-attacher:v3.3.0+](https://github.com/kubernetes-csi/external-attacher/releases/tag/v3.3.0)
1118+
- [csi-resizer:v1.3.0+](https://github.com/kubernetes-csi/external-resizer/releases/tag/v1.3.0)
1119+
{{< /note >}}
11041120

11051121
<!--
11061122
In the CLI, the access modes are abbreviated to:
@@ -1205,7 +1221,7 @@ Current reclaim policies are:
12051221

12061222
* Retain -- manual reclamation
12071223
* Recycle -- basic scrub (`rm -rf /thevolume/*`)
1208-
* Delete -- associated storage asset
1224+
* Delete -- delete the volume
12091225

12101226
For Kubernetes {{< skew currentVersion >}}, only `nfs` and `hostPath` volume types support recycling.
12111227
-->
@@ -1215,7 +1231,7 @@ For Kubernetes {{< skew currentVersion >}}, only `nfs` and `hostPath` volume typ
12151231

12161232
* Retain -- 手动回收
12171233
* Recycle -- 简单擦除 (`rm -rf /thevolume/*`)
1218-
* Delete -- 删除关联存储资产
1234+
* Delete -- 删除存储卷
12191235

12201236
对于 Kubernetes {{< skew currentVersion >}} 来说,只有
12211237
`nfs` 和 `hostPath` 卷类型支持回收(Recycle)。
@@ -1344,7 +1360,7 @@ You can see the name of the PVC bound to the PV using `kubectl describe persiste
13441360
-->
13451361
#### 阶段转换时间戳
13461362

1347-
{{< feature-state for_k8s_version="v1.28" state="alpha" >}}
1363+
{{< feature-state for_k8s_version="v1.29" state="beta" >}}
13481364

13491365
<!--
13501366
The `.status` field for a PersistentVolume can include an alpha `lastPhaseTransitionTime` field. This field records

0 commit comments

Comments
 (0)