LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 10-11-2011, 11:34 PM   #1
alexmannx13
LQ Newbie
 
Registered: Oct 2011
Posts: 2

Rep: Reputation: Disabled
Exclamation rpm database recovery - mandriva 2011 - stuck after trying various methods....


Hello,

I had a nicely working system running Mandriva 2011 (32-bit), until there was a power failure during an update (urpmi) - yes, what a time for a power failure. On reboot, the rpm database was corrupted and since then I've tried various methods to make things "work", but no luck yet.

Here's what I tried:
--> backup the existing /var/lib/rpm directory, delete the db files, and use rpm -vv --rebuilddb
--> use db51_recover -ev to recover the database
--> a combination of the above two methods

So, none of the methods worked. I still get messages like:

Code:
==> rpmdbe_event_notify(0x9696090, PANIC(0), 0xbf872bac) app_private (nil)
rpmdb: PANIC: fatal region error detected; run recovery
==> rpmdbe_event_notify(0x9696090, PANIC(0), 0xbf872c4c) app_private (nil)
error: db3close:db3.c:1629: db->close(-30973): DB_RUNRECOVERY: Fatal error, run database recovery
rpmdb: PANIC: fatal region error detected; run recovery
==> rpmdbe_event_notify(0x9696090, PANIC(0), 0xbf872c4c) app_private (nil)
error: db3close:db3.c:1629: db->close(-30973): DB_RUNRECOVERY: Fatal error, run database recovery
rpmdb: PANIC: fatal region error detected; run recovery
rpmdb: File handles still open at environment close
rpmdb: Open file handle: /var/lib/rpm/Packages
rpmdb: Open file handle: /var/lib/rpm/Name
rpmdb: Open file handle: /var/lib/rpm/Nvra
rpmdb: Open file handle: /var/lib/rpm/Basenames
rpmdb: Open file handle: /var/lib/rpm/Sha1header
rpmdb: Open file handle: /var/lib/rpm/Triggername
rpmdb: Open file handle: /var/lib/rpm/Seqno
rpmdb: Open file handle: /var/lib/rpm/Filepaths
rpmdb: Open file handle: /var/lib/rpm/Packagecolor
rpmdb: Open file handle: /var/lib/rpm/Pubkeys
rpmdb: Open file handle: /var/lib/rpm/Filedigests
rpmdb: Open file handle: /var/lib/rpm/Sigmd5
rpmdb: Open file handle: /var/lib/rpm/Installtid
rpmdb: Open file handle: /var/lib/rpm/Dirnames
rpmdb: Open file handle: /var/lib/rpm/Obsoletename
rpmdb: Open file handle: /var/lib/rpm/Requirename
rpmdb: Open file handle: /var/lib/rpm/Providename
rpmdb: Open file handle: /var/lib/rpm/Group
rpmdb: Open file handle: /var/lib/rpm/Os
rpmdb: Open file handle: /var/lib/rpm/Arch
rpmdb: Open file handle: /var/lib/rpm/Release
rpmdb: Open file handle: /var/lib/rpm/Version
rpmdb: Open file handle: /var/lib/rpm/./log/log.0000000233
rpmdb: PANIC: fatal region error detected; run recovery
==> rpmdbe_event_notify(0x9696090, PANIC(0), 0xbf872c4c) app_private (nil)
error: db_fini:db3.c:583: dbenv->close(-30973): DB_RUNRECOVERY: Fatal error, run database recovery
This happens when I use urpmi and rpm to install packages.

I've also gone through some of the rpm docs. Some of the methods include using db_verify or rpm --initdb, but these don't exist in the current release of mandriva.

There must be some way to progress on this issue, short of reinstalling the system. At that point I would probably ask if there is a way to install the whole list of packages that I currently have installed after a quick reinstall of mandriva. It could be something tiny that I overlooked...

Thank you for reading this post. I would appreciate any suggestions or alternatives that could help. Hey, the worst case is to reinstall the distro, so I'd be okay with trying out a few things before that.

Regards,
Alex
 
Old 10-11-2011, 11:49 PM   #2
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 4
Posts: 4,298

Rep: Reputation: 205Reputation: 205Reputation: 205
You might find more options here: http://www.oldrpm.org/hintskinks/repairdb/ Read thoroughly before trying any of the suggestions.

If you have backups of your database (prior to this incident) you can revert to it and reinstall the packages with:
Code:
rpm -ivh --justdb --noscripts --notriggers

Last edited by {BBI}Nexus{BBI}; 10-11-2011 at 11:52 PM.
 
Old 10-12-2011, 12:24 AM   #3
alexmannx13
LQ Newbie
 
Registered: Oct 2011
Posts: 2

Original Poster
Rep: Reputation: Disabled
Hello Nexus,

Thanks for the reply. I'm glad that the link you provided was one that I had read prior to posting... meaning that I'm looking in the right direction. Unfortunately I do not have a backup of the database prior to the crash. Is the database that is recovered after using the 'db51_recover -ev ' command viable for use in the method described on the page (link you provided)? Also, what do I put at the end of the line of code you provided - is it a text file? I'm probably not thinking straight after all this tinkering. If it's alright, I would like to request a bit more hand-holding / guidance.

Regards,
Alex
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to customize Mandriva 2011 LXer Syndicated Linux News 0 08-29-2011 07:30 PM
Mandriva 2011 RC2 No updates TigerLinux Mandriva 4 08-21-2011 06:32 PM
LXer: Methods of Linux Bare Metal Restore and Disaster Recovery LXer Syndicated Linux News 0 08-06-2006 08:21 PM
data recovery methods or software? Synesthesia Linux - Software 9 04-24-2006 01:37 AM
LXer: Firefox 1.5 - Methods to Fix What Ails Thee - Rx: AdBlock(em) with GkrellM for a Quick Recovery LXer Syndicated Linux News 0 12-24-2005 10:31 PM


All times are GMT -5. The time now is 11:59 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration