Mount Additional Disks To CentOS/Linux

Mount Additional Disks To CentOS/Linux

2020, Aug 01    

When you create CentOS VM with additional disks, you need to do additional steps to mount them to the file system. This blog post describes the steps on how to do it. First step is to identify the unmounted disks. You can use lsblk -l command as below::


You can see sdc device is not mounted to the file system. The MOUNTPOINT column is blank for sdc device. Let’s see how do we mount it to the file system.

First, you need to format the disk using mkfs command as below: The ext4 is the filesystem type.


The device name you have to give it as /dev/sdc. Formatting the disk is now complete and let’s mount the disk. I want to mount the disk as pg_wal name. This VM is going to host EDB Postgres instance and I want this 15 GB disk to keep the WAL files.

Let’s create the mount point.

$ sudo mkdir /pg_wal

The final step is to mount the disk. See below command.

$ sudo mount /dev/sdc /pg_wal

The new device is now successfully mounted. See below screenshot:


The OS I used in this example is CentOS 8.0.

About the post header picture: Trail head bridge at Grays peak and Torreys peak mountains on July, 2020.