Google cloud - expand disk space

Before posting something, READ the changelog, WATCH the videos, howto and provide following:
Your install is: Bare metal, ESXi, what CPU model, RAM, HD, what EVE version you have, output of the uname -a and any other info that might help us faster.

Moderator: mike

Post Reply
Grrrshark
Posts: 9
Joined: Sun Apr 25, 2021 10:58 pm

Google cloud - expand disk space

Post by Grrrshark » Sun Apr 25, 2021 11:04 pm

Hi All,


I am using eve-ng pro on google cloud and really enjoying everything. However, I did not add enough disk space when building out my instance, and now looking to increase it. Is there any guide specific to google cloud? I have tried to add a disk, but it seems the VM is not detecting the new space.

I really appreciate any help you can provide.

Uldis (UD)
Posts: 5067
Joined: Wed Mar 15, 2017 4:44 pm
Location: London
Contact:

Re: Google cloud - expand disk space

Post by Uldis (UD) » Mon Apr 26, 2021 1:07 pm

you must plan your disk before my dear, and set it min 200-300gb
expand current hdd, Iam not sure if linux can do it, make expand partitons, maybe yes

Grrrshark
Posts: 9
Joined: Sun Apr 25, 2021 10:58 pm

Re: Google cloud - expand disk space

Post by Grrrshark » Sat May 01, 2021 1:28 pm

Hi Uldis,

Thank you for the response. I can get the disk to expand, I guess, but my issue is with the root file system not resizing with the new space. Worst case, the instance itself is pretty easy to recreate with a new disk, thankfully.

All the best.

Grrrshark
Posts: 9
Joined: Sun Apr 25, 2021 10:58 pm

Re: Google cloud - expand disk space

Post by Grrrshark » Thu May 19, 2022 7:59 pm

Old bump just in case any others are in the same boat and need to resize the google disk. I finally reached my disk limit and did not want to rebuild it. Follow these steps, and you should be able to resize the disk.

1. Most important, I recommend taking a snapshot of your current disk.
2. Resize the disk in google cloud GUI or CLI to the desired size.
3. Log in via SSH.
4. fdisk --list
5. If you see an error similar to GPT PMBR size mismatch (62914559 != 83886079) will be corrected by w(rite) for the disk.
6. Next, run gdisk /dev/sda (assuming sda is the disk)
7. Next, hit w to write and say yes. to proceed.
8. Reboot the instance and log into ssh again.
9. Now when you run the fdisk --list, you should see the disk updated to the correct size, and all that is left is to resize the partition.
10. Follow this guide from google to resize the root partition, and you are good to go (https://cloud.google.com/compute/docs/d ... stent-disk)
11. Test it out and if all is well you can do another snap of the resized disk.

Post Reply