By: Emiley J in Cloud Tutorials on 2012年10月16日 [フレーム]
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.
[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
[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
[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.
[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]#
This policy contains information about your privacy. By posting, you are declaring that you understand this policy:
This policy is subject to change at any time and without notice.
These terms and conditions contain rules about posting comments. By submitting a comment, you are declaring that you agree with these rules:
Failure to comply with these rules may result in being banned from submitting further comments.
These terms and conditions are subject to change at any time and without notice.
Most Viewed Articles (in Cloud )
Power On a VM from ESXI command line
HA and DR in a cloud environment such as Amazon EC2
Application Security in a cloud environment such as Amazon EC2
How to get the API key for CloudStack
Security and Privacy Management in the Cloud
Backup and recovery in a cloud environment such as Amazon EC2
How to change the virtual machine name in Azure
Latest Articles (in Cloud)
Power On a VM from ESXI command line
How to change the virtual machine name in Azure
Install OpenStack step by step guide
How to get the API key for CloudStack
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
Power On a VM from ESXI command line
How to change the virtual machine name in Azure
Install OpenStack step by step guide
How to get the API key for CloudStack
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
© 2023 Java-samples.com
Tutorial Archive: Data Science React Native Android AJAX ASP.net C C++ C# Cocoa Cloud Computing EJB Errors Java Certification Interview iPhone Javascript JSF JSP Java Beans J2ME JDBC Linux Mac OS X MySQL Perl PHP Python Ruby SAP VB.net EJB Struts Trends WebServices XML Office 365 Hibernate
Latest Tutorials on: Data Science React Native Android AJAX ASP.net C Cocoa C++ C# EJB Errors Java Certification Interview iPhone Javascript JSF JSP Java Beans J2ME JDBC Linux Mac OS X MySQL Perl PHP Python Ruby SAP VB.net EJB Struts Cloud Computing WebServices XML Office 365 Hibernate