Resizing existing MBR partition

From Notes to self
Jump to navigation Jump to search

The partition should be the last partition on the disk.

  • # umount /dev/vdb1
  • # fdisk /dev/vdb
Delete the partition and create a new one
  • # partx -u /dev/vdb1
  • # e2fsck -n /dev/vdb1
  • # reboot
  • # umount /dev/vdb1
  • # e2fsck -f /dev/vdb1
  • # resize2fs /dev/vdb1
  • # e2fsck -n /dev/vdb1
  • # mount /dev/vdb1