Detection and repair of bad track in ubuntu

Source: Internet
Author: User
Run the command line to check and fix the bad track in ubuntu. 02 1: Check the bad track 03. you must detach it before operating the disk ~ The 04umount parameter is as follows: www.2cto. com05-a unload all file systems recorded in/etc/mtab. 0-6 h show help. 07 -...
Run the command line to check and fix the bad track in ubuntu. 02 1: Check the bad track 03. you must detach it before operating the disk ~ The 04umount parameter is as follows: www.2cto.com 05-a unload all file systems recorded in/etc/mtab. 06-h shows help. Do not store the information in the/etc/mtab file during the 07-n removal. 08-r if the dismounting fails, try to re-mount the file system in read-only mode. 09-t <文件系统类型> Only remove the file system specified in the option. 10-v detailed information is displayed during execution. 11-V displays the version information. 12 13 read-only detection on the entire disk: 14 sudo badblocks-s-v-c 32/dev/sdb15 detection can be terminated midway through, or you can specify a block to start again. 16 sudo badblock-s-v-c 32/dev/sd * 976762583 125637824 (note that the ending block is before and the starting block is behind) 17 18 badblocks usage description 19 syntax: 20 badblocks [-svw] [-B <block size>] [-o <output file>] [disk device] [number of disk blocks] [start Block] 21 22 parameters: 23-B <block size> specifies the disk block size, in bytes. 24-o <output file> writes the check result to the specified output file. 25-c <check block count> The number of blocks per inspection. The default value is 16. Adding this quantity can increase the efficiency of the detection block and increase the memory consumption. 26-s shows the progress during the check. 27-v detailed information is displayed during execution. During the 28-w check, the write test is executed. 29 [disk device] specifies the disk device to be checked. 30 [number of disk blocks] indicates the total number of blocks of the disk device. 31 [start Block] specifies the block from which the check starts. 32 33 II: Fixed bad track 34. if it is just a logical bad track, you can 35 directly fsck36fsck-a/dev/sdb37 38 or format 39. if it is a physical bad track, you are really miserable. You need 40a. back up hard disk data 41b. delete all hard disk partitions 42c. estimate the occupied space based on the bad block location and size. Then partition and isolate the damaged parts. Btw: Bad Channels will spread, so try to isolate as much space as possible. Of course, look at the chkdsk tool in windows. it is very powerful ~ 01 check the disk and display the status report. 02 CHKDSK [volume [[path] filename] [/F] [/V] [/R] [/X] [/I] [/C] [/L [: size] 03 volume specifies the drive (followed by a colon), Mount point 04, or volume name. 05 filename is only used for FAT/FAT32: specify the file to check whether there are fragments. 06/F. 07/V on FAT/FAT32: displays the complete path and name of each file on the disk. 08 on NTFS: if a message is cleared, display it. 09/R searches for incorrect sectors and restores readable information (implicit/F ). 10 www.2cto.com/L: size is only used for NTFS: change the log file size to the specified KB. 11 if no size is specified, the current size is displayed. 12/X if necessary, force the volume to be detached first. All opened handles of volume 13 will be invalid (implicit/F ). 14/I is only used for NTFS: checks the index items for a low intensity. 15/C is only used for NTFS: Skip the loop check of the folder structure. 16 17/I and/C command line switches skip some checks on the volume to reduce the time required to run the Chkdsk.
 
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.