OpenVZ Forum


Home » General » Support » RPM DB corruption when using vzrpm/vzyum
RPM DB corruption when using vzrpm/vzyum [message #15544] Sat, 04 August 2007 23:37 Go to next message
seanfulton is currently offline  seanfulton
Messages: 105
Registered: May 2007
Senior Member
I posted this as a bug but thought I would post here as well. About two months ago I tried setting up OpenVZ with a shared NFS drive as /vz. One of the problems I ran into was data corruption in the form of trying to install packages using vzrpm that was corrupting the rpm database within the VE.

I was told at the time that there was a kernel bug affecting NFS and that was likely the cause.

I scrapped the idea of using NFS and am now using a local drive. I am using the latest OpenVZ kernel on RHEL 5, latest utilities, etc. I reinstalled all of the VZ software, and when trying to add programs to the VE using vzrpm and again, it's corrupting the RPM database.

I'm wondering now if there's a problem with vzrpm or if there's another kernel bug. Any insight or help would be appreciated.

sean
Re: RPM DB corruption when using vzrpm/vzyum [message #15555 is a reply to message #15544] Sun, 05 August 2007 17:50 Go to previous messageGo to next message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
Hi Sean, post the complete steps necessary to duplicate the problem, so that it can be understood and investigated more effectively.



ie,
1) deploy centos4 VE
2) run commands XX,YY,ZZ
3) note error AA in log BB

Rick



-------------
Common Terms I post with: http://wiki.openvz.org/Category:Definitions

UBC. Learn it, love it, live it: http://wiki.openvz.org/Proc/user_beancounters
Re: RPM DB corruption when using vzrpm/vzyum [message #15557 is a reply to message #15555] Sun, 05 August 2007 18:37 Go to previous messageGo to next message
seanfulton is currently offline  seanfulton
Messages: 105
Registered: May 2007
Senior Member
Install 2.6.18-8.1.8.el5.028stab039.1 kernel on RHEL 5
vzctl create 6004 --ostemplate=centos-4
vzctl start 6004
vzrpm 6004 -qa --outputs a list of installed RPMS
for a in "perl-Filter-1.30-6 perl-HTML-Parser-3.35-6 erl-libwww-perl-5.79-5 perl-5.8.5-36.RHEL4 perl-DBI-1.40-8
perl-DBD-MySQL-2.9004-3.1 perl-HTML-Tagset-3.03-30 perl-URI-1.30-4 "
# OR REALLY *ANY RPMS*
do
vzrpm 6004 -Uvh $a
done
RPMS all install correctly.

vzrpm 6004 -qa
Outputs a partial list of RPMs followed by:
error: db4 error(-30988) from dbcursor->c_get: DB_PAGE_NOTFOUND: Requested page not found

Please note that I just tested this on RHEL 4.4 with the 2.6.18-8.el5.028stab031.1 kernel and get no errors.

sean

Re: RPM DB corruption when using vzrpm/vzyum [message #15558 is a reply to message #15557] Sun, 05 August 2007 18:43 Go to previous messageGo to next message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
strange, as vzrpm is just a wrapper on rpm. is it really any rpms that cause this problem? if you use vzrpm with a single simple rpm, does the problem occur?

Rick


-------------
Common Terms I post with: http://wiki.openvz.org/Category:Definitions

UBC. Learn it, love it, live it: http://wiki.openvz.org/Proc/user_beancounters
Re: RPM DB corruption when using vzrpm/vzyum [message #15559 is a reply to message #15558] Sun, 05 August 2007 18:48 Go to previous messageGo to next message
seanfulton is currently offline  seanfulton
Messages: 105
Registered: May 2007
Senior Member
Yes, it happens with different RPMs. At first I thought it was a corrupt RPM, but it's very reproducable.

This is the same behavior I had previously with the 31 kernel running over NFS and was told it (DB corruption on a DB4 database) was likely a known kernel issue running over NFS. Given that I am no longer using NFS, and the problem can be reproduced on the 39 kernel but not 31, I'm wondering if there isn't something else going on.

sean
Re: RPM DB corruption when using vzrpm/vzyum [message #24761 is a reply to message #15559] Mon, 10 December 2007 02:26 Go to previous messageGo to next message
dcox
Messages: 1
Registered: December 2007
Junior Member
I have always experienced the same problems with OpenVZ using CentOS 4 or 5.

Currently with 2.6.18-53.el5.028stab051.1PAE and a local ext3 file system.

Initially I thought the best fix was: rpm --rebuilddb
But in fact that has often removed the record of many packages.

A fix which now seems to work is: rm -f /var/lib/rpm/__db*
Which I need to do almost every time I use vzyum.
Re: RPM DB corruption when using vzrpm/vzyum [message #24763 is a reply to message #24761] Mon, 10 December 2007 04:33 Go to previous messageGo to next message
jthomps is currently offline  jthomps
Messages: 1
Registered: December 2007
Junior Member
dcox wrote on Sun, 09 December 2007 20:26

I have always experienced the same problems with OpenVZ using CentOS 4 or 5.

I noticed the same thing for all VE's I create using CentOS 5. I have noticed that yum will fail after a VE is started, unless I run a RPM command first in the VE. After that, all vzyum commands seem to work just fine.

For example:

vzctl start 100
vzyum 100 list updates (fails)
vzctl exec 100 rpm -qa (works)
vzyum 100 list updates (works)

Very strange, but at least the workaround seems to be 100% reliable.

Re: RPM DB corruption when using vzrpm/vzyum [message #25972 is a reply to message #24763] Sun, 13 January 2008 05:42 Go to previous message
Sambo is currently offline  Sambo
Messages: 2
Registered: November 2007
Junior Member
Could it be something to do with the fact that rpm on Centos 5 is version 4.4.2 and rpm inside the Centos 4 VE is 4.3.3 ? Or else some other incompatability (does rpm use bdb or something?).

I have the same problem and it's pretty annoying.

[Updated on: Sun, 13 January 2008 05:43]

Report message to a moderator

Previous Topic: debuginfo for kernel
Next Topic: RHEL5 template?
Goto Forum:
  


Current Time: Fri Nov 15 15:50:01 GMT 2024

Total time taken to generate the page: 0.03400 seconds