[prev in list] [next in list] [prev in thread] [next in thread]
List: rpm-devel
Subject: Re: Eliminating --rebuilddb by doing lazy secondary index re-creation
From: Jeff Johnson <n3npq () mac ! com>
Date: 2009-12-14 5:29:41
Message-ID: B8DF0520-474E-4D76-9A58-24CD5B032A0F () mac ! com
[Download RAW message or body]
On Dec 13, 2009, at 10:57 PM, Jeff Johnson wrote:
>
> I'll figger the db_recover -t CCYYMMDDhhmm.ss command in the next
> version
> of the script.
>
Here's the output:
$ sudo sh runrecover
db_checkpoint: checkpoint begin: Mon Dec 14 00:20:48 2009
db_checkpoint: checkpoint complete: Mon Dec 14 00:20:48 2009
7.31user 4.98system 0:18.68elapsed 65%CPU (0avgtext+0avgdata
0maxresident)k
0inputs+7892792outputs (402major+53677minor)pagefaults 0swaps
Finding last valid log LSN: file: 440 offset 4777571
Recovery starting from [427][53807]
Recovery complete at Mon Dec 14 00:21:47 2009
Maximum transaction ID 80000047 Recovery checkpoint [440][4777515]
1.15user 1.77system 0:09.92elapsed 29%CPU (0avgtext+0avgdata
0maxresident)k
0inputs+5097512outputs (846major+15398minor)pagefaults 0swaps
db_checkpoint: checkpoint begin: Mon Dec 14 00:21:47 2009
db_checkpoint: checkpoint complete: Mon Dec 14 00:21:47 2009
Note that using db_recover is actually _FASTER_ than
doing --rebuilddb.
Here's the runrecover script:
----------------------
#!/bin/sh
dbg= # echo
rpm=/usr/bin/rpm
dbpath="`$rpm -E '%{_dbpath}'`"
rpmbin="`$rpm -E '%{_usrlibrpm}/bin'`"
db_archive="$rpmbin/db_archive -h $dbpath"
db_checkpoint="$rpmbin/db_checkpoint -h $dbpath"
db_recover="$rpmbin/db_recover -h $dbpath"
$dbg $db_checkpoint -1v
$dbg $db_archive -dv
/usr/bin/time $rpm --rebuilddb
tags="`$rpm -E '%{_dbi_tags}' | tr ':' ' '`"
tstamp="`date '+%Y%m%d%H%M.%S'`"
$dbg sleep 30
for tag in $tags; do
[ ".$tag" = ".Packages" ] && continue
[ ".$tag" = ".Seqno" ] && continue
$dbg rm -f $dbpath/$tag
done
$dbg /usr/bin/time $db_recover -ev -t $tstamp
$dbg $db_checkpoint -1v
$dbg $db_archive -dv
----------------------
I do believe its almost time to start honking
Full catastrophic rpmdb database recovery with
Transactionally Protected Package Management
The Debian Borg can keep their flat files forever .... ;-)
73 de Jeff
______________________________________________________________________
RPM Package Manager http://rpm5.org
Developer Communication List rpm-devel@rpm5.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic