Professional Developer programmer working a software website design and coding technology, writing codes and database in company office, Global cyber connection technology.
Technical Adoption Manager (TAM) Professional Services

How To Remove Old Archive Files in VMware vCenter Server Appliance

WARNING VMware vCenter® Server Appliance™ has insufficient disk space! What next?

The good news is the vCenter Server Appliance is still operational. However, if you intend to update it, you should verify its health status beforehand. There are two options to resolve the issue:

  1. Expand the disk
  2. Remove old files

Whichever option you choose, it’s a best practice to take a snapshot before doing any activity on the vCenter Server Appliance.

This warning notice recently happened to my customer. As their VMware Technical Account Manager, I check their Skyline Proactive Support portal on a regular basis. In the findings and specific recommendations tab it showed that the vCenter Server Appliance root partition had over 80% used space.

TopicDetails
Finding IDvSphere-VCSARootDiskSpace-KB#76563-2
SeverityModerate
DescriptionvCenter Server Appliance root partition is over 80% used space.
Risk if no action takenEnvironmental Stability
Linkshttps://kb.vmware.com/s/article/76563

Note: vCenter Server Appliance version 6.7U3

When logging into vCenter Server VAMI page (vCenter Server Appliance Management Interface), login as root.

https://appliance-IP-address-or-FQDN:5480

This revealed that the hard drive 13 archive partition had a red warning for 94.9% of 196.7GB.

  • Used Space – 186.7 GB
  • Available Space – 10.0 GB
  • Total Space – 196.7 GB

Due to limited resources the customer’s preference was to remove old archive files from the archive partition.  The following guidance was provided to resolve the issue.

Step-by-Step Instructions for Removing Old Archive Files

1. Take a snapshot of the vCenter Server Appliance

2. SSH into the vCenter Server Appliance

3. Run this command to enable access to the Bash shell:

shell.set –enabled true

Type shell and press Enter

4. Navigate to directory /storage/archive/vpostgres

#cd /storage/archive/vpostgres

5. According to your policy and disk space return, you can search for files older than 60, 40, or 30 days. My customer chose files older than 40 days, using the command below:

#find * -mtime +40

6. The system will now display files older than 40 days.

7. To remove files older than 40 days, run the following command:

#find *.* -mtime +40 | xargs rm

8. Use the command below to see whether any files older than 40 days are still present:

#find * -mtime +40

9. Use command “df -h” to display the disk space in a human-readable form:

#df -h

The percent space of path/storage/archive will be reduced, in this case to 32%.

Before

  • Used Space – 186.7 GB
  • Available Space – 10.0 GB
  • Total Space – 196.7 GB

After

  • Used Space – 59 GB
  • Available Space – 129 GB
  • Total Space – 196.7 GB

10. Wait 10 – 20 minutes, then try refreshing the browser to see if the hard drive 13 space archive partition no longer shows a red warning.

Guidance and Technical Recommendations

Guidance and technical recommendations are key components with any TAM engagement. With Skyline Proactive support, TAMs can assist to proactively find issues and make recommendations to avoid recurrence. Looking to upgrade a VMware product? TAMs can help there too by providing a list of products that are compatible with the upgrade. Working in close collaboration, TAMs help customers keep VMware products up to date and working properly.

Don’t have a TAM? Contact your VMware Account Representative to learn how Technical Account Management Services can help your team achieve your objectives.