Maxime Vezina
Maxime Vezina

Reputation: 13

How to move Perforce to a different Hard Drive/SSD on Linux server

I recently bought a dedicated server that has 2x480GB SSD. I installed Ubuntu1604-desktop_64 on it, then installed Perforce on it following Michael Allar's tutorial : https://youtu.be/5krob9SlVu4. Everything went well, I populated the server with my files with P4V, but was surprised to see that I apparently only have 20GB storage.

By using PuTTY, I connected to the server and with the df -h command, here's what it shows me : Server space

From what I see, the Perforce server is on /dev/md1, and only has 20GB of storage. It seems it would be way better to have it on /dev/md2, that has 399GB available. Is there a way that I can transfer the Perforce server/depot to that drive instead?

Thank you!

Upvotes: 1

Views: 1999

Answers (1)

Samwise
Samwise

Reputation: 71454

You will need to log in to the server and move the actual files, and let Perforce know where you moved them to. The two directories you might be concerned with are:

  • the server root. This is defined by your P4ROOT environment variable, or the -r flag on the p4d startup command. The server root is where the database files (db.*) live. It's also by default where everything else lives, although in practice for best performance/reliability it's generally recommended to have the db on its own drive and configure checkpoints and archives to live elsewhere.

  • the depot(s). This is defined by the Map: field in the p4 depot spec. The depot is where actual file content lives (usually the bulk of the data in a Perforce server, and also infrequently accessed relative to the database -- it's pretty common to put the depot on a larger slower disk/RAID while having the db on an SSD). By default this is a relative path (and interpreted relative to P4ROOT), but you can set it to an absolute path.

Decide which of those you're moving, move it, and update the corresponding configuration (i.e. P4ROOT if you moved the server root, or the depot Map if you moved the depot).

Upvotes: 2

Related Questions