All Products
Search
Document Center

Simple Application Server:Upgrade a simple application server

Last Updated:Jan 26, 2024

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.

Warning

If the upgrade fails, data may be lost. We recommend that you create snapshots for the disks of your simple application server to back up data before you upgrade the server. 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:

  • Simple application servers cannot be upgraded from an instance plan that provides a solid state drive (SSD) to an instance plan that provides an enhanced SSD (ESSD) at performance level 0 (PL0). For example, if you want to upgrade a simple application server from an instance plan that provides an SSD to an instance plan that provides a PL0 ESSD, we recommend that you perform the following operations: Create a custom image based on the system disk snapshot of the simple application server, and then select the created custom image and an instance plan that provides a PL0 ESSD to create a simple application server. For more information, see Overview of custom images.

  • To upgrade the server, you must select a higher-specification plan. The server cannot be downgraded after it is upgraded.

  • When you upgrade the server, the system calculates the price difference between the original and new plans. You must pay for the difference. The price difference that is displayed on the Upgrade page of the Simple Application Server console takes precedence.

    For example, you purchase Plan A of USD 3.5 per month for one year at a 15 percent discount. After six months, the current configuration cannot meet your requirements. You want to upgrade the server to Plan B of USD 4.5 per month, which provides a 12 percent discount for a half-year order. In this case, you must pay for a price difference. Price difference = (Plan B - Plan A) × (100% - discount) × subscription months, or (4.5 - 3.5) × (100% - 12%) × 6 = USD 5.28.

  • 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 system disk in the Simple Application Server console by upgrading the server, you only extend the storage capacity of the system disk. Therefore, you must extend the partition and file system on the system disk after the upgrade.

        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 counted against the data transfer quota in the new plan after the server is upgraded.

        For example, before the upgrade, 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 upgrade, 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 1 Mbit/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.

Procedure

  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 ID in the server card.

  3. In the upper-right corner of the Server Overview page, click Upgrade.

  4. In the Precautions message, read the precautions for server upgrade and click Go to Upgrade page.

  5. In the Instance Plan section, select a new plan based on your business requirements.

    You can view the configuration fee in the lower-right corner of the page.

  6. In the Terms of Service section, select I have read and agree to General Terms and 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, confirm 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. Extend the partition and file system on the system disk.

    If the system disk capacity increases after the server is upgraded, you must extend the partition and file system on the system disk to complete the extension of 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.

    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 40 GB. After the server is upgraded, the new capacity of the system disk is 50 GB.

    Note

    For each simple application server, the default device name of the system disk is /dev/vda.

    1. Connect to the Linux server that is upgraded.

      For more information, see Connect to a Linux server.

    2. View the information about the disks and partitions of the server.

      1. Run the following command to view the information about the disks of the server:

        sudo fdisk -lu

        Data disks are not involved in the upgrade of simple application servers. The following figure shows only the information about system disk /dev/vda on the Linux server. adad566Description of the information shown in the preceding figure:

        • Section 1: shows the new capacity of system disk /dev/vda after the upgrade.

        • Section 2: The information below Device indicates the partition name of the system disk. The information below 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 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 the information about the partitions:

        df -Th

        For each Simple Application Server, the default file system type of system disk partition /dev/vda1 is ext4. The command output shows that the file system of the system disk partition remains 40 GB in size, as shown in the following figure. To complete the extension of the system disk, you must extend the partition and the file system.adad56

    3. 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:

          sudo 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:

          sudo apt-get update

          Run the following command to install cloud-guest-utils:

          sudo apt-get install -y cloud-guest-utils
      2. Run the following command to extend the partition:

        Note

        Use a space to separate /dev/vda and 1 in the command.

        sudo growpart /dev/vda 1

        The following figure shows the command output. adad6If an error occurs when the command is run, you can manually troubleshoot the issue. For more information, see Step 1: Resize a disk to extend its capacity.

    4. Extend the file system.

      The default file system type of system disk partition /dev/vda1 is ext4. This section describes how to extend an ext4 file system.

      1. Run the following command to extend the file system:

        sudo resize2fs /dev/vda1
      2. Run the following command to check whether the file system is extended:

        df -Th

        If the file system is 50 GB in size, as shown in the following figure, the file system is extended. adad566After you extend the system disk, check whether the actual size of the system disk is the same as the size that you expect.

        • If the actual size of the system disk is the same as 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 the same as 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 Create a snapshot.

    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 is upgraded.

      For more information, see Connect to a Windows server.

    2. In the lower-left corner of the Windows desktop, right-click the 开始 icon and click 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.未分配

    3. Right-click the blank space in the Disk 0 section and select 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.扩容完成

      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 the same as 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 Create a snapshot.