Before upgrading to VMware Cloud Director 10.4.1, verify that the embedded PostgreSQL database has the required available disk space.
If you are upgrading the VMware Cloud Director appliance to version 10.4.1, the embedded PostgreSQL database upgrades from version 10 to version 14. This process involves cloning the existing database contents to a new local instance, which results in a temporary increase in disk utilization. Because of this, verify that before starting the upgrade, you have sufficient free space on the database disk.
Because the cloning process only includes the database contents and not the database logs nor the write-ahead logs that are used for replication, verify that the database logs are backed up in compliance with your organization's log retention policies.
Procedure
Results
Example: Check the available disk space on the database disk
Run the command to check the available disk space.
- Run the command to check the available disk space.
df -B G /var/vmware/vpostgres/
The command returns the following information.Filesystem Size Used Avail Use% Mounted on /dev/mapper/database_vg-vpostgres 84G 30G 54G 36% /var/vmware/vpostgres
- Run the commands to check the size of the /pg_wal and /log directories under your vpostgres data directory.
du -B G --summarize /var/vmware/vpostgres/current/pgdata/pg_wal/
du -B G --summarize /var/vmware/vpostgres/current/pgdata/log/
The commands return the following information.12G /var/vmware/vpostgres/current/pgdata/pg_wal/
1G /var/vmware/vpostgres/current/pgdata/log/
- Substract the size of the log directories from the total used disk space: 30-12-1=17.
This result means that the database needs at least 17GB of available disk space for the upgrade. The total available space in this system is 54GB, so it is safe to proceed with the upgrade.
What to do next
- If there is not enough disk space available, do not proceed with the upgrade until the database disk has been expanded. See Increase the Capacity of the Embedded PostgreSQL Database on a VMware Cloud Director Appliance.
- If there is enough disk space available, proceed with the upgrade.