Detach an EBS volume from a running EC2 Server instance
Table of Contents
A running instance with an attached EBS volume
You must use caution when detaching an EBS volume from a running instance in order to ensure that no data is lost or corrupted. How you detach a volume will depend largely on the function of the volume. For example, if you are performing writes to the volume (i.e database or sys-log server), it's imperative that you freeze the file system before detaching the volume. However, if the volume is storing static data, freezing the file system may not be necessary.
By default, when an instance is terminated, any attached volumes will automatically become "detached" from the running instance.
As a best practice, you'll always want to create one last snapshot of a volume if you plan to delete it. You can either take the snapshot before you detach the volume or after it's been detached. If you are using Servers that were launched using one of RightScale's published "MySQL EBS" ServerTemplates, volumes will automatically be detached and deleted. Therefore, if you want to create one last snapshot before you detach (and possibly delete the volume), you should take one last backup EBS snapshot.
How you take the final snapshot will largely depend on how the volume is currently being used.
There are two different ways you can detach an EBS Volume from a running instance:
To detach an EBS Volume from an instance, go to the Volumes tab of an instance and click the Detach button and confirm the action.
Under Clouds -> AWS Region -> EBS Volumes, click on the Detach button of a volume.
You can also click the Detach button from the homepage of a selected volume.
© 2006-2014 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.