Popular Posts

Jun 12, 2017

Oracle VM Manager 3.x: How to Recover from Data base corruption


APPLIES TO:

Impact Any type of activities like:

  • Upgrading the OVM Setup
  • Cloning Guest VMs
  • Unable to modify any parameter on a Guest VM
  • Unable to delete Guest VM
GOAL :

Repair corrupted Oracle VM database for OVM versions  3.0.x , 3.1.x and 3.2.x  Only,    
DO NOT USE THIS Support article for OVM versions 3.3x or higher
DO NOT USE THIS FOR  any versions of the Oracle Private Cloud Appliance - PCA.
There are two options to recover the Oracle OVM Manager DB  from an ObjectNotFoundException

    1. Restore DB (This is the Preferred Method)

  • Restoring the MYSQL Database
  • Restoring the Oracle Database
  • Validating the Database


    2. Regenerate DB (If  a Backup of the Oracle Manager DB is not available to Restore)

SOLUTION :

Oracle VM Diagnostic Capture

For diagnostic purposes, Oracle Support Services use a script called VMPInfo3 that automatically collects vital troubleshooting information from your Oracle VM environment. This script is installed when you install Oracle VM Manager and is located at
/u01/app/oracle/ovm-manager-3/ovm_shell/tools/vmpinfo/vmpinfo3.sh OR
/u01/app/oracle/ovm-manager-3/ovm_tools/support//vmpinfo3.sh on the Oracle VM Manager system.
./vmpinfo3.sh --username=[admin] --password=[passwd]
Please send /tmp/vmpinfo3-3.x.y.z-20130123-163252.tar.gz to Oracle OVM support

RESTORING A MYSQL DATABASE
Prior to restoring a MySql DB - delete the current one.
The Oracle VM manager services need to be shutdown.

#service ovmm stop 

Using ovm_upgrade.sh from /u01/app/oracle/ovm-manager-3/ovm_upgrade/bin and the values from the .config file, delete the bad database.

#cd /u01/app/oracle/ovm-manager-3/ovm_upgrade/bin 
#sh ovm_upgrade.sh --deletedb --dbuser=ovs --dbpass=<password> --dbhost=localhost --dbport=49500 --dbsid=ovs

Password is same as OVM Manager password. 

Look in your /etc/sysconfig/ovmm file for the value listed for "DBBACKUP". You should see something like this:

DBBACKUP=/u01/app/oracle/mysql/dbbackup 

That is the location on your system where MySQL is storing its backups. Please make note of this directory. Each backup is stored in a directory within the path defined by DBBACKUP. The backup directory is named AutoFullBackup-MMDDYYYY_hhmmss. Within the backup directory is a log file, named AutoBackup.log, containing information about the events that took place during the backup process. The backup directory contains a backup of the MySQL configuration file, a datadir directory containing the binary log for the database, a meta directory containing files specific to the MySQL Enterprise Backup process that was run at the time, and the actual MBI image file for the database that is backed up.

Only the 15 most recent backups are maintained within the DBBACKUP path. Manual backups, where the backup directory name is not prepended with AutoFullBackup, are ignored by the rotation. The trick in restoring the database is making sure that you have a good DB to restore, as your backups may also be corrupt.

To restore the database to one of the available backups, the manager and the database need to be shut down:

For example as the root user execute the following commands:

# service ovmm stop; service ovmm_mysql stop 

To initiate the restore, as the oracle user, use the RestoreDatabase.sh command located in the /u01/app/oracle/ovm-manager-3/ovm_tools/bin/

For example:

# su - oracle 
$ sh /u01/app/oracle/ovm-manager-3/ovm_tools/bin/RestoreDatabase.sh AutoFullBackup-10222012_162543 
INFO: Expanding the backup image...
INFO: Applying logs to the backup snapshot...
INFO: Restoring the backup...
INFO: Success - Done!
INFO: Log of operations performed is available at:
/u01/app/oracle/mysql/dbbackup/AutoFullBackup-10172012_122920/Restore.log

after that start the services.

#service ovmm_mysql start 
#service ovmm start 



Oracle Knowledge Base:
KM Oracle VM: Error Message `No such object (level 1), cluster is null` ( Doc ID 2073727.1 )
KM Oracle VM Manager 3.x: How to Recover from Data base corruption including "ObjectNotFound Exception" Errors ( Doc ID 1555915.1 )



~judi~
Unable to modify any parameter on a Guest VM;
Unable to delete Guest VM;
Oracle VM Manager 3;
How to Recover from Data base corruption;
Oracle VM Manager 3.x: How to Recover from Data base corruption
Oracle OVM Manager DB  from an ObjectNotFoundException;
backup oracle vm
install oracle vm manager

No comments:

Post a Comment

Popular Posts