I’ve just added a new disk to my Linux Virtual Machine hosted on VMware and now I want to partition it. I’ve received 20 Gb of disk space and I’ll create two 10 Gb partitions on the drive. To achieve these results I’ll use the fdisk command.
You will need to identify the newly added disk, if you have problems seeing it than maybe you need to force a device discovery operation described here.
Once you’ve identified the new disk run the following command:
Now press “p” to view the disk partition table:
To create a new partition press “n” and select “p” for the primary partition. Once you’ve selected the first primary partition (1), the wizard will prompt you for the first and last cylinder of the new partition. You can use the default start cylinder and the +10G for the last one. Now follow the same procedure to create a second partition, but make sure to select the second primary partition (2). We know that the disk has 20Gb so you can directly use the default first and last cylinders:
Now verify the partition table by pressing “p“. You should be able to see the two partitions created on the disk. In the end make sure to press “w” to write changes made on the disk: