Instance Storage
Every instance includes a fixed amount of storage space on which you can store data. Within this document, it is referred to as the "ephemeral store" as it is not designed to be a permanent storage solution.
If an instance reboots (intentionally or unintentionally), the data on the ephemeral store will survive. If the underlying drive fails or the instance is terminated, the data will be lost.
We highly recommend backing up important data to Amazon S3.
Storage is exposed on the instance types as described in the following table.
Location | Description |
---|---|
/dev/sda1 | Formatted and mounted as root (/) on all instance types |
/dev/sda2 | Formatted and mounted as /mnt on m1.small and c1.medium instances |
/dev/sda3 | Formatted and mounted as /swap on m1.small and c1.medium instances |
/dev/sdb | Formatted and mounted as /mnt on m1.large, m1.xlarge, and c1.xlarge instances |
/dev/sdc | Available on m1.large, m1.xlarge, and c1.xlarge instances; not mounted |
/dev/sdd | Available on m1.xlarge and c1.xlarge instances; not mounted |
/dev/sde | Available on m1.xlarge and c1.xlarge instances; not mounted |
Note | |
---|---|
Depending on the instance type, some ephemeral stores are not mounted or formatted. To mount and format
an ephemeral store, use the Unix |
Due to how Amazon EC2 virtualizes disks, the first write to any location on an instance's drives will perform slower than subsequent writes. For most applications, amortizing this cost over the lifetime of the instance will be acceptable. However, if you require high disk performance, we recommend initializing drives by writing once to every drive location before production use.
To initialize the stores, use the following commands on the m1.large, m1.xlarge, and c1.xlarge instance types:
dd if=/dev/zero of=/dev/sdb bs=1M dd if=/dev/zero of=/dev/sdc bs=1M dd if=/dev/zero of=/dev/sdd bs=1M (m1.xlarge only) dd if=/dev/zero of=/dev/sde bs=1M (m1.xlarge only)
To perform the initialization on all drives at the same time, use the following command:
dd if=/dev/zero bs=1M|tee /dev/sdb|tee /dev/sdc|tee /dev/sde > /dev/sdd
Note | |
---|---|
Initialization can take a long time (about 8 hours for an extra large instance). |
Configuring drives for RAID initializes them by writing to every drive location. When configuring software-based RAID, make sure to change the minimum reconstruction speed:
echo $((30*1024)) > /proc/sys/dev/raid/speed_limit_min
Note | |
---|---|
You cannot use iostat (part of the sar System Activity Reporting package) to watch performance. You also cannot watch 'cat /proc/mdstat'. |