[OpenAFS] prdb.DB0 Database rebuilding ?

Jeffrey Hutzelman jhutz@cmu.edu
Fri, 19 Oct 2001 19:45:18 -0400 (EDT)


On Thu, 18 Oct 2001, Ted Anderson wrote:

> On Wed, 26 Sep 2001 11:04:58 +0200 Jean-Marc Chaton <jcn@austin.ibm.com> wrote:
> > * Hartmut Reuter [Tue, 25/09/2001 at 13:53 +0200]
> > > ~: translate_et 267275
> > > 267275 (pt).11 = database needs rebuilding
> > > 
> > 
> > My pts DB is in a bad state. How can one rebuild it (as suggested by
> > translate_et). 
> 
> I don't know the exact state of it, but there is a program called
> db_verify in the ptserver directory that has a -rebuild option.  This
> option is marked as CMD_HIDE so this is a hint that there may be
> problems using this feature, YHBW.  What it does is scan the database
> and writes out a list of commands that can be used to recreate the
> database using the prclient command.  So *roughly*, the steps would be
> to shutdown the ptserver, run db_verify -rebuild /tmp/prdb-rebuild.txt,
> then remove the prdb.* files, restart the ptserver (which should
> construct you a new, empty database), then run ptclient <
> /tmp/prdb-rebuild.txt.
> 
> Hopefully someone can elaborate on the current state of this tool and
> whether this *outline* of a rebuild procedure would actually work.

Several years ago, before the CMD_HIDE functionality even existed, I used
this basic process to move my PTS DB from AFS 3.2 running on sun4_mach
systems to AFS 3.3a running on SunOS 4.  It worked fairly well, except
that at least at that time prclient couldn't handle creating the magic
foreign cell groups and foreign users used by cross-realm support. 

If you're going to try it, make a copy of your pts database first, and
then compare the output of db_verify -rebuild on the new database with the
old one.


When are you getting this error?  Are you seeing any output from the
ptserver to stdout/stderr?