Is Shutting Down a Spot Amazon EC2 Instance Clean

amazon ec2shutdown

Not sure if this is supposed to be on SuperUser or here, but here goes:

Q. If my spot instance is automatically terminated due to my max bid being exceeded, is it a clean shutdown — as if a user clicked Start>>Shutdown ? Or is it a hard shutdown — as if someone just yanked out the power cord?

I realize that in most cases the volumes on a terminated spot instance are deleted immediately, making my question moot. But in this particular case, I have the "delete volume on terminate" flag set to false so as to retain the root volume; I may want to reuse that volume and bind it to another instance in the future. Thus my concern regarding whether or not the forced shutdown is "clean." A clean shutdown would reduce or eliminate the possibility of data corruption on the root volume.

UPDATE (08/11/2013): I already marked a response as the answer but now I'm not sure it's correct. I just received a contradictory response from someone on the Amazon forum:

The instance will be shutdown gracefully and then the volumes with "Delete on Termination" set as false will be detached.

So, I'm still uncertain what the actual answer is. Anyone want to go for a tiebreaker on this one?

Best Answer

When max bid is exceeded, it goes down hard.

You will likely need to run fsck or chkdisk on the vols before mounting them.