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

Background information

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

Precautions

Before you upgrade the configurations of a simple application server, take note of the following items:
  • During the upgrade, you can select only a higher-specification plan. Server configurations cannot be downgraded after they are upgraded.
  • You cannot attach a data disk or extend the attached data disk.
  • When you upgrade the server configurations, 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 configurations are upgraded, the resources of the server may change or remain unchanged as described in the following list:
    • The expiration time and IP addresses of the server remain unchanged.
    • Computing resources (CPUs 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:
      • If you extend the system disk from its original capacity, the system disk is upgraded. If the system disk capacity increases after the server configurations are upgraded, the partition and file system on the system disk must be extended.
        Note If the system disk capacity remains unchanged after the server configurations are upgraded, the partition and file system on the system disk do not need to be extended.
      • 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 configurations are upgraded.
        For example, before the server configurations are 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 configurations are 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. Data transfer fees are excluded from such plans. However, if you upgrade a simple application server from such a plan, the new plan includes a monthly data transfer quota, and the server starts to count the data transfer.

Upgrade the server configurations

  1. Log on to the Simple Application Server console.
  2. On the Servers page, find the simple application server whose configurations you want to upgrade and click the server card.
  3. On the Overview page, click Upgrade in the Server Information section.
    135
  4. In the Server Upgrade dialog box, click Go to upgrade page action.
  5. In the Instance Plan section, select a plan. 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 terms of service and make sure that you fully understand the terms before you agree to them.
  6. Click Buy Now. On the Purchase page, confirm the order and click Purchase to complete the payment.
    Go back to the Simple Application Server console and wait for the server to restart. When the state of the server changes to Running, the upgrade is complete.
  7. 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 configurations are upgraded, the partition and file system on the system disk do not need to be extended. Skip this step.
    If the system disk capacity increases after the server configurations are upgraded, you must extend the partition and file system on the system disk. The extend operations vary based on operating systems. For more information, see the following sections:

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 configurations are upgraded, the new capacity of the system disk is 40 GB.
Note For each simple application server, the default device name of the system disk is /dev/vda.
  1. Connect to the Linux server whose configurations are 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
      Data disks are not involved in the configuration upgrades of simple application servers. The following figure shows only the information of the system disk ( /dev/vda) on the Linux server. fdiskTake note of the following sections:
      • Section ①: shows the new capacity of the system disk (/dev/vda) after the upgrade.
      • Section ②: shows the partition name for the system disk under Device and the partition format for the system disk under System. Linux indicates that the partition format is Master Boot Record (MBR). By default, the partition on the system disk of each simple application server is named /dev/vda1 and uses the MBR partition format.
    2. Run the following command to view disk partitions:
      df -Th
      For each simple application server, the default file system type of the system disk partition ( /dev/vda1) is ext4. If the file system of the system disk partition remains 20 GB in size, as shown in the following figure, you must extend the partition and the file system. df
  4. Extend the partition.
    1. Run the following command to install the growpart tool.
      Different commands are used to install the growpart tool on different operating systems.
      • Run the following command if the server runs CentOS 7 or later:
        yum install -y cloud-utils-growpart
      • Run the following command if the server runs Debian 9 or later, or Ubuntu 14 or later.
        Update the software repository.
        apt-get update
        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 running, you can manually troubleshoot the error. For more information, see the " Troubleshooting" of the Resize disks online for Linux instances topic.
  5. Extend the file system.
    For each simple application server, 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 extending resultAfter the file system is extended, check whether the new file system size is as expected.
      • If the file system is extended and business programs on the server run normally, the extend operation is complete.
      • If the file system cannot be extended, use a snapshot to roll back the system disk.

Extend the partition and 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 configurations are upgraded, the new capacity of the system disk (Disk C) is 60 GB.

  1. Connect to the Windows server whose configurations are 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 upgrade. 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 the file system is extended, check whether the new file system size is as expected.
    • If the file system is extended and business programs on the server run normally, the extend operation is complete.
    • If the file system cannot be extended, use a snapshot to roll back the system disk.