Get Partition Information
To get the block device information using the lsblk command, run:
lsblk
As stated earlier, we can also use the fdisk command to get the block device information.
sudo fdisk -l
To check under which partition the home directory is mounted, use the df command. In my case, it is mounted under /.
df -h /home
Create New Partition
Let’s create a new partition from the new drive where the home partition will be mounted. I will be using the fdisk utility to create a partition. In my case, I will add partition on /dev/sda disk.
sudo fdisk /dev/sda
Type “n” to create a new partition.
It will prompt you to choose the partition type, partition number, first sector, and last sector.
Type “w” and it will write the changes to the partition table.
Now verify if the new partition (i.e. sdb1 -> 10G) is created by listing the block device information with the lsblk command:
lsblk /dev/sda
Format and mount the Partition
sudo mkfs.ext4 /dev/sdb1
Now the partition can be mounted to any directory as you wish. Since we are going to mount this directory temporarily, I am choosing /mnt directory.