Configuring a replica with shared archives
Normally, a
replica server (or an edge server) retrieves both its metadata and file archives from the master server (or the commit server) on the
user-defined pull interval. For example p4 pull -i 1
When a replica server (or edge server) is configured to share the same physical archive files as the master server (or the commit server), the replica accesses the archives directly without requiring server that is the P4TARGET server to send the archives files to the replica (or edge). This is true whether the replica and master are running on the same machine, or sharing storage over a network shared storage. However, if shared storage is over a network, network latency affects performance.
To share archives, set the lbr.replication
configurable to shared
:
- only metadata is retrieved on the pull interval
- the "shared" archive files are not retrieved until requested by a client
- new files are not automatically transferred
- purged files are not removed
Shared archives can form part of a High Availability configuration.
Sharing archives is supported between a master server and a replica server, or between a commit server and an edge server. Replica servers can't share archives with other replica servers.
When archive files are directly shared between a replica and master
server, the replica must have
set
to shared. Otherwise, the files in the archive might be corrupted.lbr.replication
To configure a replica to share archive files with a master
-
Ensure that the clocks for the master and replica servers are synchronized.
Nothing needs to be done if the master and replica servers are hosted on the same operating system.
Synchronizing clocks is a system administration task that typically involves using a Network Time Protocol client to synchronize an operating system’s clock with a time server on the Internet, or a time server you maintain for your own network.
-
If you have not already done so, configure the replica server as a forwarding replica.
-
Set
lbr.replication
. - Restart the replica, specifying the share archive location for the replica’s root.
Result
The result of this configuration:
- archive file content is only retrieved when requested, and those requests are made against the shared archives.
- no entries are written to the
rdb.lbr
librarian file during replication. -
commands that would schedule the transfer of file content, such as
p4 pull -u
andp4 verify -t
are rejected: -
if startup configurables, such as
startup.N=pull -u
, are defined, the replica server attempts to run such commands. Because the attempt to retrieve archive content is rejected, the replica’s server log will contain an error:Perforce server error: 2014/01/23 13:02:31 pid 6952 service-od@21131 background 'pull -u -i 10'
NoteFor upgrading, see Upgrading replica servers.
Your search for returned result(s).