Disclaimer: this article may be contributed by the community or involve third-party product information, we recommend that you visit the community or the official website of third-party products for help and support. Third-party products will not be provided by Alibaba Cloud after-sales support. This document is for reference only. Alibaba Cloud makes no guarantee by express or any other means.
If other block devices are available on a Linux instance, the system may fail to after restarting the system. This article describes how to remove block devices that do not exist in the
/etc/fstab file of a Linux instance.
Alibaba Cloud reminds you that:
- Before you perform operations that may cause risks, such as modifying instance configurations or data, we recommend that you check the disaster recovery and fault tolerance capabilities of the instances to ensure data security.
- You can modify the configurations and data of instances including but not limited to Elastic Compute Service (ECS) and Relational Database Service (RDS) instances. Before the modification, we recommend that you create snapshots or enable RDS log backup.
- If you have authorized or submitted sensitive information such as the logon account and password in the Alibaba Cloud Management Console, we recommend that you modify such information in a timely manner.
Perform the following steps:
- To avoid data security risks caused by misoperations, create a snapshot of the system disk of a Linux instance. For more information about how to create a snapshot, see create normal snapshots.
- Log on to a Linux instance through SSH or VNC. For more information, see connection methods overview introduction.
Note: if your ECS instance cannot be started because of an exception related to the
/etc/fstabfile, fix the exception caused by incorrect configuration of the /etc/fstab file on Linux instances.
- Run the following command to view block information in the current Linux instance.
blkidA similar output is displayed, indicating that the Linux instance has two block devices.
Note: this is only an example. Follow the actual situation on site when performing the operation.
- Run the following command to view the information about block devices configured in the current
cat /etc/fstabCheck whether the
/etc/fstabfile and the block device information in the
blkidcommand result are inconsistent, that is, whether the
UUIDinformation is completely consistent. The command output is as follows:
- If there are inconsistencies, record the results of the
blkidcommand. Then execute the following command to edit the
Note: before modifying a file, back up theClick A key to delete the block device information in the
/etc/fstabfile that is inconsistent with the result of the
blkidcommand. After the update is complete, click Esc to exit the edit mode. Enter
: WQ, type
Enter, save and exit.
Note:A similar output is displayed, including a block device whose
- The colon (:) in
: WQneeds to be output by clicking
Shiftplus the colon (:) key.
- It is recommended to replace the delete operation with an annotation symbol (#).
unique. The site conditions are as follows.
- The colon (:) in
- Check whether the block device information in the
/etc/fstabfile is consistent with the information displayed in the
- Elastic Compute Service