[GO] Disk expansion on Ubuntu 20.04.1 LTS on GCP Compute Engine
Premise
--As the document says, I took a snapshot before work just in case.
--The partition has not changed since the VM was created.
--See here for command execution.
work
- Compute Engine> Disk
- Select the disk to be expanded
- "Edit" on the upper right
- Change the value of Properties> Size and click "Save"
- Connect with SSH and execute the following command
- sudo apt -y install cloud-guest-utils
- sudo growpart /dev/sda 1
- sudo resize2fs /dev/sda 1
--I got an error due to busy or something and couldn't solve it.
--Since it is ext4, this seems to be fine, but even if I investigate and execute other commands, it does not solve.
--In the case of Amazon EC2 somewhere, I was running resize2fs in some configuration file and it was said that it would be solved by restarting, so I restarted.
- As a result of the reboot, the available capacity has increased.