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 Map field 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 Map field.

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).

Copy
... 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

  1. Make a backup all depot directories.

  2. 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 * //...

  3. Get a list of all existing depots:

    p4 -ztag depots

  4. For each depot reported, the map field gives the current location of the depot directory.

  5. Copy each depot directory from its existing location to its new location.

  6. Update the map field of each depot specification by running the p4 depot depotName command.

    Replace the value of the Map field depotName/... by path/depotName/... (where path is the full path of the new location where the depotName directory 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.

  7. Run the command p4 verify -q //depot1/... where depot1 is replaced by the depot moved.

  8. Use p4 protect to remove the mapping protections you added in Step (2).

  9. Restart P4 Server.