You are not logged in.
When I shutdown my PC, my external HDD keeps spinning at full speed and I have to manually unplug it from the USB port. I have one of the odd configurations where the USB ports can be used to charge when the PC is off. On windows, I just down and it powers off leaving a blinking light to show it is on standbye mode. Why is this the case and what can I do to fix this?
Last edited by applesea (2017-04-17 20:16:47)
Offline
Can you try the following and see how things go:
1. Get sg3_tils
# pacman -S sg3_utils
2. Unmount all filesystems on the disk
3. Send a SCSI stop unit command to the disk with sg_start in sg3_utils:
# sg_start --stop /dev/sdX
4. Shutdown the machine
See if the disk goes into standby mode after step 3 and stay that way after step 4.
Last edited by tom.ty89 (2017-04-16 10:24:33)
Offline
Depending on the behavior of the external drive I usually deal with this in one of two ways. If the external drive is "well behaved" then I usually use 'udisksctl power-off -b /dev/sdX' and the external drive should be "off".
If the drive is not "well behaved" then I usually unmount every partition on the external disk, then issue a sync for good measure, then I use 'hdparm -Y /dev/sdX', then I wait for the drive to spin down and unplug the usb cable, which should keep the drive spun down and prevent emergency head park.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
Thanks the second post fixed the problem
Offline
And see here, on how to run it automatically during shutdown
https://bbs.archlinux.org/viewtopic.php?id=220946
Offline
OK I tried doing it automatic, but it doesn't seem to work. Here is my script
#!/bin/bash
umount /dev/sdc1
udisksctl power-off -b /dev/sdc
This works perfectly trying to execute it manually but it doesn't execute on shutdown. I tried putting it on suspend mode with hdparm -f -F -Y /dev/sdc and it works correctly for some reason, but I would like it off, not on suspend. Why is the udisksctl command not executed but the other one is on shutdown?
Last edited by applesea (2017-04-17 20:26:06)
Offline