Skip to main content

expand ext4 partition

It is very ease to expand ext4 partition with growpart.

  1. Backup current partition table

sfdisk -d /dev/sdb > sdb_partition_bak.dmp

  1. Execute dry-run to see what will be changed. If you don't have this tool. Run apt-get install cloud-utils

growpart -N /dev/sdb 1

  1. If everything is fine

growpart /dev/sdb 1

  1. Resize file system. It may take 10 seconds

resize2fs /dev/sdb1

  1. Check the new size

df -h