經過幾個掛起/恢復週期後,我的硬碟之一從設備列表中消失,以下是dmesg
似乎與問題相關的輸出的一部分:
[ 450.005310] sd 5:0:0:0: [sdc] Starting disk
[ 451.754602] ata6.00: detaching (SCSI 5:0:0:0)
[ 451.755862] sd 5:0:0:0: [sdc] Stopping disk
[ 451.993621] ata6: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[ 451.993682] sd 5:0:0:0: [sdc] Start/Stop Unit failed: Result: hostbyte=0x04 driverbyte=0x00
設備本身應該沒問題,Ubuntu 在那裡工作了幾個星期,在其他驅動器上安裝 Gentoo 並將其用作存儲後出現問題。看起來核心中的設備初始化過程有一些超時,這對於這個慢速磁碟來說還不夠。
使用 2 個不同的核心重現了這個問題:從 gentoo-sources 套件建構的 4.1.15、4.4.1。
Linux 發行版:Gentoo
更新:
遺失磁碟後嘗試重新掃描
echo "- - -" > /sys/class/scsi_host/host5/scan
我的磁碟又回來了
[ 1517.414376] ata6: hard resetting link
[ 1517.718490] ata6: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[ 1517.722674] ata6.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[ 1517.722677] ata6.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
[ 1518.140312] ata6.00: ATA-8: TOSHIBA MQ01ABD100, AX0P8E, max UDMA/100
[ 1518.140316] ata6.00: 1953525168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[ 1518.142307] ata6.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[ 1518.142310] ata6.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
[ 1518.143854] ata6.00: configured for UDMA/100
[ 1518.143861] ata6: EH complete
[ 1518.144170] scsi 5:0:0:0: Direct-Access ATA TOSHIBA MQ01ABD1 8E PQ: 0 ANSI: 5
[ 1518.144301] sd 5:0:0:0: [sdc] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
[ 1518.144304] sd 5:0:0:0: [sdc] 4096-byte physical blocks
[ 1518.144334] sd 5:0:0:0: Attached scsi generic sg2 type 0
[ 1518.144350] sd 5:0:0:0: [sdc] Write Protect is off
[ 1518.144354] sd 5:0:0:0: [sdc] Mode Sense: 00 3a 00 00
[ 1518.144387] sd 5:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 1518.175044] sdc: sdc1
[ 1518.175497] sd 5:0:0:0: [sdc] Attached SCSI removable disk
所以至少我有解決方法,仍然希望找到更好的解決方案。
答案1
我不知道ubuntu 核心中使用了哪些神奇補丁(或者可能是gentoo-sources 中的某些內容,或者我的核心配置有問題),但在切換到ubuntu 16.04(核心4.4.0-11-generic)後我的問題消失了)。