This may answer Q2 (from http://aws.amazon.com/ebs/):
Even though the snapshots are saved
incrementally, when you delete a
snapshot, only the data not needed for
any other snapshot is removed. So
regardless of which prior snapshots
have been deleted, all active
snapshots will contain all the
information needed to restore the
volume
In your example after deleting the first snapshot you would not pay anymore for the 1GB in the first overwritten by the second snapshot, and you won't be able to restore the state of the first snapshot.
But it's still quite opaque about how much a set of snapshots costs in terms of S3 usage.
since you're striping data across the volumes, it would stand to reason that you have to put each NEW volume in the same location on the RAID as the volume from which the snapshot was created.
I tested your premise, and logical as it may seem, the observation is otherwise.
Let me detail this:
I have the exact same requirement as you do. However, the RAID0 that I am using has only 2 volumes.
I'm using Ubuntu 10 and have 2 EBS devices forming a RAID0 device formatted with XFS.
The raid0 device was creating using the following command:
sudo mdadm --create /dev/md0 --level 0 --metadata=1.1 --raid-devices 2 /dev/sdg /dev/sdh
I've installed MYSQL and a bunch of other software that are configured to use /dev/md0 to store their data files.
Using the same volumes:
Once done, I umount everything, stop the Raid and reassemble it like so:
sudo mdadm --assemble /dev/md0 /dev/sdh /dev/sdg
The thing is that irrespective of the order of /dev/sdg /dev/sgh
, the RAID reconstitutes itself correctly.
Using snapshots:
Post this, I use ec2-consistent-snapshot
to create snapshots of the 2 EBS disks together. I then create volumes from this disk, attach it to a new instance (that has been configured for the software already), reassemble the RAID (I've tried interchanging the order of the EBS volumes too), mount it and I'm ready to go.
Sounds strange, but it works.
Best Answer
Amazon does not currently provide a method to report on the storage used by snapshots other than the total usage and cost numbers for all snapshots in the account.
Snapshots of the same or related volumes can share storage (where blocks have not changed between snapshots) so this makes it difficult to define the size of a single snapshot.
A new snapshot only saves blocks that have been modified since the last snapshot, but it keeps pointers to the previously saved blocks that have not been modified.
If you delete a single snapshot, it would only free up the blocks that are not shared by any other snapshot (whether created before or after the one you're deleting).
Blocks on the EBS volume that have not been written to are not included in the snapshot.
Snapshot blocks are compressed before storage, further saving you in storage costs.