OpenVZ Forum


Home » General » Support » vzyum database recovery -- was vzpkgcache fail
Re: vzyum database recovery -- was vzpkgcache fail [message #32359 is a reply to message #32358] Fri, 01 August 2008 20:05 Go to previous messageGo to previous message
bchapman is currently offline  bchapman
Messages: 2
Registered: August 2008
Junior Member
Here is some further information on this issue.

When booted, the virtual machine does not have the /var/lib/rpm/__db.00{1,2,3} files. This causes the vzyum issue regarding the database.

Running "rpm -qa" inside the virtual machine recreates the /var/lib/rpm/__db.00{1,2,3} files. It looks like the files are deleted on start up; doing a "shutdown now -h" from inside the machine does not delete them. This leaves the machine "mounted". Running "vzctl umount VE_ID" doesn't remove them either. However, running "vzctl start VE_ID" deletes the db files.

Not sure where to go next with this...

[EDIT]

Here is a small enhancement to the previous workaround - edit /usr/bin/vzyum so that it runs the 'rpm -qa' command prior to running yum.

Add the following to the next to last line of /usr/bin/vzyum:

$VZCTL exec $VEID rpm --quiet -qa

After the change the last four lines of vzyum should look like this:

log4 PYTHONPATH=$PYTHONPATH
log3 exec $YUM $YUM_ARGS $USER_ARGS
$VZCTL exec $VEID rpm --quiet -qa
exec $YUM $YUM_ARGS $USER_ARGS

This will rebuild the db files as in the earlier post.

Ben

[Updated on: Fri, 01 August 2008 21:07]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: kernel Problem
Next Topic: [solved] How to determine which HN a VE is running on
Goto Forum:
  


Current Time: Sun Sep 14 23:36:08 GMT 2025

Total time taken to generate the page: 0.36148 seconds