Increasing volume size for pgo-database

145 views
Skip to first unread message

Abbas Gori

unread,
Aug 31, 2021, 7:15:50 AM8/31/21
to Postgres Operator
Hi,

I have a postgres cluster running with the volume size of 2GB. I want to increase its size, so I used kubernetes to resize the PVC to 5GB, even it shows that it has increased the size if I get the PVC details.

The issue is when I check the storage from inside the pod by running df -h the size of /pgdata is still 2.0G, I tried scaling 0 and 1 on pgo pods in order to restart but its still the same.

How can I resize the existing postgres cluster's volume?
FYI 
  • pgo-version: centos8-12.6-4.6.1
  • environments: GKE

Jonathan S. Katz

unread,
Aug 31, 2021, 10:41:05 AM8/31/21
to Abbas Gori, Postgres Operator
Hi,

PVC resizing is supported natively in PGO since v4.7.0 (https://access.crunchydata.com/documentation/postgres-operator/latest/releases/4.7.0/#resize-persistent-volume-claims-resize-pvcs) and is supported in v5 as well. If you need this functionality, I suggest upgrading.

Otherwise, you will need to troubleshoot your issue at the Kubernetes level. I would recommend reviewing the steps on PVC resizing from the Kubernetes documentation: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#expanding-persistent-volumes-claims -- note that the PVC resize request can appear to be ready, but you will need to ensure that the resize is complete in the status. You should also check if your storage provider is thinly provisioned, i.e. it will finish the disk expansion once you are close or at the requested size.

Thanks,

Jonathan

Jonathan S. Katz
VP Platform Engineering

Crunchy Data
Enterprise PostgreSQL 


Reply all
Reply to author
Forward
0 new messages