如何在关机时让外接硬盘磁头归位?

我把 OpenSUSE Tumbleweed 装到了一个移动硬盘(USB Attached SCSI)上,然后每次关机的时候都有很响的一声,应该是关机的时候没有磁头归位,或者是等待的时间不够(Windows 安全弹出这个移动硬盘的时候没有这个声音),查看 S.M.A.R.T. 时 Power-Off Retract Cycle 也不低。

另外自带的 Disks 似乎没法读出 S.M.A.R.T. 信息,不知道是不是和这个有点关系。

你这样,关机前也不能卸载。。。
我也不懂

明明有官方论坛,你却来这里发贴。

???什么意思???你是说的 suse 的官方论坛?

其实 Linux 直接 umount 设备时,是不会断电的。 umount 本质是卸载文件系统,而不是设备。

应该使用 eject 弹出 SCSI 设备。

Eject 允许可移动介质 (典型是 CD-ROM,软盘,磁带,或者 JAZ 以及 ZIP 磁盘) 在软件控制下弹出.

或者尝试:
unmount 然后运行,udisksctl power-off -b /dev/sdX
manpage 节选如下:

Arranges for the drive to be safely removed and powered off. On the OS side this includes ensuring that no process is using the drive, then requesting that in-flight buffers and caches are committed to stable storage. The exact steps for powering off the drive depends on the drive itself and the interconnect used. For drives connected through USB, the effect is that the USB device will be deconfigured followed by disabling the upstream hub port it is connected to.

我推荐后一种,它成功关闭了我的移动硬盘。

1赞

读不到 smart 和硬盘盒的芯片有关,就是 usb 转 sata 的芯片