How to reclaim space on /storage/seat in vCenter Appliance 5.5 or 6.x?

By | November 2, 2015

Some days ago I faced a problem with out of space on /storage/seat in vCenter Appliance 6.0 in my lab. This is a disk where some vPostgres data are kept: Tasks, Events or Stats. As I described already, you can resize a disk containing /storage/seat. In this post I will show how to purge tables in vCenter database to reclaim space without re-sizing the disk.

To reclaim space please follow the below steps:

  1. Log in to the VMware vCenter Server Appliance (VCSA) as root using SSH or the console.
  2. Enable VCSA shell:

    shell.set --enabled true

  3. Stop vCenter service:

    service vmware-vpxd stop

  4. Get password to the vCenter database (between ''):

    cat /etc/vmware-vpx/embedded_db.cfg | grep PASSWORD

  5. Enter the following command and then the password you got in the previous step.

    /opt/vmware/vpostgres/1.0/bin/psql -d VCDB postgres

  6. Enter the following command to purge tables:

    TRUNCATE TABLE vpx_event CASCADE;

The below figure shows results 🙂How to reclaim space on storage seat in vCenter Appliance 5.5 or 6.x

Now we can start vCenter service:

service vmware-vpxd start

There is also available a command to clean up vCenter databases:

sudo -u postgres /opt/vmware/vpostgres/9.3/bin/vacuumdb -a -e -v -f -U postgres > /tmp/vacuumdb.log

where 9.3 is your vPostgres version.