LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 09-09-2004, 07:22 AM   #1
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Rep: Reputation: 58
Help me to recover my rpmdb


My /var partition on SuSE 9.1 became full, and trying to free up some space, I decided to move the largest directories in it to an other partition, and symlink them to their original place:

mv /var/adm /fromvar/
ln -s /fromvar/adm /var/adm
mv /var/lib /fromvar/
ln -s /fromvar/lib /var/lib

I did not notice that there was something wrong, as the symlinks were in place.

Soon I started yast to install a new package. Here I was surprised that yast began to install packages that must have been on the system!

I killed yast, and I found that my rpmdb is almost empty; there are only those rpms in it which I installed after moving the /var/adm and /var/lib directories.

What happened to the rpm database and why? Is it not allowed to move /var/adm or /var/lib to an other location, and symlink it to the original place?

But, the most important question: is it possible to recover my original rpmdb?

(I suspect that my original rpmdb is there somewhere, as my /var/adm and /var/lib directories are not any smaller then they were before moving them.
However, "rpm --rebuilddb" finishes in 1s without seemingly doing anything; I suspect that it is because my system uses a completely new (and almost empty) rpmdb.

Last edited by J_Szucs; 09-09-2004 at 07:24 AM.
 
Old 09-09-2004, 10:39 AM   #2
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Original Poster
Rep: Reputation: 58
The above problem has been solved in the meantime: I could restore a previous state of the rpmdb from an automatic backup in the /var/adm/rpm/backup directory.

I also moved all files in /var to an other, larger partition. For the case of simplicity, I used the cp command for that after booting up in rescue mode from the installation CD. SuSE did a thorough hardware detection after the next startup, but otherwise everything seems to be OK.
 
  


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
Compiling rpmdb-redhat louisb Linux - Enterprise 1 09-16-2005 05:37 PM
fedora4 rpmdb? james.farrow Fedora 9 06-25-2005 07:08 PM
rpmdb problem ispnepal Red Hat 9 06-18-2004 08:40 AM
RPMDB Recovery inTUXicated Linux - General 3 02-10-2004 11:33 AM
rpmdb error acid_kewpie Linux - General 0 02-02-2002 08:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:31 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration