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

  1. Compute Engine> Disk
  2. Select the disk to be expanded
  3. "Edit" on the upper right
  4. Change the value of Properties> Size and click "Save"
  5. Connect with SSH and execute the following command
    1. sudo apt -y install cloud-guest-utils
    2. sudo growpart /dev/sda 1
    3. 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.
  6. As a result of the reboot, the available capacity has increased.

Recommended Posts

Disk expansion on Ubuntu 20.04.1 LTS on GCP Compute Engine
Apache2 on Ubuntu20.04 LTS
Building WebGIS on Ubuntu20.04 LTS
Record video on ubuntu18.04 LTS
Installing OpenMX on Ubuntu 18.04.5 LTS
Install raspi-config on Ubuntu 20.04 (LTS)
Install WordPress 5.5 on Ubuntu 20.04 LTS
Wake on Lan settings on Ubuntu 20.04.1 LTS
How to configure ubuntu to be used on GCP
How to install multiple JDKs on Ubuntu 18.04 LTS
KVM disk expansion
tmux on Ubuntu
Build Ubuntu 20.04 LTS desktop environment on Raspberry Pi 4 (+ Japanese)
Disk expansion when booting CentOS 8.2 of aarch64 on EC2