In Linux, the /etc/fstab file is used to configure the automatic mounting information of file systems. If the /etc/fstab file of a Linux Elastic Compute Service (ECS) instance contains incorrect or unusable information of file systems that are automatically mounted, the operating system of the instance may fail to start when you restart the instance.
For information about the configurations in the /etc/fstab file, expand the following section.
fstab file
Causes
You did not modify the configurations in the fstab file before you detach or re-initialize a cloud disk. As a result, the file contains redundant automatic mounting information of file systems.
The device name or UUID of the file system is incorrectly configured.
The type of the file system is incorrectly configured.
The values of one or more mount parameters are invalid.
Solution
Connect to the Linux instance by using Virtual Network Computing (VNC). For more information, see Connect to an instance by using VNC.
NoteWhen the preceding issue occurred, the system entered the emergency mode. You must enter the password of the root user to log on to the system.
Back up the /etc/fstab file.
cp /etc/fstab /etc/fstab.bak
Run the following command to view the mounting information of all disks, including the partition names, file system types, and mount points:
df -Th
Run the following command to view the automatic mounting information of file systems in the /etc/fstab file:
cat /etc/fstab
Compare the mount point information in the /etc/fstab file with the mount point information that you obtained in Step 3. Delete the redundant configuration lines from the /etc/fstab file.
(Optional) If you want to configure the disk partitions that are not displayed in Step 3 to be automatically mounted on startup, perform the operations described in Configure UUIDs in the fstab file to automatically mount data disks.
Run the following command to restart the operating system:
reboot