Attaching raw EBS volume to EC2 instance

If you create a volume manually and then try to attach and mount it to an instance you will notice that the volume is not usable cause it is raw. Of course you will need to format it and then mount it.

It is very basic and simple task but not for beginners. So we will list the attached volumes, check the filesystem (which supposed to be nothing!), create file system, create mount point and mount.

sudo file -s /dev/xvdb
sudo mkfs -t ext4 /dev/xvdb
sudo mkdir mount_point
sudo mount /dev/xvdb mount_point

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