Make a new disk available in Ubuntu on AWS

To make a new disk you just added to the Ubuntu device, please go through the following steps –

Check whats the /dev path of the disk. On terminal, run-


loop0         7:0    0  97M  1 loop /snap/core/9289
loop1         7:1    0  18M  1 loop /snap/amazon-ssm-agent/1566
nvme0n1     259:0    0   1T  0 disk 
nvme1n1     259:1    0  10G  0 disk 

You would have got a result as above.

In this case, the disk I wanted add is the 1 TB disk, which is /dev/nvme0n1

Format the disk with a new compatible filesystem (XFS).

sudo mkfs -t xfs /dev/nvme0n1

Wait for the file-system creation to finish.

sudo mkdir /data
sudo mount /dev/nvme0n1 /data
sudo cp /etc/fstab /etc/fstab.orig
sudo blkid

From the output of the last command, find the UUID of your disk

sudo vim /etc/fstab

Append the line –

UUID=[your disk's UUID]  /data  xfs  defaults,nofail  0  2

Note that in the above replace your disk’s UUID without the square brackets, and save the file.

sudo umount /data
sudo mount -a
df -h

Verify that /data is listed as a disk in the last command. If not, please check the /etc/fstab file, apply correction of UUID, spaces etc, and repeat the above test block again.

Leave a Reply

Your email address will not be published. Required fields are marked *


* Copy This Password *

* Type Or Paste Password Here *

68,488 Spam Comments Blocked so far by Spam Free Wordpress

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>