|« PreviousNext »|
|Did this page help you? Yes | No | Tell us about it...|
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.
To make an Amazon EBS volume available for use on Linux
Connect to your instance using SSH.
Some Linux distributions rename your Amazon EBS volume instead of using the name that you specified
when attaching the volume; for example,
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.
(Optional) Use the following command to create the ext3 file system.
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
Use the following command to create the directory.
Use the following command to mount the volume.
(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.
To use an Amazon EBS volume
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.
Type diskmgmt.msc and press Enter. The Disk Management utility opens.
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.
Select the disk that represents the new Amazon EBS volume.
On the Disk Management menu, select Action - All Tasks - Online.
A new disk needs to be initialized before it can be used. To initialize the disk:
In the Disk Management utility, select the new Amazon EBS volume disk.
On the Disk Management menu, select Action - All Tasks - Initialize Disk.
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.