CentOS appears to have disk broken, how to repair and detect.

Source: Internet
Author: User

when DMESG, the following message appears to indicate a problem with the disk

Info fld=0x139066d0end_request:i/o error, Dev SDA, Sector 328230608Buffer I/O error on device SDA, logical block 41028826 SD 0:0:0:0: SCSI error:return code = 0x08000002sda:current:sense Key:medium error ADD. sense:unrecovered Read ErrorInfo fld=0x139066d0end_request:i/o error, Dev SDA, Sector 328230608Buffer I/O error on Devic E SDA, logical block 41028826SD 0:0:0:0: SCSI error:return code = 0x08000002sda:current:sense Key:medium error ADD. sense:unrecovered Read ErrorInfo fld=0x139066d0end_request:i/o error, Dev SDA, Sector 328230608Buffer I/O error on Devi Ce SDA, logical block 41028826SD 0:0:0:0: SCSI error:return code = 0x08000002sda:current:sense Key:medium Error ADD . sense:unrecovered Read ErrorInfo fld=0x139066d0end_request:i/o error, Dev SDA, Sector 328230608Buffer I/O error on Devic E SDA, logical block 41028826SD 0:0:0:0: SCSI error:return code = 0x08000002sda:current:sense Key:medium error ADD. Sense:unrecovered Read error

1. First detect the broken down

Badblocks-s-v-o/ROOT/BB.LOG/DEV/SDA Save the results to Bb.log

[Email protected] ~]# badblocks-s-v-o/root/badblocks.log/dev/0586061784   for ill blocks (read-onlytest):                                done173 bad blocks found.

Smartctl-a/dev/sda3 (Fast detection of hard drive bad, see Read,write back there is no errors)

2. Logical bad Path repair method

①, Badblocks-s-W/DEV/SDA end Start (end represents the end of the sector that needs to be repaired, and start represents the starting end of the sector that needs to be repaired)
②, Fsck-a/DEV/SDA

After repair and then use badblocks-s-v-o/ROOT/BB.LOG/DEV/SDA monitoring to see if there is still a bad path exists, if the bad word or exist, it means bad road belongs to the hard drive bad. Hard drive bad path to use the Isolation method, first record the detected hard drive bad channel and then partition the hard drive bad path is located in a partition (the size is generally greater than the bad sector size), divided the bad channel partition is not used to achieve the purpose of isolation

3.0 track bad and hard drive bad (ready to change the hard drive)

0 Track Bad track repair method is to isolate 0 tracks, the use of Fdsk partition area from 1 tracks began to partition.

If the hard drive is bad, only quarantine cannot be repaired.

CentOS appears to have disk broken, how to repair and detect.

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.