Interview Prep/Linux/Storage & Memory

How do you grow a cloud root disk that is a plain partition (no LVM)?

IntermediateConceptStorage & Memory
Answer

After enlarging the volume in the cloud console:

lsblk                                  # disk bigger, partition not
sudo growpart /dev/nvme0n1 1           # from cloud-guest-utils / cloud-utils-growpart
sudo xfs_growfs /                      # XFS
sudo resize2fs /dev/nvme0n1p1          # ext4
df -h /

Note the space between disk and partition number in growpart.

All Linux questions Roadmap: Linux

More on Storage & Memory