You are not logged in.

#1 2017-04-16 07:11:17

applesea
Member
Registered: 2017-03-29
Posts: 12

External HDD Won't Turn off on shutdown

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

#2 2017-04-16 10:20:38

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: External HDD Won't Turn off on shutdown

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

#3 2017-04-16 11:31:40

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: External HDD Won't Turn off on shutdown

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

#4 2017-04-17 02:09:10

applesea
Member
Registered: 2017-03-29
Posts: 12

Re: External HDD Won't Turn off on shutdown

Thanks the second post fixed the problem

Offline

#5 2017-04-17 08:34:59

ua4000
Member
Registered: 2015-10-14
Posts: 420

Re: External HDD Won't Turn off on shutdown

And see here, on how to run it automatically during shutdown
https://bbs.archlinux.org/viewtopic.php?id=220946

Offline

#6 2017-04-17 20:25:34

applesea
Member
Registered: 2017-03-29
Posts: 12

Re: External HDD Won't Turn off on shutdown

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

Board footer

Powered by FluxBB