@@ -246,8 +246,8 @@ Note that timezone required for `timestamp` (offset relative to UTC, see RFC
246
246
# # Increase volume size
247
247
248
248
PostgreSQL operator supports statefulset volume resize if you're using the
249
- operator on top of AWS. For that you need to apply manifest with a new size,
250
- and the operator will find out that a volume size needs to be changed :
249
+ operator on top of AWS. For that you need to change the size field of the
250
+ volume description in the cluster manifest and apply it :
251
251
252
252
` ` `
253
253
apiVersion: "acid.zalan.do/v1"
@@ -260,16 +260,22 @@ spec:
260
260
size: 5Gi # new volume size
261
261
` ` `
262
262
263
- You can only increase a volume size in this way, if a new requested size is
264
- smaller than the previous one nothing will be done. After this update all the
265
- new pods in a statefulset will be created with a new volume size. To increase a
266
- volume size on already existing pods in a statefulset, the operator will
267
- perform the following steps :
263
+ The operator compares the new value of the size field with the previous one and
264
+ acts on differences.
268
265
269
- * modify EBS volume size
266
+ You can only enlarge the volume with the process described above, shrinking is
267
+ not supported and will emit a warning. After this update all the new volumes in
268
+ a statefulset are allocated according to the new size. To enlarge persistent
269
+ volumes attached to the running pods, the operator performs the following
270
+ actions :
270
271
271
- * resize an actuall filesystem use `resize2fs`
272
+ * call AWS API to change the volume size
272
273
273
- Note that if before a volume size was increased a statefulset was scaled down
274
- and (after the change was applied) scaled back, those pods that were down will
275
- have an old volume size, since a statefulset doesn't delete volumes.
274
+ * connect to the pod using `kubectl exec` and resize the filesystem with
275
+ ` resize2fs` .
276
+
277
+ Fist step has a limitation, AWS rate-limits this operation to no more than once
278
+ every 6 hours.
279
+ Note that if the statefulset is scaled down before resizing the size changes
280
+ are only applied to the volumes attached to the running pods. The size of the
281
+ volumes that correspond to the previously running pods is not changed.
0 commit comments