Add disk to the new Linux environment

With cloud coming into picture, Linux system administration is no more a Linux admins job.

So when you need to create a file system for sapmnt or database you got to know the below at a minimum.

This blog post is about attaching the newly created disks to the Linux environment.

The procedure stands same for AWS, Azure or any cloud environments.

You create a EBS or a Data disk from your cloud portal and assign it to the virtual machine.

Now this is a raw device and is available under /dev.

Login with root privileges to the operating system:

You can view these devices by using the command lsblk:


Notice that no mount point is assigned to this newly created disk.

Just to be sure check if the you are using the correct disk volume by using the file command.


If it returns “data”, it means there is no data on the volume.

Before you mount the volume it is required to format the raw disk according to the requirement.  For example ext4 for a linux machine and NTFS for a Windows one:

Ex: mkfs -t ext4 /dev/sde

Now create a directory under “/” which you want to use to mount this volume.

Ex: mkdir /testvolume

Mount the formatted volume on the directory created.

Ex: mount /dev/sde /testvolume

And your file system is now ready for use.


Note: If you want to unmount your file system use below command:

umount /testvolume.

Make sure you are not on /testvolume (volume that is to be unmounted). Otherwise you will get an error that “Volume is in use”.





Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s