Amazon Elastic Compute Cloud
User Guide (API Version 2013-02-01)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.Did this page help you?  Yes | No |  Tell us about it...

Making an Amazon EBS Volume Available for Use

After you attach an Amazon EBS volume to your instance, it is exposed as a block device. You can format the volume with any file system and then mount it. After you make the Amazon EBS volume available for use, you can access it in the same ways that you access any other volume. You can also take snapshots of your Amazon EBS volume for backup purposes or to use as a baseline when you create another volume.

This topic describes how to make your Amazon EBS volume available for use.

Making the Volume Available on Linux

To make an Amazon EBS volume available for use on Linux

  1. Connect to your instance using SSH.

  2. Some Linux distributions rename your Amazon EBS volume instead of using the name that you specified when attaching the volume; for example, /dev/sdf through /dev/sdp become /dev/xvdf to /dev/xvdp. Use the df -h and fdisk -l commands to view your mounted file systems and available disk devices to help you determine the correct device name to use.

  3. (Optional) Use the following command to create the ext3 file system.

    Caution

    This step assumes that you're mounting an empty volume. If you're mounting a volume that already has data on it (for example, a public data set), don't use mkfs before mounting the volume (skip to the next step instead). Otherwise you'll format the volume and delete the existing data.

    $  sudo mkfs -t ext3 device_name
  4. Use the following command to create the directory.

    $  sudo mkdir volume_name
  5. Use the following command to mount the volume.

    $  sudo mount device_name volume_name
  6. (Optional) To enable the instance to reconnect to an Amazon EBS volume on reboot, add the device to the fstab or create a script that automatically mounts the volume on startup.

Make the Volume Available on Windows

To use an Amazon EBS volume

  1. Log in to your instance using Remote Desktop.

    • Windows Server 2008: On the taskbar, click Start, and then click Run.

    • Windows Server 2012: Go to the Start screen.

  2. Type diskmgmt.msc and press Enter. The Disk Management utility opens.

    Caution

    If you're mounting a volume that already has data on it (for example, a public data set), make sure you don't reformat the volume and delete the existing data.

  3. Select the disk that represents the new Amazon EBS volume.

    Select the new volume.

  4. On the Disk Management menu, select Action - All Tasks - Online.

    Online menu selection.

  5. A new disk needs to be initialized before it can be used. To initialize the disk:

    1. In the Disk Management utility, select the new Amazon EBS volume disk.

    2. On the Disk Management menu, select Action - All Tasks - Initialize Disk.

    3. In the Initialize Disk dialog, select the disk to initialize, select the desired partition style, and press OK.

Your new EBS volume is now available for use. Any data written to this file system is written to the Amazon EBS volume and is transparent to applications using the device.