In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
What this article shares with you is about how to repair the damaged disk under linux. The editor thinks it is very practical, so I share it with you. I hope you can get something after reading this article.
After the May Day holiday, I received a call from user-DB can not connect, because it is VM, so it is not a big problem, see what mistakes, troops will block, water to block.
Found that the system did not open normally, there is a restart action, and reported the error as shown in the figure, the error obviously indicates that the file system is damaged! In windows, you need to run the chkdsk command to repair due to illegal restart. Under linux, only fsck can fix file system errors. Linnux is very sensitive to file system errors. Accidental shutdown or restart of the linux system due to unexpected power outage or other reasons may cause serious damage to the linux file system, resulting in failure to enter the system normally. Fsck becomes an indispensable command under linux. However, the fsck command has a fatal weakness, that is, it is extremely dangerous for the mounted partition to run, and the system will crash completely if it is not repaired well. So it's the safest way to take a snapshot before fixing it.
Need to confirm what the file system of this partition is, this can use fdisk-l to check the relevant disk and drive letter, type fsck-c to show the complete check progress; enter y, if there are multiple damaged files, you will be prompted to enter y multiple times to repair. Fsck-t ext4 / dev/sda1 or fsck.ext4. This command determines only the disk type. In the fourth step, fsck-y / dev/sda1 is used to repair only the damaged files, and reboot is performed after repairing OK.
Summary
1: enter fsck-c
2: enter Yes
3: enter fsck-t ext4 / dev/sda1
4: enter fsck-y / dev/sda1
5. Reboot
Filesys: disk device name (eg./dev/sda1), mount point (eg. / or / usr)
-t: given the type of the file system, this parameter is not required if it is already defined in / etc/fstab or supported by kernel itself
-s: execute fsck instructions one by one in order to check
-A: check all listed partitions (partition) in / etc/fstab
-C: displays the full progress of the inspection
-d: print out the debug result of e2fsck
-p: when there is a-A condition, multiple fsck checks are performed at the same time.
-R: omit / do not check when there is also a-A condition
-V: detailed display mode
-a: if there is an error in the check, it will be repaired automatically
-r: if there is an error in the check, it is up to the user to answer whether to fix it.
-y: the option specifies that each file is automatically entered into yes, and when you are not sure which files are abnormal, you can perform a # fsck-y full check fix.
The above is how to repair the damaged disk under linux. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.