If you want to create a new partition on a linux server then you have to follow the following steps :
- Login to your linux server with root access which is provided by your hosting provider.
- Use the following command to find out the total number of partitions which are already created on your linux server.
after using the command you get the following details :
Disk /dev/sda: 499.5 GB, 499558383616 bytes
255 heads, 63 sectors/track, 60734 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 653 5245191 83 Linux
/dev/sda2 654 3713 24579450 82 Linux swap / Solaris
/dev/sda3 3714 6324 20972857+ 83 Linux
/dev/sda4 6325 60734 437048325 5 Extended
/dev/sda5 6325 8935 20972826 83 Linux
If you need a 1000MB partition then you follow the below steps :
Type n for new partition and specify the cylinder size as +1000M then
Type p to find new partition
Type w for save
Then use the following command
After creating the partition you have to format that.
#mke2fs -j /dev/sdaX
The “X” indicate your created partition number.
Create that particular directory where you wish to point your new partition.
#mkdir -p /new
you have to point your new partition to that particular directory with the below command.
#mount -t ext3 /dev/sdaX /new
If you want to save these setting permanently then utilize the below command.
/dev/sdaX /new ext3 defaults 0 0
save and quite the fstab file.