-
Notifications
You must be signed in to change notification settings - Fork 36
Increase PostgreSQL Database storage
Storage:
postgresql: Bound to volume app-pv-152-1g 1 GiB
postgresql deployment configuration:
spec:
template:
spec:
volumes:
- name: postgresql-data
persistentVolumeClaim:
claimName: postgresql
containers:
volumeMounts:
- name: postgresql-data
mountPath: /var/lib/pgsql/data
step1: send out the notification to end user if necessary
step2: backup current database
Use oc command login OpehShift
Switch to project moe-gwells-
Run command 'oc get pods' to get all pods and find the active PostgreSQL pod, it should be named like postgresql-42-t01rv
Run command 'oc rsync :/var/lib/pgsql/data . This command should copy everything under /var/lib/pgsql/data to local directory
Run command 'oc rsh ' to rsh to the pod and verify if the data has been all copied to load directory, especially the hidden files.
step3. create a new storage for 5GiB
postgresql2: Bound to volume <new storage name> 5GiB
step4. update postgresql deployment configuration to mount current storage claim to postgresql-data-old and mount new storage claim to postgresql-data:
spec:
template:
spec:
volumes:
- name: postgresql-data
persistentVolumeClaim:
claimName: postgresql2
- name: postgresql-data-old
persistentVolumeClaim:
claimName: postgresql
containers:
volumeMounts:
- name: postgresql-data
mountPath: /var/lib/pgsql/data
- name: postgresql-data-old
mountPath: /var/lib/pgsql/data-old
step5: verify if a new deployment for postgresql has happened, manually trigger one if not
step6: login to pod and copy data under /var/lib/pgsql/data-old to /var/lib/pgsql/data
step7: update postgresql deployment configuration to remove postgresql-data-old:
spec:
template:
spec:
volumes:
- name: postgresql-data
persistentVolumeClaim:
claimName: postgresql2
containers:
volumeMounts:
- name: postgresql-data
mountPath: /var/lib/pgsql/data
step8: verify if a new deployment for postgresql has happened, manually trigger one if not
step9: verify if application works properly
make sure a site maintenance page is displayed before we run the storage
- Working on GWELLS (full workflow from writing code to deploying to prod)
- Water terminologies
- Testing
- Swagger Documentation
- Restore a database backup manually
- (Archived) Manual Syncing of DEV to TEST to PROD
- (Archived) Setup GWells data migration for local dev test
- Update PostGres Oracle Foreign Data Wrapper image
- Increase PostgreSQL Database storage
- (Archived) Regular Corruption of the PostgreSQL DB
- (Archived) Recovering from a corrupt PostgreSQL Database