vSphere 6.5

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.

Sizing-options-with-VCSA-upgrade
Sizing options with VCSA upgrade

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

Stop-vmware-vpxd-vCenter-process
Stop vmware-vpxd vCenter process

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.

Postgres-cleanup-script-from-VMware
Postgres cleanup script from VMware

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
Script-runs-and-cleans-up-old-events-based-on-input
Script runs and cleans up old events based on input

Cleaning up Storage/seat disk

The next KB article https://kb.vmware.com/kb/2119809 explains how to cleanup the /storage/seat partition.

Cleanup-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.

Cleanup-core-dump-files-in-storage-core
Cleanup core dump files in storage core

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.

Subscribe to VirtualizationHowto via Email 🔔

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com and has over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, Brandon has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.