Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save LeoHChen/9db61db6d8825a6b87e6728a00424086 to your computer and use it in GitHub Desktop.
Save LeoHChen/9db61db6d8825a6b87e6728a00424086 to your computer and use it in GitHub Desktop.
$ df -Th
Filesystem Type Size Used Avail Use% Mounted on
udev devtmpfs 7.7G 0 7.7G 0% /dev
tmpfs tmpfs 1.6G 776K 1.6G 1% /run
/dev/nvme0n1p1 ext4 291G 64G 228G 22% / <-- Notice how TYPE is ext4
# Go on AWS and use InstanceID to get to EBS storage, then increase the EBS storage.
# Once done, do the following
# check to make sure EBS upgrade is done with
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 93.9M 1 loop /snap/core/9066
loop1 7:1 0 18M 1 loop /snap/amazon-ssm-agent/1480
loop3 7:3 0 18M 1 loop /snap/amazon-ssm-agent/1566
loop4 7:4 0 93.8M 1 loop /snap/core/8935
nvme0n1 259:0 0 300G 0 disk
└─nvme0n1p1 259:1 0 300G 0 part / <---- This SIZE matches the disk SIZE
# Once done, grow the partition with
$ growpart /dev/nvme0n1 1
# Then resize part (works with ext4 file format)
$ resize2fs /dev/nvme0n1p1
# Then resize part (works with xfs file format)
$ xfs_growfs /dev/nvme0n1p1
# Check it is done with
$ df -Th
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment