Note: Please go to docs.rightscale.com to access the current RightScale documentation set. Also, feel free to Chat with us!
Home > Clouds > AWS > AWS FAQs > How can I create a swap partition in EC2?

How can I create a swap partition in EC2?

Background Information

How do you know what instances have a swap partition and what instances do not?
How can I create a swap partition of my EC2 instance? 

 


Answer

The default swap partitions in Amazon EC2 are defined by the instance type used.  Only m1.small and c1.medium instance types provide a swap partition by default. 

Adding a swap partition

For all other instance types, a swap partition can be created using LVM and the ephemeral storage provided with the instance.  RightScale provides the following RightScript for adding a swap partition:


Before you run the "SYS Add Swap Partition" RightScript, you must first execute the "SYS lvm install v1" RightScript.  If those scripts are not available in the current RightScale account, you will need to import them from the MultiCloud Marketplace.  These scripts can either be added as Boot or Operational Scripts to a ServerTemplate or executed as Any Scripts on a running server.

Adding a swap file

RightScale OSS provides the following RightScript for adding a swap file to your instance:


Using a swap file instead of a swap partition is a good practice when the cloud image you are using does not contain a swap partition.

You must to post a comment.
Last modified
21:25, 16 May 2013

Tags

ec2

Classifications

This page has no classifications.

Announcements

None


© 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.