From http://www.virtualmin.com/documentation/cloudmin/vm/ec2-ebs
Introduction to EC2 volumes
EC2 volumes (called Elastic Block Storage by Amazon) are essential
Disk images that can be mounted on any system running on EC2, and
Continue to exist even if the system they were attached to is deleted.
They are a more permanent place to store data than the filesystem of
EC2 instance, and more easily accessible than S3.
Each volume is typically formatted with a filesystem like ext3, and is mapped to a device like/dev/sdb1
On the system it is connected to. It can then be mounted with the standard Linuxmount
Command. The size of a volume is typically several GB, and is chosen
Creation Time. Amazon charges for volumes based on their size and
Amount of time they exist.
EC2 volume snapshots
An EC2 volume snapshot is a copy of a volume taken at some point in
Time, and stored in S3. once a snapshot has been created, additional
Volumes can be created from the data in that snapshot. They can be used
For backup purposes, or to duplicate or fork the contents of a volume.
Snapshots are differential backups, meaning that only the blocks on
The device that have changed since your last snapshot will be
Incrementally saved. This means that if you have a device with 100 GBS
Of data, but only 5 GBS of data has changed since your last snapshot,
Only the 5 additional GBS of snapshot data will be stored back to Amazon
S3.
Creating and managing EC2 volumes
To create an EC2 volume in cloudmin, do the following:
- Login to the UI as root and goAmazon EC2->EC2 volumes.
- InNew volume detailsForm, choose your account fromEC2 accountMenu.
- Enter a size inEC2 accountField, or select a snapshot to copy this volume from.
- FromAvailability ZoneMenu, select the zone that your EC2 systems have been created in. A volume can only be attached to systems in the same zone.
- ClickCreateButton.
Once a volume has been created, it will appear in the list onEC2 volumesPage. To remove it, check the box next to it's ID and clickDelete selected volumesButton. Be careful, as the data on the volume will be lost forever (unless you made a snapshot first ).
Creating and managing EC2 snapshots
Once you have at least one EC2 volume, cloudmin will allow you to create a snapshot of it as follows:
- GoAmazon EC2->EC2 volumes, And click onEBS snapshotsTab.
- InNew volume snapshot detailsSection, select the volume to copy fromCopy from volumeMenu.
- ClickCreateButton.
Once a snapshot has been created, it can be used to create new
Volumes as explained above. Snapshots can be deleted on the EBS
Snapshots * tab by checking the boxes next to their names and clicking
TheDelete selected snapshotsButton.
Assigning volumes to systems
Once a volume has been created, it can be attached to an EC2 instance
As a block device, and typically mounted a filesystem. This can be done
Within cloudmin like so:
- Select your system from the left menu, and goResources->Attached EC2 volumes.
- InVolume attachment optionsForm, select the volume fromVolume to attachMenu.
- If this is a new volume that has not been mounted anywhere yet, changeFormat with filesystemToExt3. Otherwise, leave it setDont formatTo preserve existing data.
- To have cloudmin attempt to mount the volume, enter a path inMount on directoryField like
/mnt/disk2
Or/home
.
- ClickAttach EC2 volumeButton.
Once a volume has been attached and mounted, you can use it on your EC2 system however you wish. to detach a volume, go toTtached EC2 volumesPage, check the box next to its ID and clickDetach selected volumes.