You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LVM-LocalPV supports only `ReadWriteOnce` access mode i.e volume can be mounted as read-write by a single node.
77
+
LVM-LocalPV supports only `ReadWriteOnce` access mode i.e volume can be mounted as read-write by a single node. AccessMode is a required field, if the field is unspecified then it will lead to a creation error.
19
78
```yaml
20
79
kind: PersistentVolumeClaim
21
80
apiVersion: v1
@@ -32,7 +91,7 @@ spec:
32
91
33
92
### StorageClassName
34
93
35
-
LVM CSI-Driver supports dynamic provision of volume for the PVCs refered to lvm storageclass.
94
+
LVM CSI-Driver supports dynamic provision of volume for the PVCs referred to lvm storageclass. StorageClassName is a required field, if field is unspecified then it will lead to a provision errors.
36
95
37
96
```yaml
38
97
kind: PersistentVolumeClaim
@@ -50,7 +109,7 @@ spec:
50
109
51
110
### Capacity Resource
52
111
53
-
Admin/User can specify the desired capacity for lvm volume. Once the CSI-Driver gets request it will check whether available space in underlying volume group. If it has enough space a success respone will be returned to caller else error will be reported.
112
+
Admin/User can specify the desired capacity for lvm volume. CSI-Driver will provision a volume if the underlying volume grouphas requested capacity available else provisioning volume will be errored. StorageClassName is a required field, if field is unspecified then it will lead to a provision errors.
54
113
55
114
```yaml
56
115
kind: PersistentVolumeClaim
@@ -66,11 +125,12 @@ spec:
66
125
storage: 4Gi ## Specify required storage for an application
67
126
```
68
127
69
-
### VolumeMode
128
+
### VolumeMode (Optional)
70
129
71
130
LVM-LocalPV supports two kind of volume modes(Defaults to Filesystem):
72
131
- Block (Block mode can be used in a case where application itself maintains filesystem)
73
132
- Filesystem (Application which requires filesystem as a prerequisite)
133
+
Note: By default K8s will take volume mode as **Filesystem**.
74
134
75
135
```yaml
76
136
kind: PersistentVolumeClaim
@@ -88,9 +148,9 @@ spec:
88
148
```
89
149
90
150
91
-
### Selectors
151
+
### Selectors (Optional)
92
152
93
-
Users can bind any of retained lvm volumes to new PersistentVolumeClaim object via selector field.
153
+
Users can bind any of retained lvm volumes to new PersistentVolumeClaim object via selector field. If selector and [volumeName](#volumename-optional) fields are unspecified then LVM CSI driver will provision new volume.
94
154
Follow below steps to specify selector on PersistentVolumeClaim:
95
155
96
156
- List the persistentvolumes(PVs) which has status Released.
@@ -126,7 +186,7 @@ spec:
126
186
- ReadWriteOnce
127
187
resources:
128
188
requests:
129
-
storage: 4Gi
189
+
storage: 4Gi## Capacity should be less than or equal to available PV capacities
130
190
```
131
191
- Verify bound status of PV
132
192
```sh
@@ -135,9 +195,9 @@ NAME CAPACITY ACCESS MODES RECLAIM POL
VolumeName can be used to bind PersistentVolumeClaim(PVC) to retained PersistentVolume(PV). When VolumeName is specified K8s will ignore selector field.
200
+
VolumeName can be used to bind PersistentVolumeClaim(PVC) to retained PersistentVolume(PV). When VolumeName is specified K8s will ignore [selector field](#selectors-optional). If volumeName is unspecified then CSI driver will try to provision new volume.
141
201
Note: Before creating PVC make PersistentVolume `Available` by removing claimRef on PersistentVolume.
142
202
```yaml
143
203
kind: PersistentVolumeClaim
@@ -151,5 +211,5 @@ spec:
151
211
- ReadWriteOnce
152
212
resources:
153
213
requests:
154
-
storage: 4Gi
214
+
storage: 4Gi## Capacity should be less than or equal to available PV capacities
Users can expand the volumes when the underlying StorageClass `allowVolumeExpansion` field set to true.
135
+
Users can expand the volumes only when `allowVolumeExpansion` field is set to true in storageclass. If a field is unspecified, then volume expansion is not supported.
19
136
```yaml
20
137
apiVersion: storage.k8s.io/v1
21
138
kind: StorageClass
@@ -30,7 +147,7 @@ parameters:
30
147
31
148
### MountOptions (Optional)
32
149
33
-
Volumes that are provisioned via lvm-localpv will use the mount options specified in storageclass during volume mounting time.
150
+
Volumes that are provisioned via LVM-LocalPV will use the mount options specified in storageclass during volume mounting time inside an application. If a field is unspecified, `-o default` option will be added to mount the volume.
34
151
**Note**: Mount options are not validated. If mount options are invalid, then volume mount fails.
35
152
```yaml
36
153
apiVersion: storage.k8s.io/v1
@@ -51,7 +168,7 @@ LVM-LocalPV storageclass supports various parameters for different use cases. Fo
51
168
52
169
- #### FsType (Optional)
53
170
54
-
Admin can specify filesystem in storageclass. lvm-localpv CSI-Driver will format block device with specified filesystem and mount in application pod. If fsType is not specified defaults to "ext4" filesystem.
171
+
Admin can specify filesystem in storageclass. LVM-LocalPV CSI-Driver will format block device with specified filesystem and mount in application pod. If fsType is not specified defaults to `ext4` filesystem.
55
172
```yaml
56
173
apiVersion: storage.k8s.io/v1
57
174
kind: StorageClass
@@ -67,7 +184,7 @@ LVM-LocalPV storageclass supports various parameters for different use cases. Fo
67
184
68
185
- #### Shared (Optional)
69
186
70
-
lvm-localpv volume mount point can be shared among the multiple pods on the same node. Applications that can share the volume can set value of `shared` parameter to true.
187
+
lvm-localpv volume mount point can be shared among the multiple pods on the same node. Applications that can share the volume can set value of `shared` parameter to yes defaults to no.
71
188
```yaml
72
189
apiVersion: storage.k8s.io/v1
73
190
kind: StorageClass
@@ -116,7 +233,7 @@ LVM-LocalPV storageclass supports various parameters for different use cases. Fo
116
233
117
234
- #### thinProvision (Optional)
118
235
119
-
For creating thin-provisioned volume, use thinProvision parameter in storage class. It's allowed values are: "yes"and "no". If we don't use this parameter by default it's value will be "no" and it will work as thick provisioned volumes.
236
+
For creating thin-provisioned volume, use thinProvision parameter in storage class. It's allowed values are: "yes"and "no". If we don't set thinProvision parameter by default it's value will be `no` and it will work as thick provisioned volumes.
120
237
121
238
```yaml
122
239
apiVersion: storage.k8s.io/v1
@@ -158,6 +275,24 @@ parameters:
158
275
volumeBindingMode: WaitForFirstConsumer ## It can also replaced by Immediate volume binding mode depends on use case.
159
276
```
160
277
278
+
### Reclaim Policy (Optional)
279
+
280
+
lvm-localpv supports both types of reclaim policy that are `Delete` & `Retain`. If not specified defaults to `Delete`.
281
+
- Delete: Indicates that backend volume resources(PV, LVMVolume) will be delete as soon as after deleting PVC.
282
+
- Retain: Indicates backend volume resources can be recalimed by PVCs or retained the cluster.
283
+
```yaml
284
+
apiVersion: storage.k8s.io/v1
285
+
kind: StorageClass
286
+
metadata:
287
+
name: openebs-lvm
288
+
provisioner: local.csi.openebs.io
289
+
parameters:
290
+
storage: "lvm"
291
+
vgpattern: "lvmvg.*"
292
+
reclaimPolicy: Delete ## Reclaim policy can be specified here. It also accepts Retain
293
+
```
294
+
295
+
161
296
### StorageClass With Custom Node Labels
162
297
163
298
There can be a use case where we have certain kinds of Volume Groups present on certain nodes only, and we want a particular type of application to use that VG. We can create a storage class with `allowedTopologies` and mention all the nodes there where that vg is present:
0 commit comments