Home > Uncategorized > How to mount Amazon EC2 EBS volume on an instance’s file system

How to mount Amazon EC2 EBS volume on an instance’s file system

September 30th, 2009 Leave a comment Go to comments
The following assumes you have created a volume in AWS Management Console and attached it to your instance as /dev/sdh.
 
A brand new volume is unformatted block storage.  It shows up as another device, but doesn’t contain a filesystem.  (An EBS volume that previously had a filesystem created on it won’t be mounted either by the attachment process).
 
You can verify that your instance can see the EBS volume by running the following command on the instance:
 
cat /proc/partitions
 
You’ll see an entry for sdh.  At this point, you should create a filesystem and mount it manually.  You could create an EXT3 filesystem on the device and then mount it on ‘/mnt/ebs’ with the following commands, (run as root):
 
mke2fs -F -j /dev/sdh
mkdir /mnt/ebs

mount /dev/sdh /mnt/ebs 

Categories: Uncategorized Tags:
  1. malcolm
    December 16th, 2010 at 21:56 | #1

    To get the mount to be available on reboot, the fstab has to be modified.

    sudo nano /etc/fstab

    add line:
    /dev/sdh /mnt/ebs ext3 defaults 0 0

  2. Tushar
    February 21st, 2011 at 06:57 | #2

    how to deail with windows instance….
    please help

  1. March 21st, 2012 at 03:28 | #1