what is it?
disk utility for formatting or partitioning a hard disk drive, or to delete different portions of it
resizing a partition
logical partition
sudo fdisk /dev/vda
Command (m for help): p
Disk /dev/vda: 40.53 GiB, 43504943104 bytes, 84970592 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xf7942c46
Device Boot Start End Sectors Size Id Type
/dev/vda1 * 2048 1050623 1048576 512M b W95 FAT32
/dev/vda2 1052670 84970591 83917922 40G 5 Extended
/dev/vda5 1052672 84970591 83917920 40G 83 LinuxCommand (m for help): d
Partition number (1,2,5, default 5): 2
Partition 2 has been deleted.Command (m for help): n
Partition type
p primary (1 primary, 0 extended, 3 free)
e extended (container for logical partitions)
Select (default p): e
Partition number (2-4, default 2):
First sector (1050624-84970591, default 1050624): 1052670
Last sector, +/-sectors or +/-size{K,M,G,T,P} (1052670-84970591, default 84970591):
Created a new partition 2 of type 'Extended' and of size 40 GiB.Command (m for help): n
All space for primary partitions is in use.
Adding logical partition 5
First sector (1054718-84970591, default 1054720):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (1054720-84970591, default 84970591):
Created a new partition 5 of type 'Linux' and of size 40 GiB.Command (m for help): x
Expert command (m for help): b
Partition number (1,2,5, default 5):
New beginning of data (1052671-84970591, default 1054720): 1052672
Expert command (m for help): rCommand (m for help): w