VMware VCSA 6.5 Upgrade no Tiny or Small Option
With many looking seriously at upgrading to vSphere 6.5 now with the GA release o Update 1, many will start the process of upgrading their vCenter servers. If you are running the VCSA appliance, with 6.5 VMware has made the process very straightforward with the migration utility which makes the migration from an older appliance up to 6.5 extremely easy. After running into the scenario where my VCSA 6.5 appliance migration wouldn’t show the Tiny or Small configurations, I started looking and doing some cleanup on the source VCSA appliance. Let’s take a look at VMware VCSA 6.5 Upgrade no Tiny or Small Option to discuss some of the cleanup you may want to do.
VMware VCSA 6.5 Upgrade no Tiny or Small Option
If you have a chance to lab out your VCSA 6.5 migration, it is definitely worth doing so as you can uncover issues that you would otherwise only find the day of migration. I highly recommend a lab environment using the same IP addresses so that you can duplicate everything as it pertains to production. ย Below are a few of the KBs and tasks I went through to cleanup VCSA 6.0 data that existed in the DB. ย One note to mention, the sizes are not tied to disk sizes, only the amount of data. ย I thought that since I had extended a couple of drives due to disk space issues in the past, this might have accounted for the lack of the Tiny and Small options.
Selective deletion of tasks, events, and historical performance data
The first cleanup I did was based on KB 2110031 –ย https://kb.vmware.com/kb/2110031
Download the “2110031_Postgres_task_event_stat.sql” script from the KB and upload it to theย /tmp directory of your source VCSA 6 appliance.
Run the script by changing theย day parameters to meet the requirements of the data you want to keep.
/opt/vmware/vpostgres/current/bin/psql -U postgres -v TaskMaxAgeInDays=10 -v EventMaxAgeInDays=10 -v StatMaxAgeInDays=10 -d VCDB -t -q -f /tmp/2110031_Postgres_task_event_stat.sql
Cleaning up Storage/seat disk
The next KB article https://kb.vmware.com/kb/2119809ย explains how to cleanup theย /storage/seat partition.
Cleanup old core dumps in /storage/core that have been created
When the vpxd service crashes, often you will have large dump files created in theย /storage/core directory.
Find the largest table in Postgress VCDB database
Use the following query to find the top “20” tables by size in Postgres database:
SELECT nspname || '.' || relname AS "relation", pg_size_pretty(pg_total_relation_size(C.oid)) AS "total_size" FROM pg_class C LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace) WHERE nspname NOT IN ('pg_catalog', 'information_schema') AND C.relkind <> 'i' AND nspname !~ '^pg_toast' ORDER BY pg_total_relation_size(C.oid) DESC LIMIT 20;
Be careful here and always check with VMware support before truncating just any table. ย However, the command to truncate is:
truncate table <table name> cascade;
Running the Postgres Vacuum Process
There is also a KB article that steps through how to Vacuum the Postgres DB which frees up quite a bit of space. The KB article is for older versions of the VCSA appliance. ย https://kb.vmware.com/kb/2056448
Command to run is:
vacuumdb -a -e -v -f -U postgres > /tmp/vacuumdb.log
I did find that on my VCSA 6 appliance, this command seemed to hang after running for several minutes. ย I even left it running over night and it was at the same place. ย I didn’t really get the opportunity to troubleshoot this one out fully so definitely one to run in a test environment first.
Thoughts
With the preceding cleanup work, you can expect to clear quite a bit of old data that most likely is the culprit behind not seeing theย Tiny andย Small options available on the sizing screen. ย Also, this is good housekeeping to cut things down to the minimum so the actual data copy process will go through as quickly as possible to the newly provisioned VCSA 6.5 appliance.