Full Video Transcript
Hi, everybody. I'm Jase Lindgren, a solutions engineer at Perforce. And today I'm going to be talking about how to expand your storage on a Linux Helix Core server.
So specifically, I'm going to be doing this for our Enhanced Studio Pack, which is our template, our cloud formation for AWS. These principles apply to other Linux installations, but some of the steps for how you would expand those volumes or which volumes they are might be different if you're doing a custom install, but hopefully this is helpful for you either way.
So first of all, how do we know if we need to do this?
Let's take a look at this in action. I'm connected to my server right now. And if I come here and I try to submit this file to my ESP-tips depot, I'll hit submit and then submit. And I get this error that says the file system ESP-tips only has 2.1GB free. But the server configuration requires at least 5GB available.
By default, this is set up so that each of the volumes needs to have at least 5GB available in order to accept any submissions. And that's to prevent you from trying to submit something that won't fit on disk and then ending up with partial files or data corruption, or even a system that just won't work at all, which would be bad.
So when you get this message, what it means is that you have to expand the amount of space on that particular volume. In this case, it says the file system ESP-tips. Now, that's the name of the depot that I'm trying to submit to.
If this error gives you the name of your depot, that means that the volume you need to expand is the one where the depot data goes. I'll show you that in a second.
There are two other errors that you might get here. One says the file system P4ROOT. That means that it is the /hxmetadata volume that needs to get expanded. Or you might see one that says the file system P4JOURNAL only has a certain amount free. That means the /hxlogs volume.
So let's go to our AWS console and take a look at this. So if I go to my instances, this is my server that I have here. This is my P4D Helix Core server. And if I go to the storage tab down here, I will see that I have four different storage volumes mounted to this. One of these, this first one here is our root device.
And you can tell that because the name matches right here. And then I have three others, and these are the depot volume, the metadata volume, and the logs volume. So let's actually connect to our instance and see those in the command line. So I'll hit connect up here, and I'm going to use the session manager for simplicity today, but you could also SSH in yourself.
And when I come to this prompt here, if I type the command df And then I'm going to add -h to make the numbers human readable, instead of just bytes. So, df -h.
What I'll see here is the different file systems, on the left. The size of those file systems, the amount that's used for each, the amount that's available, and then what percentage of usage that is, as well as this mounted on, which is very important here.
The three that I want to draw your attention to are the three that start with HX, those three down here. So, we have /hxlogs, /hxmetadata, and /hxdepots.
So depots, as I mentioned, is if you see the name of your depot is in that error message, that means it's /hxdepots. And this volume is where the actual file data is stored.
So this is going to be generally the largest of all of your volumes, usually by a large margin. /hxmetadata is the one that it calls P4ROOT in that error message, and /hxlogs is the one that it calls P4JOURNAL in that error message.
So what you'll see here is that I have a 10GB drive for my logs, a 10GB drive for my metadata, and a 100GB drive for my depots.
And you'll see here that I have used 98GB out of that 100GB of my HX depots, which is why when I got that error message, it gave me the name of my depot. So, what I need to do is, I need to expand this storage volume.
In order to do that, I'm going to come in here, back to my instance. I'm gonna go to that storage tab.
In this case, it's easy to know which drive is the right one because the size is different from the others, but if it is one of these two that are the same size, one quick tip as a way you can find this, if your installation is an Enhanced Studio Pack, if not, you'll have to figure out which one is which, because you're the one that set that up yourself.
But if I go into one of these two volumes. And I click on it here. Down in the Tags field, there's one that says VolumeHxmetadata, and that other one will say VolumeHxlogs. So that's just a quick way that you can verify and make sure that you're looking at the correct one. But in our case, I'm going to come here to this depot volume, which is our largest one.
I'm going to click on it so that this checkbox is selected. And then I'm going to come up here to Actions, Modify Volume, and you can see here the volume type is GP3, the size is 100GB, and then IOPS and throughput are on these default values. In this case, I'm going to give it more size. Let's say I want this to go up to 150.
I'm going to say Modify, And it'll tell me that this might take a few minutes to happen. And it's also going to give me this warning that a lot of people miss. If you're increasing the size of the volume, you must extend the file system to the new size of the volume. And it has some links to how to do that, but I'm going to show you that in just a second here.
So I just hit expand there, and I'm going to go back this way to where it's filtered. I'm going to hit refresh. And if I come over here, I'll see volume state in use, optimizing. You actually can interact with this drive the whole time, which is one of the amazing things about the way AWS manages their drives. You can expand their size while continuing to use them. It's pretty wild.
So I'm going to come back in here to my terminal first of all, you'll notice if I type df -h nothing has changed. Everything's still the same. And that's because you have to expand the file system.
So what I'm going to do here is I'm going to type the command lsblk. This is to list block devices, lsblk. And what you'll notice here is that this HX depots device is showing up as having 150GB, but the file system is still only a hundred gigs. And that's why I'm not seeing that extra space yet.
So on the Enhanced Studio Pack, the type of file system here is XFS. So This command might be different if you set this up yourself on a different distribution or using a different type of file system, but assuming that you are using our cloud formation, the Enhanced Studio Pack, you will type sudo and that's just because we need elevated permissions to do this and then xfs_growfs because we're going to grow our file system and then we're going to type in the mount point.
So in our case, we're doing this /hxdepots right here. I'm going to hit enter and down at the bottom, it says data blocks changed from some number to some higher number. So now if I type df -h, I will see. I now have 150 gigs showing up for the size, and now I can see I have 52 gigs available.
So, if I go back here, say OK, now I'm going to try submitting this again. I hit submit, and it goes through without any problems because I have enough space now.
Hopefully this was helpful for you. Let me know if there are any other things you're running into that you would like some quick videos like this about.
Thank you so much!