Linux
處理 ATA 錯誤
我的 Xubuntu 16.04。產生不間斷的 ATA 錯誤消息。這是輸出
dmesg
[ 4547.943159] ata7: hard resetting link [ 4548.657810] ata7: SATA link down (SStatus 0 SControl 300) [ 4548.657824] ata7: EH complete [ 4548.757449] ata7: exception Emask 0x10 SAct 0x0 SErr 0x4000000 action 0xe frozen [ 4548.757455] ata7: irq_stat 0x00000040, connection status changed [ 4548.757459] ata7: SError: { DevExch } [ 4548.757467] ata7: hard resetting link [ 4549.469969] ata7: SATA link down (SStatus 0 SControl 300) [ 4549.469983] ata7: EH complete [ 4550.363622] ata7: exception Emask 0x10 SAct 0x0 SErr 0x4000000 action 0xe frozen [ 4550.363628] ata7: irq_stat 0x00000040, connection status changed [ 4550.363632] ata7: SError: { DevExch } [ 4550.363642] ata7: hard resetting link
此錯誤持續執行。
關於我的系統的資訊:
我有兩個硬碟和一個 DVD
# lsscsi [0:0:0:0] disk ATA MAXTOR STM325082 E /dev/sda [0:0:1:0] cd/dvd TSSTcorp CDDVDW SH-S223B SB02 /dev/sr0 [1:0:0:0] disk ATA SAMSUNG HD320KJ 0-10 /dev/sdb
硬碟的ata埠如下
/sys/bus/pci/devices/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda /sys/bus/pci/devices/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sdb
完整的 ata 埠列表是
# ls -l /sys/class/ata_port ata1 -> ../../devices/pci0000:00/0000:00:1f.2/ata1/ata_port/ata1 ata2 -> ../../devices/pci0000:00/0000:00:1f.2/ata2/ata_port/ata2 ata3 -> ../../devices/pci0000:00/0000:00:1f.5/ata3/ata_port/ata3 ata4 -> ../../devices/pci0000:00/0000:00:1f.5/ata4/ata_port/ata4 ata5 -> ../../devices/pci0000:00/0000:00:1c.6/0000:03:00.1/ata5/ata_port/ata5 ata6 -> ../../devices/pci0000:00/0000:00:1c.6/0000:03:00.1/ata6/ata_port/ata6 ata7 -> ../../devices/pci0000:00/0000:00:1c.6/0000:03:00.0/ata7/ata_port/ata7
和設備
# ls -l /sys/dev/block 11:0 -> ../../devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:1/0:0:1:0/block/sr0 7:0 -> ../../devices/virtual/block/loop0 7:1 -> ../../devices/virtual/block/loop1 7:2 -> ../../devices/virtual/block/loop2 7:3 -> ../../devices/virtual/block/loop3 7:4 -> ../../devices/virtual/block/loop4 7:5 -> ../../devices/virtual/block/loop5 7:6 -> ../../devices/virtual/block/loop6 7:7 -> ../../devices/virtual/block/loop7 8:0 -> ../../devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda 8:1 -> ../../devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda1 8:16 -> ../../devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sdb 8:17 -> ../../devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sdb/sdb1 8:18 -> ../../devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sdb/sdb2 8:19 -> ../../devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sdb/sdb3 8:20 -> ../../devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sdb/sdb4 8:21 -> ../../devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sdb/sdb5 8:22 -> ../../devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sdb/sdb6
最後是分區:
# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT loop1 7:1 0 55M 1 loop /snap/core18/1754 sdb 8:16 0 298.1G 0 disk ├─sdb4 8:20 0 1K 0 part ├─sdb2 8:18 0 46.6G 0 part / ├─sdb5 8:21 0 124.6G 0 part /home ├─sdb3 8:19 0 7.9G 0 part [SWAP] ├─sdb1 8:17 0 599.9M 0 part /boot └─sdb6 8:22 0 118.2G 0 part loop4 7:4 0 291M 1 loop /snap/vlc/1620 sr0 11:0 1 1024M 0 rom loop2 7:2 0 97M 1 loop /snap/core/9289 loop0 7:0 0 55M 1 loop /snap/core18/1705 sda 8:0 0 232.9G 0 disk └─sda1 8:1 0 197G 0 part loop5 7:5 0 96.5M 1 loop /snap/core/9436 loop3 7:3 0 290.4M 1 loop /snap/vlc/1700
問題:
我該如何解決這個錯誤?
任何有助於解決它的可能幫助也值得讚賞,例如,這個 ata7 有問題的埠是什麼?從我收集的所有數據來看,它似乎不對應於任何物理磁碟或任何分區。
我該如何解決這個錯誤?
更換硬碟,因為它顯然是在做 ATA 重置。這(幾乎在所有情況下)都是電子產品瀕臨死亡或嘮叨鬆動的跡象。
也許是 SATA/SAS 電纜(或連接器),所以您可以先檢查/更換它。但在大多數情況下,我最近幾年看到的是驅動器(電子設備)本身。
我也可以更換整台電腦
是的,這也能解決問題。對我來說,這在時間和金錢上聽起來有點激進和昂貴,但這肯定會解決它。
你能解釋我為什麼要更換硬碟嗎
因為是缺陷。健康的驅動器不會玩開|關遊戲。
$$ … $$不嘗試以另一種更溫和的方式解決問題?
確實有一些可用的選項。您始終可以從 USB 記憶棒啟動(也許可以工作)。您可以將新的 HDD 與缺陷硬碟放在一起(並忽略它),或者不再使用這台電腦。但是這些都不能修復損壞的驅動器。
提示:用軟體或“其他溫和的方式”解決硬體問題幾乎從來都不是真正的選擇。