If the configurations of your simple application server do not meet your business requirements, you can upgrade the server. This topic describes how to upgrade a simple application server.

Background information

We recommend that you create snapshots for the disks of your simple application server to back up data before you upgrade the server. For more information, see Create a snapshot.
Note It takes time to create snapshots. Wait until the snapshots are created.

Precautions

Before you upgrade a simple application server, take note of the following items:
  • To upgrade the server, you must select a higher-specification plan. The server cannot be downgraded after it is upgraded.
  • After the simple application server is upgraded, you cannot mount a data disk to the server or extend existing data disks.
  • When you upgrade the server, the system calculates the price difference between the original and new plans. You must pay this difference. The actual price difference is displayed on the Upgrade/Downgrade page of the Simple Application Server console.
  • After the server is upgraded, the resources of the server may change or remain unchanged as described in the following list:
    • The expiration time and IP address of the server remain unchanged.
    • Computing resources (vCPUs and memory), storage resources (system disk capacity), and network resources (data transfer quota and public bandwidth) are upgraded to the configurations included in the new plan.
      For the system disk and data transfer quota of the server, take note of the following items:
      • After you upgrade the disk system in the Simple Application Server console by upgrading the server, you only extend the storage capacity of the system disk. Therefore, after you upgrade the system disk by upgrading the server, you must extend the partition and file system on the system disk.
        Note If the system disk capacity remains unchanged after the server is upgraded, you do not need to extend the partition and file system on the system disk.
      • If you have used a portion of the data transfer quota in the original plan of the server, this portion is included in the new plan after the server is upgraded.
        For example, before the server is upgraded, your simple application server has a data transfer quota of 400 GB and has transferred 100 GB of data to the Internet this month. After the server is upgraded, the server has a new data transfer quota of 600 GB. The 100 GB is included in the new quota and the data transfer quota balance of the server is 500 GB.
        Note Some plans such as a plan that consists of 1 vCPU, 1 GB memory, a 1Mbit/s bandwidth, and a 20 GB standard SSD do not include monthly data transfer quotas. The data transfers of the server are not calculated. However, if you upgrade a simple application server from such a plan to a plan that includes a monthly data transfer quota, the server starts to count the data transfers.

Upgrade a simple application server

  1. Log on to the Simple Application Server console.
  2. On the Servers page, find the simple application server that you want to upgrade and click the server card.
  3. In the upper-right corner of the Overview page, click Upgrade.
    ada
  4. In the Precautions dialog box, read the precautions for server upgrade and then click Go to the upgrade page.
  5. In the Instance Plan section, select a new plan based on your needs.
  6. In the Terms of Service section, select I have read and agree General Terms and I have read and agree End User License.
    Read the General Terms and End User License and make sure that you fully understand the terms before you agree to them.
  7. Click Buy Now. On the Purchase page, check the order information and complete the payment as prompted.
    Go back to the Simple Application Server console and wait for the server to restart. When the status of the server changes to Running, the server is upgraded.
  8. Connect to the server to extend the partition and file system on the system disk.
    Note If the system disk capacity remains unchanged after the server is upgraded, you do not need to extend the partition and file system on the system disk. Skip this step.
    If the system disk capacity increases after the server is upgraded, you must extend the partition and file system on the system disk. For more information, see:

Extend the partition and file system on the system disk of a Linux server

In this example, the original capacity of the system disk is 20 GB. After the server is upgraded, the new capacity of the system disk is 40 GB.
Note For all simple application servers, the default device name of the system disk is /dev/vda.
  1. Connect to the Linux simple application server that has been upgraded.
  2. Run the following command to switch to the root user:
    sudo su root
  3. View the disks and partitions of the server.
    1. Run the following command to view the disks of the server:
      fdisk -lu
      When you upgrade a simple application server, the capacity of the data disks of the server is not affected. Therefore, the following figure only shows the information of the system disk (/dev/vda) on the server. fdiskDescriptions of the preceding figure:
      • Section ①: shows the new capacity of the system disk (/dev/vda) after the server is upgraded.
      • Section ②: The information under Device indicates the partition name of the system disk. The Information under System indicates the partition format of the system disk. In this example, Linux indicates that the partition format is Master Boot Record (MBR). By default, the partition name of the system disk of simple application servers is /dev/vda1 and the partition format is MBR.
    2. Run the following command to view disk partitions:
      df -Th
      For simple application servers, the default file system type of the system disk partition (/dev/vda1) is ext4. The command output shows that the file system of the system disk partition remains 20 GB in size, as shown in the following figure. To extend the system disk, you must extend the partition and the file system. df
  4. Extend the partition.
    1. Run the following command to install the growpart utility.
      The commands that are used to install the growpart utility vary based on the operating system of the simple application server.
      • If the server runs CentOS 7 or later, run the following command:
        yum install -y cloud-utils-growpart
      • If the server runs Debian 9 or later, or Ubuntu 14 or later, run the following commands in sequence.
        Run the following command to update the software repository:
        apt-get update
        Run the following command to install cloud-guest-utils:
        apt-get install -y cloud-guest-utils
    2. Run the following command to extend the partition.
      Note Use a space to separate /dev/vda from 1 in the command.
      growpart /dev/vda 1
      The following figure shows the command output. growpartIf an error occurs when the command is run, you can manually troubleshoot the issue. For more information, see FAQ.
  5. Extend the file system.
    For simple application servers, the default file system type of the system disk partition (/dev/vda1) is ext4. This step describes how to extend an ext4 file system.
    1. Run the following command to extend the file system:
      resize2fs /dev/vda1
    2. Run the following command to check whether the file system is extended:
      df -Th
      If the file system is 40 GB in size, as shown in the following figure, the file system is extended. Check the extension resultAfter you extend the system disk, check whether the actual size of the system disk is increased to the expected value.
      • If the actual size of the system disk is increased to the expected value and programs on the server run smoothly, the upgrade of the simple application server is complete.
      • If the actual size of the system disk is not increased to the expected value or programs on the server do not run smoothly, use the snapshot to roll back the system disk. For more information, see Manage snapshots.

Extend the file system on the system disk of a Windows server

In this example, a simple application server that runs a Windows Server 2012 R2 64-bit operating system is used. The original capacity of the system disk (Disk C) is 40 GB. After the server is upgraded, the new capacity of the system disk (Disk C) is 60 GB.

  1. Connect to the Windows simple application server that has been upgraded.
    For more information, see Connect to a Windows server.
  2. In the lower-left corner of the Windows desktop, right-click the Start icon and click Disk Management.
    Disk Management
    In the Disk Management dialog box, you can view the amount of unallocated space on the system disk after the server is upgraded. Unallocated
  3. Right-click the blank space in the Disk 0 section and select Extend Volume...
    Extend Volume
  4. In the Extend Volume Wizard dialog box, use the default settings to extend the volume.
    The new space is automatically added to the original volume, as shown in the following figure. Volume extended
    After you extend the system disk, check whether the actual size of the system disk is increased to the expected value.
    • If the actual size of the system disk is increased to the expected value and programs on the server run smoothly, the upgrade of the simple application server is complete.
    • If the actual size of the system disk is not increased to the expected value or programs on the server do not run smoothly, use the snapshot to roll back the system disk. For more information, see Manage snapshots.