Updated on 2024-10-18 GMT+08:00

Preprocessing for Ultra-high I/O ECSs

Scenarios

Before authorizing the replacement of a faulty local disk, you need to preprocess the local disk.

This section describes how to preprocess a faulty local disk of an ultra-high I/O ECS before authorizing the replacement of this disk.

Replacing a local disk will lose data on it. If you do not need these data, perform operations in this section to preprocess the disk to be replaced.

If you need to retain the data, stop your operation here and contact technical support.

Procedure (Linux ECS)

Obtain the SN of the faulty local disk.

  1. Log in to the management console.
  2. Click in the upper left corner and select your region and project.
  3. Click . Under Compute, click Elastic Cloud Server.
  4. In the navigation pane, choose Events.
  5. In the event list, check Description of the Local disk replacement event to obtain the SN of the faulty local disk.

    For example, the SN is 1003004212241800EY.

Obtain the mount point of the faulty local disk.

  1. Remotely log in to the ECS whose disk needs to be preprocessed.
  2. Obtain the drive letter matching the SN of the faulty disk.

    ll /dev/disk/by-id/ | grep SN

    For example, if the SN is 1003004212241800EY, run the following command:

    ll /dev/disk/by-id/ | grep 1003004212241800EY

    The following information is displayed:

    lrwxrwxrwx 1 root root 13 Dec 14 18:55 nvme-RP2001T6RK004VX_1003004212241800EY -> ../../nvme0n1
  3. Obtain the mount point of the faulty local disk.

    df -Th | grep drive-letter

    For example, if the drive letter is /dev/nvme0n1, run the following command:

    df -Th| grep /dev/nvme0n1

    The following information is displayed:

    /dev/nvme0n1   ext4   1.5T 77M 1.4T 1%  /data

Preprocessing a local disk to be replaced will lose data on it. If you need to retain the data, stop your operation here and contact technical support.

Unmount the faulty local disk.

  1. Unmount the faulty local disk.

    umount mount-point

    For example, if the mount point is /data, run the following command:

    umount /data

Check whether automatic mounting of the faulty disk is configured in /etc/fstab of the ECS.

If automatic mounting is configured for the faulty disk in /etc/fstab of the ECS, delete or comment out the configuration so that the ECS will not enter the emergency mode after its local disk is replaced.

  1. Obtain the UUID of the disk partition.

    blkid disk-partition

    For example, if the disk partition is /dev/nvme0n1, run the following command:

    blkid /dev/nvme0n1

    The following information is displayed:

    /dev/nvme0n1: UUID="11e39b6b-07fc-4675-8302-04c7ce7e30bd" TYPE="ext4"
  1. Check whether /etc/fstab contains information about automatic mounting of the disk partition.

    cat /etc/fstab | grep disk-partition-UUID

    For example, if the UUID is 11e39b6b-07fc-4675-8302-04c7ce7e30bd, run the following command:

    cat /etc/fstab | grep 11e39b6b-07fc-4675-8302-04c7ce7e30bd

    If the following information is displayed, the /etc/fstab file contains information about automatic mounting of the disk partition:

    UUID=11e39b6b-07fc-4675-8302-04c7ce7e30bd    /mnt   ext4    defaults        0 0
  2. In the /etc/fstab file, delete or comment out the configuration of automatic mounting for the disk partition so that the ECS will not enter the emergency mode after its local disk is replaced.
    1. Open the /etc/fstab file.

      vi /etc/fstab

    2. Press i to enter the editing mode.
    3. Delete or comment out the configuration of automatic mounting found in 2.
      To comment out the configuration, add # in front of it. For example:
      # UUID=11e39b6b-07fc-4675-8302-04c7ce7e30bd    /mnt   ext4    defaults        0 0
    4. Press Esc, enter :wq, and press Enter to save the change and exit the editing mode.

Stop the ECS.

  1. In the event list, check the name or ID of the ECS (Instance Name/ID in the Local disk replacement event).
  1. In the navigation pane, choose Elastic Cloud Server. Locate the ECS based on its name or ID. In the Operation column, choose More > Stop.

    After you complete preprocessing the local disk, restart the ECS to synchronize the disk information to the virtualization layer.

Procedure (Windows ECS)

Obtain the SN of the faulty local disk.

  1. Log in to the management console.
  2. Click in the upper left corner and select your region and project.
  3. Click . Under Compute, click Elastic Cloud Server.
  4. In the navigation pane, choose Events.
  5. In the event list, check Description of the Local disk replacement event to obtain the SN of the faulty local disk.

    For example, the SN is WS22LX16.

Obtain the disk ID to confirm the disk to be replaced.

  1. Remotely log in to the ECS whose disk needs to be preprocessed.
  2. Open Windows PowerShell as an administrator and obtain the disk ID based on the SN.

    Get-Disk | select Number, SerialNumber

    Figure 1 Checking the mapping between the disk ID and SN

    Replacing a local disk will lose data on it. If you need to retain the data, stop your operation here and contact technical support.

Stop the ECS.

  1. In the event list, check the name or ID of the ECS (Instance Name/ID in the Local disk replacement event).
  1. In the navigation pane, choose Elastic Cloud Server. Locate the ECS based on its name or ID. In the Operation column, choose More > Stop.

    After you complete preprocessing the local disk, restart the ECS to synchronize the disk information to the virtualization layer.