Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»AWS»How to Create and Add EBS Volume in AWS Instanace

    How to Create and Add EBS Volume in AWS Instanace

    By RahulJanuary 27, 20142 Mins Read

    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.

    Advertisement

    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: Create 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: Attach 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: Mount 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
    

    amazon attach ebs create ebs ebs ec2 instance mount ebs
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    Create AWS Cognito User with AWSCLI

    How to Create User Manually in AWS Cognito (CLI)

    How to Remove CloudFront Cache

    How To Delete Application Versions from AWS Beanstalk

    Add A Comment

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • Implementing a Linux Server Security Audit: Best Practices and Tools
    • cp Command in Linux (Copy Files Like a Pro)
    • 15 Practical Examples of dd Command in Linux
    • dd Command in Linux (Syntax, Options and Use Cases)
    • Iptables: Common Firewall Rules and Commands
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.