Re: Hard drives don't spin down

2014-09-14 Thread Stuart Henderson
On 2014-09-11, David Coppa dco...@gmail.com wrote:
 On Thu, Sep 11, 2014 at 1:59 PM, Laurence Rochfort
laurence.rochf...@gmail.com wrote:
 If I set it for both drives they spin down. I take it that's the time
 in seconds the system has to be idle for before they spin down?

 Exactly.

 man 8 atactl

also see atactl apmset.

 What's the difference between idle and standby?

 For what I've understood, standby puts the disk in a even more deep
 sleep state than idle.

 Btw, you can put the two commands into /etc/rc.local, so they will
 survive a reboot.

They don't always survive a suspend/resume cycle; if not, you can also
put them in /etc/apm/resume.



Hard drives don't spin down

2014-09-11 Thread Laurence Rochfort
Hello,

I'm running 5.5 on amd64.

I have two non-identical SATA drives in softraid RAID 1 that never
spin down, even when the system has been idle for hours.

Should I expect them to automatically spin down when using soft raid
and apmd -C, or do I have to script something with atactl? The BIOS
doesn't mention drive power management specifically, but does have APM
enabled and reports SMART for the drives.


bioctl, atactl, apm and dmesg follow.

Regards,
Laurence.



$ sudo bioctl sd0
Volume  Status   Size Device
softraid0 0 Online   100029196288 sd0 RAID1
  0 Online   100029196288 0:0.0   noencl wd0a
  1 Online   100029196288 0:1.0   noencl wd1a
$ sudo atactl wd0 identify
Model: TOSHIBA MK1032GSX, Rev: AS022D, Serial #:762G2643T
Device type: ATA, fixed
Cylinders: 16383, heads: 16, sec/track: 63, total sectors: 195371568
Device capabilities:
ATA standby timer values
IORDY operation
IORDY disabling
Device supports the following standards:
ATA-1 ATA-2 ATA-3 ATA-4 ATA-5 ATA-6
Master password revision code 0xfffe
Device supports the following command sets:
NOP command
READ BUFFER command
WRITE BUFFER command
Host Protected Area feature set
Read look-ahead
Write cache
Power Management feature set
Security Mode feature set
SMART feature set
Flush Cache Ext command
Flush Cache command
Device Configuration Overlay feature set
48bit address feature set
Automatic Acoustic Management feature set
Set Max security extension commands
Advanced Power Management feature set
DOWNLOAD MICROCODE command
IDLE IMMEDIATE with UNLOAD FEATURE
SMART self-test
SMART error logging
Device has enabled the following command sets/features:
NOP command
READ BUFFER command
WRITE BUFFER command
Host Protected Area feature set
Read look-ahead
Write cache
Power Management feature set
SMART feature set
Flush Cache Ext command
Flush Cache command
Device Configuration Overlay feature set
48bit address feature set
Automatic Acoustic Management feature set
Advanced Power Management feature set
DOWNLOAD MICROCODE command
$ sudo atactl wd1 identify
Model: Hitachi HTS541612J9SA00, Rev: SBDOC7DP, Serial #:   SB2541H6CN0EZE
Device type: ATA, fixed
Cylinders: 16383, heads: 16, sec/track: 63, total sectors: 234441648
Device capabilities:
IORDY operation
IORDY disabling
Device supports the following standards:
ATA-2 ATA-3 ATA-4 ATA-5 ATA-6 ATA-7
Master password revision code 0xfffe
Device supports the following command sets:
NOP command
READ BUFFER command
WRITE BUFFER command
Host Protected Area feature set
Read look-ahead
Write cache
Power Management feature set
Security Mode feature set
SMART feature set
Flush Cache Ext command
Flush Cache command
Device Configuration Overlay feature set
48bit address feature set
Automatic Acoustic Management feature set
Set Max security extension commands
Set Features subcommand required
Power-up in standby feature set
Advanced Power Management feature set
DOWNLOAD MICROCODE command
IDLE IMMEDIATE with UNLOAD FEATURE
SMART self-test
SMART error logging
Device has enabled the following command sets/features:
NOP command
READ BUFFER command
WRITE BUFFER command
Host Protected Area feature set
Read look-ahead
Write cache
Power Management feature set
SMART feature set
Flush Cache Ext command
Flush Cache command
Device Configuration Overlay feature set
48bit address feature set
Set Features subcommand required
Advanced Power Management feature set
DOWNLOAD MICROCODE command
$ apm
Battery state: absent, 0% remaining, unknown life estimate
A/C adapter state: not known
Performance adjustment mode: cool running (1596 MHz)
$ dmesg
OpenBSD 5.5 (GENERIC.MP) #315: Wed Mar  5 09:37:46 MST 2014
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 1048313856 (999MB)
avail mem = 1011851264 (964MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.5 @ 0xfd480 (40 entries)
bios0: vendor American Megatrends Inc. version 080014 date 05/08/2009
bios0: O.E.M O.E.M
acpi0 at bios0: rev 0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC MCFG OEMB HPET
acpi0: wakeup devices P0P2(S4) P0P1(S4) PS2K(S4) PS2M(S4) EUSB(S4)
MC97(S4) P0P4(S4) P0P5(S4) P0P6(S4) P0P7(S4) P0P8(S4) P0P9(S4)
USB0(S3) USB1(S3) USB2(S3) USB3(S3) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 

Re: Hard drives don't spin down

2014-09-11 Thread David Coppa
On Thu, Sep 11, 2014 at 1:22 PM, Laurence Rochfort
laurence.rochf...@gmail.com wrote:
 Hello,

 I'm running 5.5 on amd64.

 I have two non-identical SATA drives in softraid RAID 1 that never
 spin down, even when the system has been idle for hours.

 Should I expect them to automatically spin down when using soft raid
 and apmd -C, or do I have to script something with atactl? The BIOS
 doesn't mention drive power management specifically, but does have APM
 enabled and reports SMART for the drives.

What happens with:

# atactl wd0 setidle 5

??



Re: Hard drives don't spin down

2014-09-11 Thread Laurence Rochfort
If I set it for both drives they spin down. I take it that's the time
in seconds the system has to be idle for before they spin down?

What's the difference between idle and standby?

On 11 September 2014 12:30, David Coppa dco...@gmail.com wrote:
 On Thu, Sep 11, 2014 at 1:22 PM, Laurence Rochfort
 laurence.rochf...@gmail.com wrote:
 Hello,

 I'm running 5.5 on amd64.

 I have two non-identical SATA drives in softraid RAID 1 that never
 spin down, even when the system has been idle for hours.

 Should I expect them to automatically spin down when using soft raid
 and apmd -C, or do I have to script something with atactl? The BIOS
 doesn't mention drive power management specifically, but does have APM
 enabled and reports SMART for the drives.

 What happens with:

 # atactl wd0 setidle 5

 ??



Re: Hard drives don't spin down

2014-09-11 Thread David Coppa
On Thu, Sep 11, 2014 at 1:59 PM, Laurence Rochfort
laurence.rochf...@gmail.com wrote:
 If I set it for both drives they spin down. I take it that's the time
 in seconds the system has to be idle for before they spin down?

Exactly.

man 8 atactl

 What's the difference between idle and standby?

For what I've understood, standby puts the disk in a even more deep
sleep state than idle.

Btw, you can put the two commands into /etc/rc.local, so they will
survive a reboot.

Ciao!
David