Monday 25 June 2018

Repairing a corrupt RPM database on VCSA

The other day I decided to upgrade to my 6.5 U1 VCSA to U2.  After successfully completing the upgrade in my development lab I moved on to one of the production sites. This worked as expected so did not expected any issues with the remaining site. However this was not the case. After clicking the upgrade button I got a message stating that the "VAMI Upgrade Staging Failed".

Working with VMware support we came to the conclusion that the VCSA's RPM database got corrupted somehow.



To solve the problem I took the following steps:

  • Snapshot the appliance
  • Take backup of all the __db files on /var/rpm
  • rm /var/lib/rpm/__db to remove the db files
  • rpm -qa, this will ideally recreate the database

After executing the above run the rpm -qa | grep -i rpm command again




This allowed me to run the upgrade process successfully from the VAMI interface