启动时驱动器托架为空时不工作

启动时驱动器托架为空时不工作

我有一个 SATA 驱动器托架,只有在启动时插入驱动器时才有效。如果我启动系统然后插入驱动器,它会开始运行(发出声音并振动),但它甚至不会显示在 中sudo fdisk -l

但是,如果我在插入驱动器的情况下启动系统,我可以在系统运行时将其移除,它会消失fdisk,再次插入它,然后它会重新出现并可用。

我认为该驱动器是“哑”的,这意味着没有控制器或任何涉及的东西,直接将驱动器连接到主板。

这个问题与主板有关吗?或者是否可以在启动时使用未插入磁盘的托架?这些托架可能甚至不是为热插拔驱动器而设计的吗?

答案1

我认为你的 SATA 控制/主板支持热插拔并且你正在使用 Debian/Ubuntu 系统。

要强制重新扫描 scsi(每个 sata 端口都显示为一个 scsi 总线),您必须在每个 hostX 控制器中写入“0 0 0” /sys/class/scsi_host/host<X>/scan (您必须是 root 用户)

如何在所有主机上执行此操作:

for i in `ls /sys/class/scsi_host/` ; do echo "0 0 0" > /sys/class/scsi_host/$i/scan ; done ; 

验证是否/var/log/kern.log显示新设备,如下所示:

Mar  1 11:27:48 gilito-MS-AF1511 kernel: [ 8307.445629] ata2: hard resetting link
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8307.762354] ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8307.763572] ata2.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8307.763579] ata2.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8307.763583] ata2.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8307.766011] ata2.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8307.766025] ata2.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8307.766033] ata2.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8307.766834] ata2.00: configured for UDMA/133
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8307.782363] ata2: EH complete
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8307.783079] ata5: hard resetting link
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8308.102607] ata5: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8308.107447] ata5.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8308.107455] ata5.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8308.107458] ata5.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8308.123863] ata5.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8308.123870] ata5.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8308.123874] ata5.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8308.129772] ata5.00: configured for UDMA/100
Mar  1 11:27:49 gilito-MS-AF1511 kernel: [ 8308.142581] ata5: EH complete

然后运行fdisk -l就可以看到新磁盘了

相关内容