vCenter Server 8.0U3g environments encounter disk exhaustion alerts for /storage/log and /storage/archive. This issue occurs when vPostgres logs fail to rotate correctly, leading to massive growth of postgresql.log and the accumulation of unpurged WAL segments. Symptoms include critical alerts in the vCenter monitoring application and inability to perform system operations due to insufficient disk space.
Symptoms:
VMware vCenter Server 8.0U3g
A known defect in the vPostgres log rotation mechanism prevents the automated cleanup of logs and archive segments.
This issue is resolved in vCenter server versions 8.0U3h or higher
To free up the space immediately and clear the alert, follow below steps:
For a workaround, if upgrade is not feasible at this time, follow below steps:
Note: Take a valid VAMI-based backup or offline snapshots of ALL vCenter/PSC nodes in the SSO domain before continuing. See VMware vCenter in Enhanced Linked Mode pre-changes snapshot (online or offline) best practice
Workaround:
/var/log/vmware/vpostgres/postgresql.log in file /etc/logrotate.d/vmware-additional-data.lr./var/log/vmware/vpostgres/postgresql.log
/var/log/vmware/vpostgres/postgresql-%d.log
{
rotate 30
firstaction
dim=$(date -d "$(date +%Y-%m-01) +1 month -1 day" +%d)
find /var/log/vmware/vpostgres/ -name "postgresql.log-*gz" -mtime +$dim -exec rm {} \;
endscript
daily
maxage 30
dateext
dateyesterday
dateformat -%Y-%m-%d_%H:%M:%S
compress
copytruncate
}/var/log/vmware/vtsdb/postgresql.log in file /etc/logrotate.d/vmware-additional-data.lr./var/log/vmware/vtsdb/postgresql.log
{
rotate 30
firstaction
dim=$(date -d "$(date +%Y-%m-01) +1 month -1 day" +%d)
find /var/log/vmware/vtsdb/ -name "postgresql.log-*gz" -mtime +$dim -exec rm {} \;
endscript
daily
maxage 30
dateext
dateyesterday
dateformat -%Y-%m-%d_%H:%M:%S
compress
copytruncate
}>/var/log/vmware/vpostgres/postgresql.logsudo truncate -s 0 /storage/log/vmware/vpostgres/postgresql.log