Help Center/ Elastic Cloud Server/ FAQs/ OS FAQ/ How Can I Upgrade the Kernel of a Linux ECS?
Updated on 2024-09-26 GMT+08:00

How Can I Upgrade the Kernel of a Linux ECS?

Upgrade Notes

If tools have been installed on the Linux ECS, you must uninstall the tools before upgrading the ECS kernel. Otherwise, the following issues may occur after the kernel is upgraded:

  • The Linux ECS cannot identify the NIC, leading to network access failure.
  • The Linux ECS cannot identify data disks. As a result, starting system mount points fails, and the ECS cannot start.

Background

PVOPS is the Xen driver delivered with Linux distributions.

Procedure

  1. Log in to the ECS.
  2. Check whether the Tools have been installed on the Linux ECS, taking the SUSE Linux Enterprise Server 11 SP1 as an example.
    1. Run the following command on any directory to view the ECS driver:

      lsmod | grep xen

      Figure 1 Viewing the ECS driver
    2. Run the following command to view the driver path, taking a disk driver as an example:

      modinfo xen_vbd

      Figure 2 Viewing the driver path
    3. Check whether pvdriver is contained in the driver path.
      • If so, the tools have been installed in the ECS. Then, go to step 3.
      • If no, go to step 4.
  3. Uninstall the tools.
    1. Run the following command to switch to user root:

      su root

    2. Run the following command to uninstall Tools in the root directory:

      /etc/.uvp-monitor/uninstall

    After Tools is uninstalled, ECS monitoring metrics may be lost and monitoring data cannot be collected. To resolve this issue, you can compile and install the UVP Tools. For details, see https://github.com/UVP-Tools/UVP-Tools/.

  4. Upgrade the kernel using the method determined by yourself.
  5. Check whether the Linux ECS driver supports PVOPS. Use any one of the following methods:
    • Method 1:
      Determine based on the ECS OS.
      • All Linux distribution OSs are delivered with a Xen open-source driver, which supports PVOPS.
      • The SUSE Linux Enterprise Server 11 SP3 provided by the OS competence center is not delivered with any Xen open-source driver and does not support PVOPS.
    • Method 2:

      Check whether the ECS driver has a Xen driver module. If so, the ECS driver supports PVOPS. To obtain the data, run the following command in any directory:

      lsmod | grep xen

      Figure 3 Viewing the ECS driver

      The name of a Xen driver module varies depending on the Linux distribution OS. You only need to check whether the driver has a driver module with the XEN field.

    • Method 3:

      Run the cat /boot/config* | grep -i xen command in any directory and check whether the XEN field is contained in the command output. If so, the ECS driver supports PVOPS.

      Figure 4 Viewing the XEN field
  6. Upgrade the kernel based on the result obtained in step 5.
    • If the Linux ECS driver supports PVOPS, go to step 8.
    • If the Linux ECS driver does not support PVOPS, go to step 7.
  7. Install the open-source component xen-kmp so that the ECS driver supports PVOPS. For instructions about how to use PVOPS, see "Optimizing a Linux Private Image" in Image Management Service User Guide.
  8. (Optional) Configure required parameters based on the defect list for certain Linux distribution OSs.

    To obtain the defect list, go to following URL:

    https://github.com/UVP-Tools/UVP-Tools/tree/master/docs