google-compute-enginejupyterhubgoogle-compute-disk

Set up zonal persistent disk - Google Compute Engine


I am running a JupyterHub server on a Google Cloud Compute instance and recently had an issue where I ran out of hard drive space, which caused the JupyterHub server to seize up with 500 errors etc. I should mention that I am using The Littlest JupyterHub to run the JupyterHub server. I had a look at options to expand the hard drive space of my instance and the recommended action seemed to be to attach a zonal persistent disk. I followed Google's instructions and it looks to be attached as expected. See output of df -h below, which suggests that it has been mounted as expected.

Output of df -h suggests that it has been mounted as expected

However, I can't work out if this new hard drive is actually being used for storage by the VM / JupyterHub server. I'm worried that as I continue to use the JupyterHub server it will just fill up the original 20GB /dev/sda1 disk again, without using the new 200GB /dev/sdb for overfill. How can I check to see if the zonal persistent disk will be used as expected, to avoid JupyterHub seising up because there is no hard disk space left?

I really am not an expert at this, so apologies in advance if this is a dumb question.

Thanks in advance!


Solution

  • I think the easiest way to resolve this issue is to resize your filesystem /dev/sda1 You can check this document for more information.

    1. Go to the VM instances page.
    2. Stop your instance.
    3. Go to the Disks page to see a list of zonal persistent disks in your project.
    4. Click the name of the disk that you want to resize.
    5. On the disk details page, click Edit.
    6. In the Size field, enter the new size for your disk.
    7. Click Save to apply your changes to the disk.
    8. Start again your instance.

    I reproduce it in my own instance This is my the Filesystem before the change enter image description here

    After resize the my disk:

    enter image description here

    Another option for your case is to Resizing the file system and partitions on a zonal persistent disk in order that the operating system can access the additional space.