Prerequisites
- Existing partition that you know the name. To check the name, run cat /etc/fstab.
- The partition you want to resize have to be the last partition on a particular disk.
- Note that the partition not in use.
Warning
All data will be erased on the partition.
Procedure
Suppose we are re-partitioning /dev/vdb1
- Remove the partition from fstab
vi /etc/fstab
- Unmount the partition
umount /dev/vdb1
- Run
fdisk /dev/vdb1
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them. Be careful before using the write command.
Command (m for help):