centos出現磁碟壞掉,怎麼修複和檢測。

來源:互聯網
上載者:User

標籤:

當dmesg的時候,出現下面的資訊說明磁碟有問題

Info fld=0x139066d0end_request: I/O error, dev sda, sector 328230608Buffer I/O error on device 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 device 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 device 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 device sda, logical block 41028826sd 0:0:0:0: SCSI error: return code = 0x08000002sda: Current: sense key: Medium Error Add. Sense: Unrecovered read error

1. 首先檢測下壞掉

badblocks -s -v -o /root/bb.log /dev/sda  將結果儲存到bb.log

[[email protected] ~]# badblocks -s -v -o /root/badblocks.log /dev/sdaChecking blocks 0 to 586061784Checking for bad blocks (read-only test): done                                Pass completed, 173 bad blocks found.

 

smartctl -a   /dev/sda3 (快速檢測硬碟壞道,看read,write 後面有沒有errors)

2. 邏輯壞道修複方法

①、badblocks -s -w /dev/sda END START (END代表需要修複的扇區末端,START代表需要修複的扇區開始端點)
②、fsck -a /dev/sda

修複後再用badblocks -s -v -o /root/bb.log /dev/sda監測看是否還有壞道存在,如果壞道還是存在的話說明壞道屬於硬碟壞道。硬碟壞道要用隔離方法,首先記錄監測出的硬碟壞道然後分區的時候把硬碟壞道所在的扇區分在一個分區(大小一般大於坏扇區大小),劃分出的壞道分區不使用即可達到隔離的目的

3. 0磁軌壞道和硬碟壞道(準備換硬碟)

0磁軌壞道的修複方法是隔離0磁軌,使用fdsk劃分區的時候從1磁軌開始劃分區。

如果是硬碟壞道的話,只能隔離不能修複

 

centos出現磁碟壞掉,怎麼修複和檢測。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.