By opening the VNC window, I found that it prompted "Scanning and repairing drive c". At this time, you need to wait patiently.
The main reason for this situation is that the user improperly operates the computer, such as forced shutdown during the operation of the computer or a sudden power outage during the operation of the computer, etc., resulting in certain damage or errors to the disk. When the computer is turned on next time, Windows The system will automatically detect errors on the drive and attempt to repair them.
Case 2: When centos enters the system, the partition table reports an error and cannot enter the system. At this time, the system is in a remote state and needs to be logged in through the VNC window.
After logging into the system page, I found the following error:
Solution
Use xfs_repair command to repair partition
The command is simple to use, (command + partition path, assuming the partition to be repaired is /dev/mapper/centos-root)
xfs_repair /dev/mapper/centos-root
If an error is reported after execution, you can add an L parameter
xfs_repair -L /dev/mapper/centos-root
1. Check which partitions are reporting errors
ls /dev/mapper/
2. Repair partition
xfs_repair /dev/mapper/cl-root
If the following information is prompted, you can add an L parameter
3. Add the L parameter to the command xfs_repair -L /dev/mapper/cl-root
Wait for the repair to be completed and then reboot the system.
Case 3: Give root password for maintenance (or type Control-D to continue) appears when booting Linux
You can try Ctrl+D first to continue booting. If it still cannot be started, it may be caused by abnormal shutdown and the mount is lost.
1. Enter the password to log in
2. Then enter mount -o remount,rw/
3. Enter vi /etc/fstab to check the configuration file.
4. Enter lsblk to check and find that the /home mount is missing.
5. At this time, enter mount -a and remount /home (if there is a lot of data in /home, the mounting time may be longer, so you need to wait patiently)
6. Generally, there is a problem with the partition file or the hard disk. If there is a problem with the hard disk, submit it to a technical inspection. You need to use the repair command to repair the problem partition.
The command is as follows: xfs_repair -L /dev/mapper/problem partition
7. After the repair is completed, enter reboot to restart the server and you can successfully enter the system.