Skip to content

How to Create and Add EBS Volume in AWS Instanace

Steps
3
Covers
AWS, Disk Management
On this page 3 steps

Amazon EBS (Elastic Block Store) provides persistent block storage for using with Amazon instances. Each Amazon EBS volume offering high availability and durability. It has capability to automatically replicate in its Availability Zone to protect you from component failure.

This article will help you to Create and Add EBS Volume to your existing instance. All the command are used with this article are used with CentOS 6.5. So change commands used in Step #3 as per operating system used.

Step 1 of 3Create an EBS Volume

First we need to login to AWS EC2 dashboard. After login navigate to following location and create an EBS volumes of preferred size. Below screenshots will provide you help about this.

    AWS Account >> EC2 Dashboard >> Volumes

add-ebs-1

Now click on Create Volume and input the following values.

    • Volume Time: Standard
    • Size: As per requirement
    • Availability Zone: This should be same in which instance is running
    • Snapshot: Leave it if create fresh EBS

add-ebs-2

After filling all the details click on Yes, Create button. It will create a new EBS volume in few time ( depends on size ) and list in your Volumes with available state.

add-ebs-3

Step 2 of 3Attach EBS Volume

As you have created an EBS volume in your account, lets attach this in your instance of your choice. Follow below navigation option to find the options.

    Select New Volume >> Actions Menu >> Select Attach Volume

It will show input box like below. Select the instance to which you need to attach.

add-ebs-4

Step 3 of 3Mount EBS Volume in Server

After completing above step, Now new volume will list your system. You can check this using ‘fdisk -l‘ command. This article assume that newly disk is /dev/xvdf.

Now use following command to create new filesystem to newly attached EBS volume, Run below command with care and make sure you are formatting right volume.

# mkfs /dev/xvdf

After creating filesystem, Lets mount this disk on your mount point for eg: /mnt using following command.

# mount /dev/xvdf /mnt

Add below entry at the end of file /etc/fstab to enable auto mount disk on your system reboot.

/dev/xvdf	/mnt      ext4    defaults        1 1

Rahul

Rahul Kumar is the founder and chief editor of TecAdmin.net. A Red Hat Certified Engineer (RHCE), he has worked in IT since 2009, with hands-on experience in Linux system administration, DevOps, web hosting, cloud platforms and automation. He started TecAdmin in 2013 to share practical, step-by-step guides, and leads its editorial work with one aim: making technical learning clear and useful for sysadmins, developers and beginners alike.

Leave a Reply

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


Back to top