Let's say I have this virtual machine running:
[root@centos ~]# fdisk -ul
Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders, total 16777216 sectors
Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 63 417689 208813+ 83 Linux
/dev/sda2 2522205 13799834 5638815 83 Linux
/dev/sda3 13799835 16771859 1486012+ 8e Linux LVM
/dev/sda4 417690 2522204 1052257+ 5 Extended
/dev/sda5 417753 2522204 1052226 82 Linux swap / Solaris
How can I know how much free space left for more partitions on the disk?
v
command offdisk
verifies the partition table and reports such space as well, e.g.Remaining 239 unallocated 512-byte sectors
in my case.v
command, not the-v
command line option, i.e. you need to startfdisk /dev/sda
in interactive mode and then typev<ENTER>
.