How to free up space on VMware vCenter Appliance

vCenter is an appliance. It’s a purpose built, hardened *nix appliance that can be something of a black box to some. When there are operational issues with the vCenter Appliance, they are normally storage related. Specifically the lack of storage space on the actual device. When the root partition fills, things come to a grind and it’s sometimes too late to do the cleanup work to get it functional again.

Here are some easy steps I recently did with a client to help push that day further down the road.

Almost all of this work was done via SSH into the vCenter appliance machine. Logging in as root, I ran a df -h command to see where we stood.

Not bad but we can see that the / partition and the /storage/log partition have some usage on it. The storage one is at 99% capacity. To free up some space I followed the following KB article.

https://kb.vmware.com/s/article/2147261

This walked me through the process of setting up a log rotation schedule for the file cloudvm_ram_size.log. This file was flagged by a top 20 search we did with the command
du -a -h /storage/log/ | sort -n -r | head -n 20 

We then ran the log rotation manually and deleted all the *.bz2 files in /storage/log.
logrotate -f /etc/logrotate.conf

https://kb.vmware.com/s/article/2151389 is another KB article that details how to find *.tgz files that can crowd up the storage partitions. These are left over support bundles that can be safely deleted. Sometimes as large as 5GB in space.

For the root (/) partition, we followed the process outlined here.
(https://kb.vmware.com/s/article/2145603)
This allowed us to safely increase the root partition VMDK and then expand it within the appliance for added buffer.

Once all optimizations were complete, we took a hot clone of the appliance for cold storage and called it a day.

Happy Spring Cleaning!
Carlo

TAGS