Badblocks checks whether the hard disk has a bad track. badblocks checks the hard disk

Source: Internet
Author: User

Badblocks checks whether the hard disk has a bad track. badblocks checks the hard disk

A hard disk is a device that is easy to break down. After a period of time, physical faults such as bad channels may occur. When a bad track occurs on the hard disk, if it is not replaced in time or technically processed, the number of bad tracks on the disk will increase and cause frequent crashes and data loss. The best solution is to replace the New disk. In a temporary situation, we should promptly block sectors of Bad Sectors and do not touch them.

Badblocks is a tool used to check whether a disk has a bad track. It can be read or written.

Here, I use

Badblocks-v/dev/sda

Check whether a bad track exists and the check result is correct


Badblocks Parameter options

-B blocksize
Disk block size, in bytes. Default Value: "block 4 K" (4 K/block)
-C blocksize
The number of times each block is checked. The default value is 16.
-F
Forces a read/write or non-destructive write test on a mounted device.
(We recommend that you first perform the umount device and then perform the bad track detection. This option can be used only when a device Mount error occurs in/etc/mtab)
-I file
Skip the bad track that has been displayed in the file without detecting it (you can avoid repeated detection)
-O file
Output the detection result to the file.
-P number
Repeat the device until no new bad block location is found within the specified number of passes. The default number of times is 0.
-S
Display progress during check
-T pattern
Blocks are read and written in the specified mode. You can specify a decimal positive value from 0 to ULONG_MAX-1, or use random (random ).
If you specify multiple modes, badblocks detects all blocks in the first mode, and then uses the next mode to detect all blocks.
The Read-only method only accepts one mode. It cannot accept the random mode.
-V
Detailed information is displayed during execution
-W
Write Data to each block before reading information from it.
[Device]
Specify the disk device to be checked.
[Last-block]
The total number of blocks for the specified disk device.
[Start-block]
Specify the block from which the check starts


How can I check whether a bad track exists on the hard disk? What measures should be taken if the hard drive encounters a bad track? Simple process description

I'm dizzy. What I mentioned above is too complicated. the simplest method is to click Start-run-cmd, then enter dos, and then enter each drive letter separately. Enter the chkdsk command to check the hard disk. If there is a bad track, you will be prompted. Also, you can add the/f command after the chkdsk, And it will fix it after it finds a bad track.

How can I check whether there are bad channels on the hard disk?

I'm dizzy. What I mentioned above is too complicated. the simplest method is to click Start-run-cmd, then enter dos, and then enter each drive letter separately. Enter the chkdsk command to check the hard disk. If there is a bad track, you will be prompted. Also, you can add the/f command after the chkdsk, And it will fix it after it finds a bad track.

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.