<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
I'm doing something similar with my BTRFS backup.<br>
<ul>
<li>hdparm -y /dev/sdh --- "standby". It spins down but still
visible, so system can see it and spin it up again. There is
also "sleep" mode (-Y) which is even lower power mode, but it
disconnects and you can't power it up again by software.</li>
</ul>
<ul>
<li>sg_start --start /dev/sdh --- "start". Also, accessing it,
will spin it up automatically. I don't know why sg_start --stop
doesn't work.</li>
</ul>
<br>
<div class="moz-cite-prefix">On 2025-11-17 18:53, D. Hugh Redelmeier
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:fc91ea4e-de28-f98f-a418-85b6f3122187@mimosa.com">
<pre wrap="" class="moz-quote-pre">I want to use a cheap external HDD for backups. I want the drive to be
off when not in use but I don't want to be required to plug or unplug the
drive to turn it on.
Is there a way for a script to turn off a disk so it really is off enough
and subsequently turn it on again?
- consumer HDDs have ridiculously low power-on lifetimes, at least
according to their specifications
- so I want my backup software to power the drive on before use and
off after use.
- [may be relevant] Seagate external drive controllers have a flaw: to be
fast, you want to use UAS (USB Attached SCSI) but the controller won't
pass SAT commands in this mode. You need to tell the driver that the
drive has a "quirk" to lock in usb-storage mode.
<a class="moz-txt-link-rfc2396E" href="https://www.smartmontools.org/wiki/SAT-with-UAS-Linux"><https://www.smartmontools.org/wiki/SAT-with-UAS-Linux></a>
Just unmounting all partitions of an HDD does not seem to cause it to spin
down. The drive still makes noise and is warm, even hours later.
Turning off the drive, using Gnome's Disks or (untested) udisksctl(1),
does stop the drive. But I don't know how to subsequently turn it on via
a program. For example, Gnome Disks doesn't see the drive once it has
been turned off. The way I know to turn on the drive is to physically
unplug the USB cable and plug it in again.
_______________________________________________
kwlug-disc mailing list
To unsubscribe, send an email to <a class="moz-txt-link-abbreviated" href="mailto:kwlug-disc-leave@kwlug.org">kwlug-disc-leave@kwlug.org</a>
with the subject "unsubscribe", or email
<a class="moz-txt-link-abbreviated" href="mailto:kwlug-disc-owner@kwlug.org">kwlug-disc-owner@kwlug.org</a> to contact a human being.
</pre>
</blockquote>
<br>
</body>
</html>