Linux disk repair e2fsck command

Source: Internet
Author: User
During the Tomb Sweeping Day the day before yesterday, I went to work overtime because the customer had a server that could not provide services. After troubleshooting, it was caused by a sudden power failure that could result in bad disk channels. Therefore, I used the e2fsck command to repair the disk. Linux disk check fix command e2fsck-a: check partition, such as hair...
During the Tomb Sweeping Day the day before yesterday, I went to work overtime because the customer had a server that could not provide services. After troubleshooting, it was caused by a sudden power failure that could result in bad disk channels. Therefore, I used the e2fsck command to repair the disk. Command e2fsck-a for disk check and repair in linux: check the partition. if any problem is found, it will be automatically repaired. -B: Set the superblock position. Www.2cto.com-B size: specify the size as the block size. -C: Check whether the partition has a bad track. -C file: save the check result to file. -D: output e2fsck debug results. -F: e2fsck only checks the wrong file system by default, and-f is mandatory. -F: Clear the buffer cache of the hard disk before checking to avoid errors. -L list: Records bad track blocks added to the list. -D: print the debug result of e2fsck. -F: Force check. -N: enable the file system with (read-only)-p: disable the interactive mode. if any problem occurs, it is automatically fixed, equivalent to-. -V: displays detailed reports. -Y: enable the user interaction mode. Use example www.2cto.com to check/dev/mapper/VolGroup00-LogVol02 for problems and fix them automatically if any: e2fsck-a/dev/mapper/VolGroup00-LogVol02 before executing e2fsck or fsck umount partition, otherwise, the file system may be damaged. When the partition is busy, you need to kill all the processes involved in the partition. a quick way is to execute fuser-k/home. If you need to check and fix the root directory (/), you need to enter singal user mode for execution. Finally, do not forget to mount the partition. Author and artist
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.