Upgrade micro instance to small instance in Amazon ec2

By: Emiley J Emailed: 1727 times Printed: 2329 times    

Latest comments
By: rohit kumar - how this program is work
By: Kirti - Hi..thx for the hadoop in
By: Spijker - I have altered the code a
By: ali mohammed - why we use the java in ne
By: ali mohammed - why we use the java in ne
By: mizhelle - when I exported the data
By: raul - no output as well, i'm ge
By: Rajesh - thanx very much...
By: Suindu De - Suppose we are executing

Upgrading from a micro instance to a small instance or from a small instance to a medium instance is usually very straight forward. First you create an AMI Image of the current instance. Then once the image is created, right click on the image and 'launch instance'. Only this time you will choose the right instance type and then follow the default settings for the rest of the screens. Thats it you are done. If you have an elastic IP mapped to your old instance, just detach the IP and attach it to the new instance you created.

All this you can do in less than 5 minutes. But only one more thing you need to do to make the hard disk space. Because the image you used to create will have the old disk space, in this example below it was just 8GB. So the new 'Small' instance will have only 8GB in the mounted volumme. So to fix this you have to do the following steps.

  1. First check the current disk space
    
    [root@ip-xx ec2-user]# df
    Filesystem           1K-blocks      Used Available Use% Mounted on
    /dev/xvda1             8256952   7510540    662528  92% /
    tmpfs                   850896         0    850896   0% /dev/shm
    
  2. You can also check if the volume really has 160 G harddisk space as a small instance should have.
    
    [root@ip-xxxxx ec2-user]# fdisk -l
    
    Disk /dev/xvda1: 161.1 GB, 161061273600 bytes
    255 heads, 63 sectors/track, 19581 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000000
    
    Disk /dev/xvda1 doesn't contain a valid partition table
    
    Disk /dev/xvda3: 939 MB, 939524096 bytes
    255 heads, 63 sectors/track, 114 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000000
    
    Disk /dev/xvda3 doesn't contain a valid partition table
    
  3. Here is the magic command to fix this sudo resize2fs /dev/sda1
    [root@ip-xxxxx ec2-user]# sudo resize2fs /dev/sda1
    resize2fs 1.41.12 (17-May-2010)
    Filesystem at /dev/sda1 is mounted on /; on-line resizing required
    old desc_blocks = 1, new_desc_blocks = 10
    Performing an on-line resize of /dev/sda1 to 39321600 (4k) blocks.
    The filesystem on /dev/sda1 is now 39321600 blocks long.
    
  4. Finally check if everything is ok.
    [root@ip-xxxxx ec2-user]# df
    Filesystem           1K-blocks      Used Available Use% Mounted on
    /dev/xvda1           154818540   7524044 145724724   5% /
    tmpfs                   850896         0    850896   0% /dev/shm
    [root@ip-xxxxx ec2-user]#
    

Cloud Home | All Cloud Tutorials | Latest Cloud Tutorials

Sponsored Links

If this tutorial doesn't answer your question, or you have a specific question, just ask an expert here. Post your question to get a direct answer.



Bookmark and Share

Comments(0)


Be the first one to add a comment

Your name (required):


Your email(required, will not be shown to the public):


Your sites URL (optional):


Your comments:



More Tutorials by Emiley J
Password must include both numeric and alphabetic characters - Magento
What is Hadoop?
Returning multiple values from a web service
Tomcat and httpd configured in port 8080 and 80
Java Webservices using Netbeans and Tomcat
Java WebService connected to Database
How to Deploy a Java Web Service
Call a webservice in Java
Java WebService - Create your first web service in Java
package javax.jws does not exist
Getting Started with Android
HTML5 Location - getCurrentPosition() in HTML5
HTML5 Canvas - Using Canvas in HTML5
HTML5 - Introduction
HTML5 Video - Handling video in HTML5

More Tutorials in Cloud
Mac with Google Apps
HA and DR in a cloud environment such as Amazon EC2
Backup and recovery in a cloud environment such as Amazon EC2
Application Security in a cloud environment such as Amazon EC2
Security and Privacy Management in the Cloud
Upgrade micro instance to small instance in Amazon ec2

More Latest News
Most Viewed Articles (in Cloud )
Upgrade micro instance to small instance in Amazon ec2
HA and DR in a cloud environment such as Amazon EC2
Backup and recovery in a cloud environment such as Amazon EC2
Application Security in a cloud environment such as Amazon EC2
Security and Privacy Management in the Cloud
Mac with Google Apps
Most Emailed Articles (in Cloud)
HA and DR in a cloud environment such as Amazon EC2
Upgrade micro instance to small instance in Amazon ec2
Backup and recovery in a cloud environment such as Amazon EC2
Application Security in a cloud environment such as Amazon EC2
Security and Privacy Management in the Cloud
Mac with Google Apps