Skip to content

Expand a partition and a filesystem on Debian

  1. Backup the current partition table:
sfdisk -d /dev/sda > sda_partition_bakup.dmp
  1. Get details about the changes to the partition table to apply (dry-run) to see what will be changed:
growpart -N /dev/sda 1
  1. Apply changes to the partition table:
growpart /dev/sda 1
  1. Resize the file system:
resize2fs /dev/sdb1
  1. Check the file system size:
df -h