View previous topic :: View next topic |
Author |
Message |
fturco Veteran
Joined: 08 Dec 2010 Posts: 1181 Location: Italy
|
Posted: Thu May 11, 2017 2:38 pm Post subject: [SOLVED] How to power off USB hard disks without udisks? |
|
|
I chose to remove sys-fs/udisks from my system because it requires polkit. Before I used the following command for powering off USB hard disks and USB flash drives:
Code: | udisksctl power-off -b /dev/sdx |
How can I replace that now? I don't need any other udisks feature, just the possibility of shutting down USB devices before removing that from my computer, in order to avoid hardware/software damage. I don't even need to be able to do that from a non-privileged user since I have root access.
Last edited by fturco on Thu May 11, 2017 6:27 pm; edited 1 time in total |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
fturco Veteran
Joined: 08 Dec 2010 Posts: 1181 Location: Italy
|
Posted: Thu May 11, 2017 4:23 pm Post subject: |
|
|
I'm mostly concerned about hard disk head parking. I don't want it crashing on the surface of the disk if I abruptly shut it off. |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
fturco Veteran
Joined: 08 Dec 2010 Posts: 1181 Location: Italy
|
Posted: Thu May 11, 2017 6:27 pm Post subject: |
|
|
I searched a little bit and everybody seems to agree with you: modern hard disks automatically park their heads when turned off. I guess there's no need to install an udisks replacement anymore. Thank you! |
|
Back to top |
|
|
depontius Advocate
Joined: 05 May 2004 Posts: 3509
|
Posted: Fri May 12, 2017 2:04 pm Post subject: |
|
|
I would like to do this as well. I have multiple backup drives plugged into my server, so they're spinning all the time, and I'd just as soon power them completely down until it's time for the cron job to do its thing.
I did a bit of experimentation a while back, and found that hdparm was able to spin down my Seagate drive, but the Western Digital drives wouldn't spin down. Recently I saw something about powering down a complete USB root hub through PCI-e mechanisms. Since my backup devices are all hooked through one PCE-e USB card, that method might work for me, though I haven't had time to fiddle with it yet.
Or I'm ready to be told that it's better to just leave the drives spinning full time, rather than power them up and down once a day.
I have two drives plugged in, and at night backup to the least-recently-written drive. There is also a drive in my filing cabinet at work, and every Monday and Friday I swap that drive with one of the drives from home, for off-site backup. _________________ .sigs waste space and bandwidth |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2034 Location: United Kingdom
|
Posted: Fri May 12, 2017 3:35 pm Post subject: |
|
|
depontius,
With modern external HDDs I don't think it matters whether or not you leave them powered on all the the time via the USB bus. For example, the official Western Digital position is stated in their Answer 1386:
Western Digital wrote: | Leaving an external hard drive powered on all the time
Answer ID 1386
Western Digital recommends that external hard drives be powered off when not in use, although it is safe to leave a hard drive running continuously. The hard drive should be placed away from any electronic devices and in a well ventilated area to allow airflow to the hard drive. Western Digital also recommends that the drive's power supply is connected through a surge protector. In the case of a power surge, or brown/black out, the hard drive's sensitive electrical components will not be damaged.
The initial power-on process is generally harder on the internal components of a hard drive than spinning for extended periods. However, Western Digital drives are designed to handle either scenario. Most users outgrow their drive before repeated turning on and off becomes a problem. Turning on the drive a few times per day is considered normal usage and should not pose any problems. If a drive is turned on and off excessively on a daily basis, this could affect the longevity of the hard drive’s components. |
_________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.
Fitzcarraldo's blog |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
|