Might be simpler to type this as root, after switching to BASH, for like-minded green troubleshooters with only ada disk devices:
for d in /dev/ada?;do camcontrol cmd /dev/ada$d -a "E5 00 00 00 00 00 00 00 00 00 00 00" -r -;done
(Less patient freaks just put a fret finger on fan blade, to stop it, and string finger on disk top, haha)
Back On topic !!...
After testing many permutations of settings(that I thought might be relevant) on 2 separate systems I have minor conclusions to report.
If any users want to test further, the (sometimes?) flaky behavior of HDD Standby setting, ##remember this isn't a feature that the professional will use!
Some clues and observations:
9.2.0 with a Z1 of:
============================================================
3x Seagate 7200 (320GB) <ST332062OASAS 3...>
2x WD Caviar (320GB) <WDC WD3200KS 00PFB0 21.00M21>
The 3 Seagates spindown per HDD Standby setting, 1 WD HDD spinsdown after more time has elapsed(something like 7-10 minutes) and 1 WD never spinsdown.
FWIW: My guess is that a Python script and/or collectd has i/o on that single disk???; but this flies in the face of my understanding of how ZFS works, and is a complete mystery to me. So maybe it is swap. I turned it off by putting 0 in that Advanced field, but did not help spindown.
All 5 [of MY ] drives report APM feature is: Unavailable with, ex: smartctl -x /dev/ada1|grep -i APM
and thus Advanced Power Management setting, as expected, has no effect on spindown times, for my 5 drives.
I have no idea why the GUI alludes this is settable on disks for which it clearly isn't. This creates a lot of Uncertainty and Doubt!
The manual is also silent/misleading in this regard.
To wit, the next row in the settings table, per manual, for Acoustic Level, ... 'can be modified for disks that understand AAM'. Yet, 3 of my drives report AAM setting: Unavailable with, for ex: smartctl -x /dev/ada0|grep -i aam
Yet the setting can be modified in the GUI! so the manual and/or the GUI code is wrong here also.
(As an aside, AAM, unlike spindown of drives, I believe is a FEATURE that most, even 24/7, max performance servers zealots could benefit from?
Like, say even if you don't have SSDs for some reason, but you want good Random I/O performance, AAM can have minimal performance impact.
However, the noise don't lie, your drives will get 'less beat up', thus helping the primary objective of FreeNAS and ZFS...not mangling your bits.
From what I read AAM seems won't be a feature going forward because of patent issues, and hasn't been used, per se, since like 2011.)
2 of my drives support AAM, or 'Acoustic Level' as FreeNAS calls it, and AAM had no effect on all HDD spindown behavior, per my tests.
9.3 (Release p28 something or other from past couple of weeks) with striped mirrors ....
============================================================
4x HGST 6TB Deskstar NAS, OS installed to separate SSD
This fresh install reacted strangely with regard to spindown (now working and I can't reproduce the erroneous behavior previously experienced).
I suspect that a setting didn't 'stick' during my testing. Perhaps some random-ish reboot(that I did) was required or the Scripts were slow to make these settings, and thus 'threw me off'.
Perhaps the order of the setting changes mattered, as opposed to just the combination of settings, per the GUI. Perhaps a setting wasn't completely reversible....
(i.e. Moving System Datasets, for the first time, left something flipped, that wasn't reversible?). Bottom line, I have no revelation. I had also assumed that all logs, settings, and smarttest results, and freaking monitoring data would be stored on the boot SSD drive by default, along with Boot Environments.
Anyways, I suspected 'System Dataset' settings weren't 'sticking' or getting applied properly on my system, but I figured out it's simple to see the dot directies with df -h
I thought I'd seen some . directories but I can't find any now...
TLDR:
============================================================
In my tests APM and AAM don't affect spindown.
In my 9.2 Z1 pool, all but 1 of my disks would spindown, even though I have 2 the same model, same fiwmware, settings, etc. I HAVE NO IDEA how this is even possible with the partitions the same. It is all on the same volume so how can there be I/O on the 1 disk?
If you want to test spindown on a disk, the manual/GUI in 9.3 is misleading. First run :
smartctl -x /dev/ada0|grep -i 'apm\|aam'
on your disk, to see if these 'proprietary/not always available' settings are even a factor, then proceed to troubleshoot/test without Fear, and without sucking on these "phantom UDders" like this noob did.
edit: Even easier, I just discovered:
ataidle /dev/ada0
Then, I would start by moving System Dataset off of the main pool(aka zpool aka Volume) which has the disks you are testing.
(Don't feel silly, for I TOO had assumed the 'System Dataset' would be on the SSD drive I first installed FreeNAS on and I also
find settings in section 5.6 misleading/confusing i.e. Syslog; to tick or not to tick? That is the question!) One of the MANY bug reports that deal with HDD spindown seemed to ask why the GUI/manual doesn't explain that setting HDD spindown time is pointless in the default state, with the logs and such on your main pool, but some head-honcho wants it that way for some reason.
Tick those 2 boxes under it; Syslog and Reporting Database, cause yeah, same as above paragraph, from what I gather. Maybe reboot and cross your fingers.
That worked for me. Not sure why it had to be SOOOO... painful to figure out.
edit: Oh wait.. its NOT working again. OMG.