Skip to content

Instantly share code, notes, and snippets.

@zhiguangwang
Last active May 10, 2021 04:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save zhiguangwang/3d02d154be9780f51be689b6002377f3 to your computer and use it in GitHub Desktop.
Save zhiguangwang/3d02d154be9780f51be689b6002377f3 to your computer and use it in GitHub Desktop.
Extending Linux file system after resizing EBS volume

Extend partition on root volume

sudo growpart /dev/nvme0n1 1

Extend file system on root volume

ext4

sudo resize2fs /dev/nvme0n1p1
@lemon-li
Copy link

lemon-li commented Feb 18, 2021

For volumes that have no partitions, Please execute only the command sudo resize2fs /dev/nvme0n1p1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment