database mess up
Patrick Dupre
pd520 at york.ac.uk
Sat Jan 24 01:55:25 UTC 2009
On Fri, 23 Jan 2009, Craig White wrote:
> On Fri, 2009-01-23 at 11:04 +0000, Patrick Dupre wrote:
>> On Thu, 22 Jan 2009, Craig White wrote:
>>
>>> On Fri, 2009-01-23 at 02:36 +0000, Patrick Dupre wrote:
>>>> On Thu, 22 Jan 2009, Craig White wrote:
>>>>
>>>>> On Fri, 2009-01-23 at 02:19 +0000, Patrick Dupre wrote:
>>>>>> On Thu, 22 Jan 2009, Craig White wrote:
>>>>>>
>>>>>>> On Fri, 2009-01-23 at 01:00 +0000, Patrick Dupre wrote:
>>>>>>>> On Thu, 22 Jan 2009, Panu Matilainen wrote:
>>>>>>>>
>>>>>>>>> On Wed, 21 Jan 2009, Patrick Dupre wrote:
>>>>>>>>>
>>>>>>>>>> Hello,
>>>>>>>>>>
>>>>>>>>>> For a reason that I ignore my database is totallt mess up.
>>>>>>>>>> rpm --rebuilddb only rebuild iy partially.
>>>>>>>>>> The packages are installed, but rpm --rebuilddb does not see them.
>>>>>>>>>> How can I recover them without resintalling them manually ?
>>>>>>>>>
>>>>>>>>> Find the latest intact /var/log/rpmpkgs* file (ie one that got generated
>>>>>>>>> before the db got corrupted, file size should be a good indicator) and copy
>>>>>>>>> it somewhere safe, say /root/rpmpkgs.backup. Now you should be able to make
>>>>>>>>> fairly good recovery with something like:
>>>>>>>>>
>>>>>>>>> # mv /var/lib/rpm /var/lib/rpm.busted
>>>>>>>>> # mkdir /var/tmp/download; cd /var/tmp/download
>>>>>>>>> # yumdownloader `sed -e "s/.rpm$//g" /root/rpmpkgs.backup`
>>>>>>>>> # rpm -Uvh --notriggers --noscripts --justdb *.rpm
>>>>>>>>>
>>>>>>>>> The question of course is, what got the database corrupted to begin with.
>>>>>>>>> Did anything out of the ordinary happen at that time, like /var getting full?
>>>>>>>>> Segfaults logged in /var/log/messages*? What filesystem is /var on?
>>>>>>>>>
>>>>>>>>> - Panu -
>>>>>>>> It just end up with disk full !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
>>>>>>> ----
>>>>>>> you have to fix that - there's no way you can have a working software
>>>>>>> package system with a full disk - it just gets corrupted.
>>>>>>>
>>>>>> Of course, I did it !!!!!!
>>>>> ----
>>>>> maybe you don't have enough space yet...
>>>>>
>>>>> what's output of...
>>>>>
>>>>> df -h
>>>>>
>>>> /dev/sdc5 2.9G 1.8G 961M 66% /
>>>> /dev/mapper/VG1-usr 6.9G 4.1G 2.5G 63% /usr
>>>> /dev/mapper/VG1-usr_lib
>>>> 6.0G 2.0G 3.7G 35% /usr/lib
>>>> /dev/mapper/VG1-usr_local
>>>> 5.0G 1.8G 3.0G 38% /usr/local
>>>> /dev/mapper/VG1-usr_src
>>>> 5.0G 1.4G 3.4G 29% /usr/src
>>>> /dev/mapper/VG1-tmp 2.0G 263M 1.7G 14% /tmp
>>>> /dev/mapper/VG1-home 8.9G 4.9G 3.6G 58% /home
>>>> /dev/mapper/VG1-iso_image
>>> ----
>>> OK - small hard drive is killing you but if this doesn't work...
>>>
>>> rm -fr /var/lib/rpm/__*
>>> rpm --rebuilddb
>>>
>>> then your only hope for fixing this would be to follow the instructions
>>> here...
>>>
>>> http://www.rpm.org/wiki/Docs/RpmRecovery
>> OK, but /usr/lib/rpm/rpmdb_sta is not part of rpm for fedora !
>> Regards
> ----
> indeed - they seem to have removed the db4 utilities from rpmdb
>
> even worse, I installed db4-utils package and ran...
>
> # cd /var/lib/rpm
> # db_dump Packages
> db_dump: Program version 4.7 doesn't match environment version 4.5
> db_dump: DB_ENV->open: DB_VERSION_MISMATCH: Database environment version
> mismatch
>
> which means that I can't use db4-utils to do anything with rpmdb on
> Fedora 10
>
> and my guess is that you don't have enough space in /var to follow
> Panu's suggestion of using the logs to download the packages all over
> again to recreate the db (perhaps /home has enough space). I'd follow
> his suggestions except I would operate in a directory under /home
> because of disk space concerns.
>
I agree
--
---
==========================================================================
Patrick DUPRÉ | |
Department of Chemistry | | Phone: (44)-(0)-1904-434384
The University of York | | Fax: (44)-(0)-1904-432516
Heslington | |
York YO10 5DD United Kingdom | | email: pd520 at york.ac.uk
==========================================================================
More information about the fedora-list
mailing list