Detect disk repair bad sectors

Disk bad sectors into logical bad sectors and physical bad two, the former is mainly due to the improper operation of the software, you can use software to repair, which is the physical damage, it can only be improved by changing the position occupied disk partition or sector (low grid), thus excluding contains bad blocks of disk space, disk if the following occurs, there may be a disk bad sectors, it is necessary to detect and repair

(1) read the data on the disk, the disk device abnormal sounds

(2) when accessing a disk in a file, read repeatedly and wrong, suggesting file corruption

(3) for the newly created partition format can not be completed

(4) system frequently crashes when using disk

If the disk has bad sectors, if not promptly replaced or technical processing, bad sectors will be more and more, and may cause frequent crashes and data loss consequences, if necessary, should be on the disk and retrograde regular testing to check for Bad Sectors

In the Linux operating system, to detect disk bad sectors, you can use badlocks command, combined with the -s option to display progress information, -v option to show details

Repair method:

badblocks -sv /dev/sdb

In the process of long-term use of the computer, the file system and disk failure phenomena like, it is difficult to completely avoid, very cautious in need of such treatment to repair the fault, if careless operation, likely to increase the degree of data corruption when the disk was found when there is bad sectors, should be stopped as soon as the system services, backup data, immediately shut down the system if necessary to prevent the further spread of the disk bad sectors, leading to greater losses for the existence of bad sectors hard disk device, use other healthy hard disk replaced.

Guess you like

Origin www.cnblogs.com/elin989898/p/11317453.html