create partitions

Add a new virtual disk.
Verify the available space.
# cat /proc/partitions
Into proc directory is all the information about what is happening into kernel.
sdb is the new device used to create partitions.
On sda there are 2 partitions: sda1 and sda2.
Create partitions with fdisk:
# fdisk /dev/sdb
type “m” for help. There is menu. The important are:
“p” print the current layout…partition table
“n” – add a new partition.
“w” – write the information to disk.
use “p” to create partition.
The size of space is 1073 MB which have 2097152 sectors. Every sector is 1/2 KBytes (512 bytes). The sectors will be used for creating partitions on disk
type “n” for new.
!!!!!! Always use “p” for primary partition unless want to create more than 4 partitions on disk.
Choose default by press for type, number and first sector. 1MB is used to store metadata.
Size for last sector. The size +size100M. If not “M”, it will choose automatically as sector and is too small.
Write changes to disk with “w”.
Verify:
# cat /proc/partitions
Now have to create file-system. If there is an error with “device is busy”, reboot the system.