Preprocessing for Disk-intensive 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 a disk-intensive ECS (D series) before authorizing the replacement of this disk.
Replacing a local disk will cause data loss on it. If you do not need to retain the data, perform the operations described in this section to preprocess the disk to be replaced.
If you need to retain the data, stop your operation and contact technical support.
Procedure
The following describes how to preprocess local disks for ECSs running different OSs.
Obtain the information of the faulty local disk.
- Log in to the management console.
- Click
in the upper left corner and select a region and project. - Click
. Under Compute, choose Elastic Cloud Server. - In the navigation pane, choose Events.
- In the event list, check Description of the Local disk replacement event to obtain the WWN of the faulty local disk.
For example, the WWN is wwn-0x5000c500e01a4930.
Obtain the mount point of the faulty local disk.
- Remotely log in to the ECS whose disk needs to be preprocessed.
- Obtain the disk partition matching the WWN of the faulty disk.
ll /dev/disk/by-id/ | grep WWN
For example, if the WWN is wwn-0x5000c500e01a4930, run the following command:
ll /dev/disk/by-id/ | grep wwn-0x5000c500e01a4930
The following information is displayed:
lrwxrwxrwx 1 root root 9 May 13 14:05 wwn-0x5000c500e01a4930 -> ../../sdb
- Obtain the mount point of the faulty local disk.
For example, if the disk partition is /dev/sdb, run the following command:
df -Th| grep /dev/sdb
The following information is displayed:
/dev/sdb ext4 3.6T 28K 3.4T 1% /data
Unmount the faulty local disk.
- Unmount the faulty local disk.
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.
- Obtain the UUID of the disk partition.
For example, if the disk partition is /dev/sdb, run the following command:
blkid /dev/sdb
The following information is displayed:
/dev/sdb: UUID="626c4774-e60e-4d86-bbe6-031bac126e4c" TYPE="ext4"
- 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 626c4774-e60e-4d86-bbe6-031bac126e4c, run the following command:
cat /etc/fstab | grep 626c4774-e60e-4d86-bbe6-031bac126e4c
If the following information is displayed, the /etc/fstab file contains information about automatic mounting of the disk partition:
UUID=626c4774-e60e-4d86-bbe6-031bac126e4c /mnt ext4 defaults 0 0
- In the /etc/fstab file, delete or comment out the configuration of automatic mounting for the disk partition to prevent the ECS from entering the emergency mode upon startup after its local disk is replaced.
- Open the /etc/fstab file.
vi /etc/fstab
- Press i to enter the editing mode.
- 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=626c4774-e60e-4d86-bbe6-031bac126e4c /mnt ext4 defaults 0 0
- Press Esc, enter :wq, and press Enter to save the change and exit the editing mode.
- Open the /etc/fstab file.
Obtain the SN of the faulty local disk.
- Log in to the management console.
- Click
in the upper left corner and select a region and project. - Click
. Under Compute, choose Elastic Cloud Server. - In the navigation pane, choose Events.
- 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.
- Remotely log in to the ECS whose disk needs to be preprocessed.
- Check the mapping between the disk ID and SN to obtain the disk ID.
- If the ECS is running Windows Server 2012 or later, open the Windows PowerShell window as an administrator and run the following command:
Get-Disk | select Number, SerialNumber
Figure 1 Checking the mapping between the disk ID and SN
- If the ECS is running Windows Server 2008, open the Command Prompt window as an administrator and run the following command:
wmic diskdrive get Index, SerialNumber
- If the ECS is running Windows Server 2012 or later, open the Windows PowerShell window as an administrator and run the following command:
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot