In this tutorial I’ll discuss about how to adding or create new partition disk in linux. on the case when we will to add new hardisk/ssd in system we need to create the partition and setup for partition type in system so that it can be used. The following are step by step to doing that.
On this exercise I’m has been to add two of new partition with 2GB space for each.
check the partition with lsblk command
As the shown image bellow, that exist two of new partition namely as sdb and sdc.
use cfdisk command for create new partition in sdb disk.
select the GPT label type, then press enter.
select New option in the button option for create new partition.
Press enter for make the partition size.
As the shown image bellow, the partition has been create as marked by information of partition UUID and partition type that are appears. then you can select Type of partition on the bellow option. you can move that with arrow keys.
As the example we can select Linux filesystem as the patition type.
Now, for save those partition changes, select Write option.
write yes for accept those disk changes.
Then select Quick option for quick form cfdisk.
use lsblk command for check disk partition. as the shown image bellow new partition has been created namely as sdb1.
format partition type on /dev/sdb1 as ext4
# mkfs.ext4 /dev/sdb1
use lsblk -fs command for check the /dev/sdb1 partition information.
# lsblk -fs /dev/sdb1
as the shown image bellow, the partition of /dev/sdb1 has been create as ext4 filesystem type and that has th UUID for those partition.
Next, create new directory named as /DATA1 and then mount /dev/sdb1 to /DATA1 directories.
Use df -h command for check partition size and mounting point in /DATA1 directory. as the following image the /DATA1 directory has mounting on /dev/sdb1 Filesystem.