In this guide, I will show how to add a new disk to an existing Linux server, create a partition and mount it to make it accessible.

Verify that the drive is installed and working properly if a new block level device is found when running lsblk:

You can run fdisk -l to see the disk list.

In my case, the primary OS drive is sda. The second drive sdb, which isn’t mounted and it’s an empty disk.

Create a mount point

mkdir /storage

You can name the folder as you want so.

Create a New Filesystem

Since the drive doesn’t have a filesystem, I can’t use it for storing files. To create a new filesystem on an empty volume, I will use the mkfs command:

mkfs -t ext4 /dev/sdb

Mount partition

Once formatting has been completed, now mount the partition with mount command.

mount /dev/sdb /storage/

Edit /etc/fstab

Make an entry in /etc/fstab file for permanent mount at boot time.

nano /etc/fstab

/dev/sdb /storage ext4 defaults 0 0

Verify the mount

Now you can reboot your server. The partition will be mount on the next boot.

As you can see the partition already mounted and ready to use.

You have successfully added the new disk to your Linux server.

If you have more than one new disks and you want to create a software RAID – check our guide – How to set up a software RAID