Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6622048E0 for ; Thu, 23 Jun 2011 14:22:54 +0000 (UTC) Received: (qmail 32035 invoked by uid 500); 23 Jun 2011 14:22:52 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 31999 invoked by uid 500); 23 Jun 2011 14:22:52 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 31991 invoked by uid 99); 23 Jun 2011 14:22:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Jun 2011 14:22:51 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of blanquer@rightscale.com designates 209.85.214.44 as permitted sender) Received: from [209.85.214.44] (HELO mail-bw0-f44.google.com) (209.85.214.44) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Jun 2011 14:22:46 +0000 Received: by bwz13 with SMTP id 13so1855545bwz.31 for ; Thu, 23 Jun 2011 07:22:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.41.206 with SMTP id p14mr915924bke.53.1308838656083; Thu, 23 Jun 2011 07:17:36 -0700 (PDT) Received: by 10.204.120.81 with HTTP; Thu, 23 Jun 2011 07:17:36 -0700 (PDT) In-Reply-To: References: <5306E6F7-3429-41A9-AEB4-0DBE45F07638@gmail.com> Date: Thu, 23 Jun 2011 07:17:36 -0700 Message-ID: Subject: Re: Backup/Restore: Coordinating Cassandra Nodetool Snapshots with Amazon EBS Snapshots? From: Josep Blanquer To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=bcaec555517a2a093404a661bf13 --bcaec555517a2a093404a661bf13 Content-Type: text/plain; charset=ISO-8859-1 On Thu, Jun 23, 2011 at 5:04 AM, Peter Schuller wrote: > > 1. Is it feasible to run directly against a Cassandra data directory > > restored from an EBS snapshot? (as opposed to nodetool snapshots restored > > from an EBS snapshot). > > Assuming EBS is not buggy, including honor write barriers, including > the linux guest kernel etc, then yes. EBS snapshots of a single > volumes are promised to be atomic. As such, a restore from an EBS > snapshot should be semantically identical to recover after a power > outage or sudden reboot of the node. > > I make no claims as to how well EBS snapshot atomicity is actually > tested in practice. > > EBS volume atomicity is good. We've had tons of experience since EBS came out almost 4 years ago, to back all kinds of things, including large DBs. One important thing to have in mind though, is that EBS snapshots are done at the block level, not at the filesystem level. So depending on the filesystem you have on top of the drives you might need to tell the filesystem to "make sure this is consistent or recoverable now". For example, if you use the log-based XFS, you might need to do xfs_freeze, snapshot disc/s, xfs_unfreeze. To make sure that the restored filesystem data (and not only the low level disk blocks) is recoverable when you restore them. Snapshotting volume stripes works exactly in the same way, you just have to keep track of what position each snapshot has in the stripe, so you can recreate the stripe back correctly. The "freezing" of the filesystem might cause a quick/mini hickup, which is usually not noticeable unless you have very stringent requirements in the box (or if you have a very large stripe, and/or some sort of network issue where the calls to amazon endpoint are very slow...and therefore you're locking the FS a tad longer than you'd want to). Cheers, Josep M. --bcaec555517a2a093404a661bf13 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Thu, Jun 23, 2011 at 5:04 AM, Peter Schul= ler <pe= ter.schuller@infidyne.com> wrote:
> 1. Is it feasible to run directly against a Cassandra data directory > restored from an EBS snapshot? (as opposed to nodetool snapshots resto= red
> from an EBS snapshot).

Assuming EBS is not buggy, including honor write barriers, including
the linux guest kernel etc, then yes. EBS snapshots of a single
volumes are promised to be atomic. As such, a restore from an EBS
snapshot should be semantically identical to recover after a power
outage or sudden reboot of the node.

I make no claims as to how well EBS snapshot atomicity is actually
tested in practice.


EBS volume atomicity is go= od. We've had tons of experience since EBS came out almost 4 years ago,= =A0 to back all kinds of things, including large DBs. One important thing t= o have in mind though, is that EBS snapshots are done at the block level, n= ot at the filesystem level. So depending on the filesystem you have on top = of the drives you might need to tell the filesystem to "make sure this= is consistent or recoverable now". For example, if you use the log-ba= sed XFS, you might need to do xfs_freeze, snapshot disc/s, xfs_unfreeze. To= make sure that the restored filesystem data (and not only the low level di= sk blocks) is recoverable when you restore them.

=A0Snapshotting volume stripes works exactly in the same way, you just = have to keep track of what position each snapshot has in the stripe, so you= can recreate the stripe back correctly.

The "freezing" o= f the filesystem might cause a quick/mini hickup, which is usually not noti= ceable unless you have very stringent requirements in the box (or if you ha= ve a very large stripe, and/or some sort of network issue where the calls t= o amazon endpoint are very slow...and therefore you're locking the FS a= tad longer than you'd want to).

=A0Cheers,

Josep M.
--bcaec555517a2a093404a661bf13--