3

I am running a webserver with very little writes (apart from log files). According to amazon:

When enabled, Amazon EC2 does not shut down the instance before creating the image. When this option is used, file system integrity on the created image cannot be guaranteed.

If I copy the AMI without reboot and it loads up fine should I be concerned that there may be a problem at a later time with corruption?

DD.
  • 3,114
  • 11
  • 35
  • 50
  • 1
    possible duplicate of [AMI with or without reboot on AWS EC2](http://serverfault.com/questions/424971/ami-with-or-without-reboot-on-aws-ec2) – Federico Sierra Jun 09 '15 at 03:35
  • The other question didn't really solve my problem. I'm still unsure whether this relates to web servers and also if the server does restart how do I know if there is a problem or not? – DD. Jun 09 '15 at 07:45

1 Answers1

2

I don't know how "positive" you want to be that your AMI is clean, but it largely depends on the sensitivity and "statefulness" of the application and file system(s) running in the source instance. EBS snapshots don't have a capability to quiesce I/Os within the instance, so YMMV - it's basically as if you pulled the plug on your server.

I personally have done this with EC2 and other IaaS platforms countless times and the only workloads that have end up corrupted are relational databases. Some claim that ext4 is overly sensitive to this, but I have not personally witnessed it.

From the AMI creation documentation:

Amazon EC2 powers down the instance before creating the AMI to ensure that everything on the instance is stopped and in a consistent state during the creation process. If you're confident that your instance is in a consistent state appropriate for AMI creation, you can tell Amazon EC2 not to power down and reboot the instance. Some file systems, such as xfs, can freeze and unfreeze activity, making it safe to create the image without rebooting the instance.

Adam
  • 156
  • 5