[p4] Separating depot from DB's
Jeff A. Bowles
jab at pobox.com
Fri May 4 06:22:43 PDT 2007
Steve's right.
A good rule of thumb, by the way, to remember checkpoint and
journal numbering:
checkpoint.1002 = checkpoint.1001 + journal.1001
checkpoint.1003 = checkpoint.1002 + journal.1002
checkpoint.1004 = checkpoint.1003 + journal.1003
The way to read this is, "the database created from a restore
of checkpoint.1002 is the same content as a database created
from 'restore of checkpoint.1001 and then applying journal.1001".
(If you want to test this assumption, restore the checkpoint.1002
into area AA, restore checkpoint.1001+journal.1001 into area BB,
and then checkpoint each and compare the resultant checkpoints.
The data in the new checkpoint files should be the same, except
for perhaps a user update time and perhaps the checkpoint counter
itself.)
Note that Steve's point about checkpoints (checkpoint.xxx and
journal.xxx+1) is completely consistent with this.
Steve did not mention it, but I would be very cautious about
resetting P4ROOT while a server is running.
I also assume that you have carefully considered where you are
storing your checkpoint/journal and it is not anywhere close
(physically or logically) to the db.* files. Disk controllers fail,
meteorites can smash through the ceiling of your computer
room and destroy the RAID, etc. ;-)
-Jeff Bowles
On 5/4/07, Stephen Vance <steve at vance.com> wrote:
> Benjamin --
>
> You can find more detail on why the server did not start in your log
> file. Normally, that's in your P4ROOT.
>
> Also, I would recommend setting the P4ROOT variable on a per-service
> basis rather than system wide. This is pedantic if you are only ever
> going to run one server, but is essential if you ever run multiple
> server instances. I believe that this is how Perforce defined P4ROOT to
> start, as well, but I don't remember for sure. To do this, you do 'p4 -S
> <servicename> set P4ROOT="D:\" where <servicename> is "Perforce" in the
> default installation.
>
> If I wanted to move my depots as you are doing, here's how I would
> approach it. First, I would redefine my depots so that their root was an
> absolute path, rather than a relative one. To do this, change your "Map"
> entry to the full path name, something like "E:/P4/depot/...". Then I
> would checkpoint, stop the server, change the P4ROOT, move the old db.*
> files someplace out of the way (keep them for safety, but this helps you
> verify that the server is running from where you want), copy the license
> file, restore from checkpoint and test. Also, you would use
> checkpoint.xxx and journal.xxx+1, but it's only necessary to use the
> checkpoint if you stop the server before checkpointing.
>
> Hope this helps,
> Steve
>
> Benjamin Nias wrote:
> > Hi all,
> >
> >
> >
> > I have a P4 server running Server 2003 with an attached RAID Array for
> > the depot. Currently P4ROOT set to E:\P4 (a logical drive on the RAID).
> >
> >
> >
> > I have a separate logical drive on a directly attached RAID (D:\) that
> > has 10K drives. I wish to run P4 so that our depot lives in it's current
> > location on E:\P4 but the .db's are held on D:\.
> >
> >
> >
> > I tried to do this this morning with the following:
> >
> >
> >
> > E:\P4> p4d -jc
> >
> >
> >
> > E:\P4> p4 set -s P4ROOT="D:\"
> >
> >
> >
> > E:\P4> p4 admin stop
> >
> >
> >
> > E:\P4> p4d -r d:\ -jr checkpoint.xxx journal.xxx-1
> >
> >
> >
> > This produces and error of "journal is out of sequence". I've doubled
> > checked this and the checkpoint and journal files specified are indeed
> > in sequence and the ones just generated by my -jc command.
> >
> >
> >
> > Then, when restarting the server I get
> >
> >
> >
> > Connect to server failed; check $P4PORT.
> >
> > TCP connect to 1666 failed.
> >
> > connect: 1666: WSAECONNREFUSED
> >
> >
> >
> > When this failed I decided to set the root back to the original folder
> > so my users could continue whilst I made this post. However when
> > invoking -jr to the original location, I got the same error. I then
> > copied back the backed up .db's from before my checkpoint and all worked
> > fine.
> >
> >
> >
> > My questions are:
> >
> >
> >
> > Am I making the right steps to make the migration work?
> >
> > Am I being thrown off by a possible corrupted journal file as the -jr
> > didn't work even when P4ROOT was set to the original location?
> >
> >
> >
> > Cheers,
> >
> >
> >
> >
> >
> > Benjamin Nias
> >
> > Systems Administrator
> >
> > Rocksteady Studios Limited
> >
> >
> >
> > http://www.rocksteadyltd.com <http://www.rocksteadyltd.com/>
> >
> > desk +44 (0)20 7284 3100
> >
> > fax +44 (0)20 7284 3100
> >
> > mobile +44 (0)7711 554407
> >
> >
> >
> > The information contained in, or attached to, this e-mail, may contain
> > confidential information and is intended solely for the use of the
> > individual or entity to whom they are addressed and may be subject to
> > legal privilege. If you have received this e-mail in error you should
> > notify the sender immediately by reply e-mail, delete the message from
> > your system and notify your system manager. Please do not copy it for
> > any purpose, or disclose its contents to any other person. The views or
> > opinions presented in this e-mail are solely those of the author and do
> > not necessarily represent those of the company. The recipient should
> > check this e-mail and any attachments for the presence of viruses. The
> > company accepts no liability for any damage caused, directly or
> > indirectly, by any virus transmitted in this email. Rocksteady Studios
> > Limited is a company registered in England and Wales with company number
> > 5280625 at 7-8 Eghams Court, Boston Drive, Bourne End, Buckinghamshire,
> > SL8 5YS. Our postal address is Unit 601 Highgate Studios, 53-79 Highgate
> > Road, London, NW5 1TL.
> >
> >
> >
> > _______________________________________________
> > perforce-user mailing list - perforce-user at perforce.com
> > http://maillist.perforce.com/mailman/listinfo/perforce-user
> >
> >
> _______________________________________________
> perforce-user mailing list - perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
>
--
---
Jeff Bowles - jab at piccoloeng.com
More information about the perforce-user
mailing list