41

Is it safe to use an EBS volumne while a snapshot is being created?

I've currently got a 100Gb EBS volume mounted. I am in the process of snapshotting it. Goodness it's slow!! It's going to end up taking more than 45 minutes to snapshot.

My question : Is the EBS volume already copied and just being saved somewhere? Or, is the snapshot actively copying from my mounted volume right now?

Basically, if I start using it before the snapshot completes, am I hosed?

I just can't believe it takes this long to copy. There really isn't even 100GB in use. It's more like 25Gb.

Justin Noel
  • 566
  • 1
  • 5
  • 9

2 Answers2

39

You're safe to use the volume once you have triggered the snapshot, even if it's still in a pending state according to AWS - see this post.

If you're taking a snapshot for the first time, it probably will take a while as it has to make a full copy to the region-wide S3 bucket, but remember, it's incremental after the first one has been stored so should be a lot faster.

NOTE: You can't create a volume out of a snapshot which is in a pending state. You'll get the error "Snapshot is in invalid state" if you do this.

So please make sure to wait until the snapshot is in the "available" state.

slm
  • 7,355
  • 16
  • 54
  • 72
Dominic Cleal
  • 3,120
  • 17
  • 16
9

It's perfectly safe to use the volume during a snapshot. As soon as the snapshot command returns, the drive goes into a mode where new data is written elsewhere, so the snapshot is of what the drive looked like when you started.

However, you will experience very degraded performance (as you have noticed) until the snapshot is complete.

So make sure you only take your snapshots during off peak hours.

jedberg
  • 2,291
  • 22
  • 21
  • Do the EBS volumes reside inside on LVM voumes then as image files? Given you create any arbitary filesystems inside an EC2 guest? e.g. /dev/ebs_uuid/image.bin ? – Mâtt Frëëman Oct 15 '12 at 05:14
  • 2
    @jedberg you write "As soon as the snapshot command returns". Could you direct me to where this is written in the AWS documentation? [create-snapshot manual page](http://docs.aws.amazon.com/cli/latest/reference/ec2/create-snapshot.html) only mentions that it is ok to start using the volume while the snapshot is in "pending" state. – Erik Sjölund Sep 29 '14 at 07:00