Skip to content

Commit dab6c01

Browse files
committed
Change and clarify wording
1 parent 4d20a38 commit dab6c01

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

docs/user.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,8 @@ Note that timezone required for `timestamp` (offset relative to UTC, see RFC
246246
## Increase volume size
247247

248248
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:
251251

252252
```
253253
apiVersion: "acid.zalan.do/v1"
@@ -260,16 +260,22 @@ spec:
260260
size: 5Gi # new volume size
261261
```
262262

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.
268265

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:
270271

271-
* resize an actuall filesystem use `resize2fs`
272+
* call AWS API to change the volume size
272273

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

Comments
 (0)