1

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!

1 Answers1

1

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

Samwise
  • 68,105
  • 3
  • 30
  • 44
  • Thanks! I'm not very knowledgeable when it comes to commands on both the Linux server and the ones on P4V. I think it would be easier to move the server root, what would you type exactly in the Linux server to move the root from dev/md1 to dev/md2? Once that is done, what would you type in P4V to let it know where the root has been moved? Thanks again! – Maxime Vezina Apr 06 '21 at 17:22
  • If you're not knowledgeable on Linux you might want to rethink hosting the server on Linux -- you can "host" a server on your local machine very easily! To move a directory on Linux use the `mv` command (google "linux move directory" for more info). You can't change P4ROOT from P4V; you'll need to modify it in the server-side configuration that you set up when you set up the server (it's either the "-r" flag in some startup script or a `P4ROOT` value set in some configuration file -- I don't know how you set up your server). – Samwise Apr 06 '21 at 18:52
  • Thanks! I learned a bunch of commands on Linux and tested them in my server using PuTTY. From what I see, my Perforce root is in a directory called /perforce_depot, which is located at the root on my server. Inside it, I see my depot (/perforce_depot/depot). I'm currently trying to move to P4ROOT to /home instead, which seems to be on the right partition. I ran the command line `p4d -r /home`, but it says `Perforce server error: open for write: journal: Permission denied`. Do you know how I can fix this error and successfully change P4ROOT? Thanks! – Maxime Vezina Apr 07 '21 at 17:16
  • There are two problems here: it sounds like you might not have permissions to `/home`, and you also don't want to just start up a second `p4d` instance (rather you just need to change the startup script that launches your current p4d instance -- you'll need to try to remember how you set up the "p4d" command to run originally and make the change in that same place). – Samwise Apr 07 '21 at 20:23
  • 1
    I see! I followed your advice and in the end, I decided to go with hosting the server on my machine on Windows. Thanks for your help, really appreciate it. For those who search for the answer for this issue, you can still ask here and I'm sure you'll get great help! Good luck – Maxime Vezina Apr 08 '21 at 19:28