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