[Centos] yum updated to 3.3, rpmdb corrupted

Fri Sep 24 14:44:23 UTC 2004
donavan nelson <donavan at 4wx.net>

Tom,

My test box (installed Sept 6, 2004 with 3.1 and some dag stuff) 
upgraded just fine.

Are you using any other 3rd party tools that access RPM databases?

[root at alto usr]# cat /etc/redhat-release
CentOS release 3.3 (final)
[root at alto usr]# rpm -qa |wc -l
    693
[root at alto usr]# uname -a
Linux alto.4wx.net 2.4.21-20.EL.c0 #1 Thu Sep 9 02:38:04 EDT 2004 i686 
athlon i386 GNU/Linux


Tom Seeley wrote:

>Ok, so I've discovered its not a problem with my test box.  Yum updating to 3.3
>hoses my rpmdb every time.  The actual error is:
>
>error: db4 error(-30989) from dbcursor->c_get: DB_PAGE_NOTFOUND: Requested page
>not found
>
>The above is displayed when I run an rpm -qa |wc -l (which only reports 76
>afterwards instead of 657 from before)
>
>Nothing happened to the machine whilst it was updating, no errors appeared
>whilst yum was running.
>
>After yum has finished there are the following files in /var/lib/rpm:
>
>__db.001
>__db.002
>__db.003
>
>If I delete those files /and then/ do a rpm --rebuilddb I seem to recover.
>
>At a guess this is probably something todo with updating glibc and/or rpm in the
>same transaction, but I'm far from being an expert on these matters.  Although
>I appear to have found a work-around for this problem, its leaves a bad taste
>in my mouth.
>
>Anybody else have a better solution?
>
>Tom.
>
>Quoting Tom Seeley <caosity at tomseeley.co.uk>:
>
>  
>
>>I'd guess this is probably something pretty specific to my test box, but when
>>I
>>yum updated to 3.3 my rpmdb got totally hosed.  Unfortunately, I didn't save
>>the error that occured at the time because a rpm --rebuilddb _appeared_ to
>>fix
>>the problem.  Unfortunately I found out later that I was left with a db that
>>only contained a subset of the actual install base.  I'm now trying to
>>recover
>>from the /var/log/rpmpkgs file.
>>
>>Later I will be adding /var/lib/rpm to my backups....
>>
>>Like I said, its probably my machine (its old and naff), but I just thought
>>I'd
>>share :)
>>
>>--
>>Tom Seeley
>>
>>----------------------------------------------------------------
>>This message was sent using IMP, the Internet Messaging Program.
>>_______________________________________________
>>CentOS mailing list
>>CentOS at caosity.org
>>http://www.caosity.org/mailman/listinfo/centos
>>
>>    
>>
>
>
>--
>Tom Seeley
>
>----------------------------------------------------------------
>This message was sent using IMP, the Internet Messaging Program.
>_______________________________________________
>CentOS mailing list
>CentOS at caosity.org
>http://www.caosity.org/mailman/listinfo/centos
>
>  
>