Set a depot location for multiple file systems or directory paths
Distribute depot data across multiple paths or file systems.
Be aware that this involves more work because:
-
Each depot must have the
Mapfield changed. -
File system management is more complex and there is risk of one or more file systems not being mounted.
-
Replica, edge and standby servers must have the directory structures denoted in the depot's
Mapfield.
Run the command:
p4 -ztag depot -o depot
and the output shows the filesystem path where a depot's versioned files are stored. See the Map field in that depot's specification (line 5).
... Depot depot
... Date 2011/05/16 15:03:40
... Description Default depot
... Type local
... Map depot/...
By default, the depot directory location is given as a path relative to the P4ROOT directory and is named the same as the depot. However, this location can be changed and mapped to either a different path relative to P4ROOT, or to an absolute path outside of P4ROOT.
Changing a depot directory
-
Make a backup all depot directories.
-
Prevent users from accessing the depots while moving them. Set protections to prevent write access by entering the p4 protect command:
Add the following mappings at the end of the Protections field:
list user * * -//...
list group * * -//...
super user usernameOfSuperUser * //... -
Get a list of all existing depots:
p4 -ztag depots -
For each depot reported, the map field gives the current location of the depot directory.
-
Copy each depot directory from its existing location to its new location.
-
Update the map field of each depot specification by running the
p4 depot depotNamecommand.Replace the value of the
MapfielddepotName/...bypath/depotName/...(wherepathis the full path of the new location where thedepotNamedirectory is located. For example:Map: depot1/...to:
Map: E:\Users\perforce\depot1\...If P4 Server is being run under Windows, include the drive letter as a part of the path and make sure that the path ends with a forward or backslash (
/) and the Perforce ellipses wildcard (...) of three dots. -
Run the command
p4 verify -q //depot1/...wheredepot1is replaced by the depot moved. -
Use
p4 protectto remove the mapping protections you added in Step (2). -
Restart P4 Server.