| Re: vzyum database recovery -- was vzpkgcache fail [message #32359 is a reply to message #32358] | 
			Fri, 01 August 2008 20:05    | 
		 
		
			
				
				
				
					
						  
						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  
 |  
	| 
		
	 | 
 
 
 |