Ef57uiKnN6
Dabbler
- Joined
- Mar 25, 2012
- Messages
- 28
Just wrote a small shell script (foobar.sh.txt) as proof of concept for getting all my spindles in standby.
It periodically gathers standby values from the database for every active device and spins them down manually depending on last I/O.
Before investing more time I want to ask if there is a better/simpler way to get all drives (especially the LSI ones) spin down as configured.
My Environment:
- FreeNAS-8.3.1-BETA1-x64 (r12955:12956)
- FreeNAS-9.2.0-RELEASE-x64 (ab098f4) / Since hdd_spindown-0.3
- GIGABYTE F2A85X-D3H
- LSI SAS 9211-4l
- WDC WD20EFRX
Edit:
Removed hyper link to 'foobar.sh.txt and added attachment the way it seems to work (for me)
It's not tested very well AND has a lot room for improvement (like usage information)
What it does:
Spin down is tried sequentially by camcontrol, atacontrol, ataidle and can easily be extended. The first successfully command is memorized individually per drive for further rounds. If no command ends successful, the drive gets marked to be ignored and will not tried to be span down in the future.
View attachment hdd_spindown-0.4.zip
View attachment hdd_spindown-0.3.zip
View attachment hdd_spindown-0.2.zip
View attachment hdd_spindown-0.1.zip
Changelog
0.4
It periodically gathers standby values from the database for every active device and spins them down manually depending on last I/O.
Before investing more time I want to ask if there is a better/simpler way to get all drives (especially the LSI ones) spin down as configured.
My Environment:
- FreeNAS-9.2.0-RELEASE-x64 (ab098f4) / Since hdd_spindown-0.3
- GIGABYTE F2A85X-D3H
- LSI SAS 9211-4l
- WDC WD20EFRX
Edit:
Removed hyper link to 'foobar.sh.txt and added attachment the way it seems to work (for me)
It's not tested very well AND has a lot room for improvement (like usage information)
What it does:
- Query all names and standby times for active drives from FreeNAS configuration
- Loop through all drives and compare current and last (memorized) I/O-transfer count. On difference memorize new value and time.
- Spin down drives which last activity exceeds time-out
- Sleep between loop iterations as long as the lowest time-out of any drive would occur.
- Refresh standby times from FreeNAS after 12 iterations
Spin down is tried sequentially by camcontrol, atacontrol, ataidle and can easily be extended. The first successfully command is memorized individually per drive for further rounds. If no command ends successful, the drive gets marked to be ignored and will not tried to be span down in the future.
View attachment hdd_spindown-0.4.zip
View attachment hdd_spindown-0.3.zip
View attachment hdd_spindown-0.2.zip
View attachment hdd_spindown-0.1.zip
Changelog
0.4
Previously uploaded 0.4 file contained minor cosmetic issues
0.4New: Usage, one-shot mode, initial spin down, version message
Bugfix: Message severity format on stdout, pass custom parameters on fork
0.3Improvement: Added ataidle with absolute path. Because ataidle wants absolute path '$DEV' varaible can be used in command definitions.
Bugfix: INSTALL file corrected - thx to bulli.uli!
0.2Bugfix: Correct array usage and changed position of counter variable
0.1Initial release