| By Thorsten von Eicken | Article Rating: |
|
| August 25, 2008 06:00 AM EDT | Reads: |
5,772 |
Incremental snapshotting of volumes and freezing
I mentioned that snapshots were a very useful but also a complex, difficult to understand feature. I wanted to explain how snapshots of an EBS volume can be taken at any time, and why using RightScale’s scripts to freeze data are important -- and a great add-on to this important feature.
Taking a snapshot causes the data on the volume to be written to S3 where it is stored redundantly in multiple availability zones as all data in S3 is. It’s worth noting snapshots do not appear in your S3 buckets, thus you can't access them using the standard S3 API. You can only list the snapshots using the EC2 API and you can restore a snapshot by creating a new volume from it.
The second thing is that snapshots are incremental, which means that in order to create a snapshot, EBS saves only the disk blocks that have changed to S3.
Each volume is divided up into blocks. When the first snapshot of a volume is taken, all blocks of the volume that have ever been written are copied to S3, and then a snapshot table of contents is written to S3 that lists all these blocks. Now, when the second snapshot is taken of the same volume, only the blocks that have changed since the first snapshot are copied to S3. The table of contents for the second snapshot is then written to S3 and lists all the blocks on S3 that belong to the snapshot. Some are shared with the first snapshot, some are new. The third snapshot is created similarly and can contain blocks copied to S3 for the first, second and third snapshots.
There are two nice things about the incremental nature of the snapshots: it saves time and space. Taking subsequent snapshots can be very fast because only changed blocks need to be sent to S3, and it saves time because you're only paying for the storage in S3 of the incremental blocks. What is difficult to answer is how much space a snapshot uses. Or, to put it differently, how much space would be saved if a snapshot were deleted. If you delete a snapshot, only the blocks that are only used by that snapshot (i.e. are only referenced by that snapshot's table of contents) are deleted.
Something to be very careful about with snapshots is consistency. A snapshot is taken at a precise moment in time even though the blocks may trickle out to S3 over many minutes. But in most situations you will really want to control what's on disk vs. what's in-flight at the moment of the snapshot. This is particularly important when using a database. We recommend you freeze the database (or any application writing critical data to disk), freeze the file system, take the snapshot, then unfreeze everything. At the file system level we've been using xfs for all the large local drives and EBS volumes because it's fast to format and supports freezing. Thus when taking a snapshot we perform an xfs freeze, take the snapshot, and unfreeze. All this ensures that the snapshot doesn't contain partial updates that need to be recovered when the snapshot is mounted.
With support for large datasets, attachments, better throughput, snapshotting and more robust, incremental backups and redundancy, Amazon’s EBS should attract a lot more enterprise and on-demand customers, as well as Web 2.0 users with large database-driven applications.
Thorsten von Eicken is RightScale, Inc.’s Chief Technical Officer. To try out a free developer version of RightScale, visit http://www.rightscale.com/m/products.html#developer.
Published August 25, 2008 Reads 5,772
Copyright © 2008 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
- Cloud Computing Expo - Deploying Into the Clouds: Concepts, Benefits and Experiences
- RightScale Delivers Full Support for Amazon’s Elastic Block Store In the Cloud
- The Three Levels of Cloud Computing
- Cloud Computing Journal: Current Themes & Topics
- SYS-CON's Cloud Computing Expo Will Be Larger Than Any Recent Gartner Event
- SYS-CON Launches Another Worldwide First: "Cloud Computing Journal"
- Merrill Lynch Estimates "Cloud Computing" To Be $100 Billion Market
- Cloud Computing - Morgan Stanley is Banking on the Cloud
- Cloud Computing: It's the Future of Enterprise IT
- Twenty-One Experts Define Cloud Computing
More Stories By Thorsten von Eicken
Thorsten von Eicken is CTO & Founder at RightScale, the leader in cloud computing management. RightScale provides a Web-based cloud management platform and support services. RightScale's system enables companies to create Web solutions running on the Amazon cloud that are scalable, reliable, easy to manage, and affordable.
![]() |
Jeremy Geelan 08/21/08 02:03:47 PM EDT | |||
Dr von Eicken will be giving a technical session at SYS-CON's "Cloud Computing Expo" (November 19-21, 2008) - a major adjunct to the 4th International Virtualization Conference & Expo being held at The Fairmont Hotel in San Jose, CA - in which he will distill the unique characteristics of clouds and describe how to best think about deployments in the clouds. |
||||
- 4th International Cloud Computing Conference & Expo Starts Today
- Adobe Flex Developer Earns $100K in New York City
- Rhomobile CEO to Speak at iPhone Developer Summit 2009 West
- Rhomobile to Exhibit at Cloud Computing Conference & Expo
- Building a Social Site with Ruby and Rails
- Accelerating Innovation with Yahoo! Cloud Serving
- JetBrains' IntelliJ IDEA Goes Open Source
- Migrating from UNIX / RISC to Red Hat Enterprise Linux
- What Could You Do With Your Code in 20 Lines or Less?
- JetBrains Releases RubyMine 2.0
- Elance Work Index Reveals Strong Demand for Qualified PHP Programmers
- Get Time Tracker Source Code in SproutCore
- 4th International Cloud Computing Conference & Expo Starts Today
- Is Microsoft as Free as Open Source?
- Adobe Flex Developer Earns $100K in New York City
- Rhomobile CEO to Speak at iPhone Developer Summit 2009 West
- Rhomobile to Exhibit at Cloud Computing Conference & Expo
- Building a Social Site with Ruby and Rails
- Accelerating Innovation with Yahoo! Cloud Serving
- Enterprise LAMP Summit Asks Global Open Source Leaders “Can LAMP Deliver?”
- Engine Yard Gets More Money
- JetBrains' IntelliJ IDEA Goes Open Source
- Migrating from UNIX / RISC to Red Hat Enterprise Linux
- What Could You Do With Your Code in 20 Lines or Less?
- Why Do 'Cool Kids' Choose Ruby or PHP to Build Websites Instead of Java?
- Ruby on Rails Won't Make It in 2007 and Forget About AJAX
- The Top 250 Players in the Cloud Computing Ecosystem
- The Jury's Still Out On Ruby On Rails (RoR) and AJAX
- Red Hat Named "Platinum Sponsor" of Virtualization Conference & Expo
- Can Ruby Live Without Rails?
- An Introduction to Ant
- Testing in Ruby on Rails
- Ruby On Rails Moves At 'Acela' Rates Toward Java
- Java Kicks Ruby on Rails in the Butt
- Cyberhive Supports Ruby On Rails
- Ruby on Rails One-Day Seminar: Introducing Ruby on Rails – the Pain-Killer for Web Developers

































