On 2014-12-04 12:16, Wingonaut wrote:
>
> Hi,
>
> I have recently aquired an external harddrive from WD. When accessing
> the drive from windows 7 (I have a dual boot setup) the external drive
> enters stand-by mode after roughly ten minutes without accessing the
> drive. This is visualized by a small icon on the drive itself.
>
> Not so under Opensuse! Even without accessing the files on the external
> drive (mostly video files) the drive doesn’t enter stand-by mode. It
> doesn’t matter whether the drive is mounted. I guess some service might
> be checking for drives which would prevent the drive from entering
> stand-by mode. Is there a fix for this?
It is not done that way, there is no driver for that.
There is a setting inside most hard disks that tell them to stop the
motor after a certain time, and the disk can remember this setting the
next time.
It is also possible to run a command that sets this variable manually,
and you can place it on a script that runs at boot. For an external disk
that you plug and unplug, I’m unsure.
man hdparm
-S Put the drive into idle (low-power) mode, and also
set the standby (spindown) timeout for the drive.
This timeout value is used by the drive to deter-
mine how long to wait (with no disk activity)
before turning off the spindle motor to save power.
Under such circumstances, the drive may take as
long as 30 seconds to respond to a subsequent disk
access, though most drives are much quicker. The
encoding of the timeout value is somewhat peculiar.
A value of zero means “timeouts are disabled”: the
device will not automatically enter standby mode.
Values from 1 to 240 specify multiples of 5 sec-
onds, yielding timeouts from 5 seconds to 20 min-
utes. Values from 241 to 251 specify from 1 to 11
units of 30 minutes, yielding timeouts from 30 min-
utes to 5.5 hours. A value of 252 signifies a
timeout of 21 minutes. A value of 253 sets a ven-
dor-defined timeout period between 8 and 12 hours,
and the value 254 is reserved. 255 is interpreted
as 21 minutes plus 15 seconds. Note that some
older drives may have very different interpreta-
tions of these values.
Enclosures will allow you, or not, to access this. You have greater
chances over eSATA.
On this thread
http://forums.opensuse.org/showthread.php?t=502952, wolfi323
explains how the DEVICES_FORCE_IDE_DMA in /etc/sysconfig/ide can be used
to do this on boot.
Try this, perhaps:
DEVICES_FORCE_IDE_DMA="/dev/sda:-S220 /dev/sdb:-S220"
listing all your disks (each one separated by a space)
I can not guarantee anything, I’m trying myself. I have not touched the
file in years. It is handled by “/usr/lib/udev/idedma.sh”.
Here it fails:
> Telcontar:~ # /usr/lib/udev/idedma.sh /dev/sda
> /dev/sda: setting up IDE DMA mode -S220
>
> /dev/sda:
> setting using_dma to 1 (on)
> HDIO_SET_DMA failed: Inappropriate ioctl for device
> setting xfermode to 0 (default PIO mode)
> SG_IO: bad/missing sense data, sb]: 70 00 05 00 00 00 00 0a 00 00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> setting standby to 220 (18 minutes + 20 seconds)
> HDIO_GET_DMA failed: Inappropriate ioctl for device
> Telcontar:~ #
So I’m writing my own script.
–
Cheers / Saludos,
Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)