DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 18th February 2019
hanzer's Avatar
hanzer hanzer is offline
Real Name: Adam Jensen
just passing through
 
Join Date: Oct 2013
Location: EST USA
Posts: 314
Default How to prevent hardrives from pinning down

I've recently put together a little server that uses two laptop hard drives in a ZFS mirror (specs below). These drives aggressively spin down every few seconds. Is there a way to prevent that? The machine is running smartd with this /usr/local/etc/smartd.conf:
Code:
/dev/ada0 -a -d auto -e standby,off
/dev/ada1 -a -d auto -e standby,off
It doesn't prevent the drives from spinning down. Any ideas?

Code:
Model Family:     Western Digital Black Mobile
Device Model:     WDC WD5000LPLX-08ZNTT0
Serial Number:    WD-WX11A97055Z3
LU WWN Device Id: 5 0014ee 607f68dee
Firmware Version: 04.01A04
User Capacity:    500,107,862,016 bytes [500 GB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-2, ACS-3 T13/2161-D revision 3b
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 3.0 Gb/s)

Model Family:     Western Digital Black Mobile
Device Model:     WDC WD5000LPLX-22ZNTT0
Serial Number:    WD-WX71A880D0VU
LU WWN Device Id: 5 0014ee 6b3918f33
Firmware Version: 01.01A01
User Capacity:    500,107,862,016 bytes [500 GB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-2, ACS-3 T13/2161-D revision 3b
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 3.0 Gb/s)
Reply With Quote
  #2   (View Single Post)  
Old 18th February 2019
hanzer's Avatar
hanzer hanzer is offline
Real Name: Adam Jensen
just passing through
 
Join Date: Oct 2013
Location: EST USA
Posts: 314
Default

Quote:
Originally Posted by IdOp View Post
Perhaps you can disable APM as per this link ? (Disabling APM may be too blunt of a tool however, depending.)

Sorry, I posted this in the wrong thread! It was meant for your question in the "prevent hard drives from spinning down" thread.
Nice hint, thanks! It looks like the ataidle port expired on 2018-12-31; it was obsoleted by camcontrol.

This seems to work:

# camcontrol devlist
Code:
<WDC WD5000LPLX-08ZNTT0 04.01A04>  at scbus0 target 0 lun 0 (ada0,pass0)
<WDC WD5000LPLX-22ZNTT0 01.01A01>  at scbus1 target 0 lun 0 (ada1,pass1)
<SanDisk Cruzer Fit 1.00>          at scbus2 target 0 lun 0 (pass2,da0)
# camcontrol apm 0:0:0 -l 250
# camcontrol apm 1:0:0 -l 250

In FreeBSD, what is a good way to run these commands every time the system starts?
Reply With Quote
  #3   (View Single Post)  
Old 18th February 2019
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

Quote:
In FreeBSD, what is a good way to run these commands every time the system starts?
This I don't know as I'm not a FreeBSD user. Is there an rc.local or similar script? Hopefully a regular user will have some guidance.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Prevent Brute Force Attack on Root Account Peter_APIIT OpenBSD Security 8 20th June 2015 02:22 AM
Prevent SSH tunneling through port 80 pttymuth General software and network 7 15th July 2013 05:35 PM
prevent root ssh access carpman FreeBSD Security 7 18th December 2009 04:24 PM
Prevent users from using proxy bichumo General software and network 8 20th April 2009 01:00 PM


All times are GMT. The time now is 12:48 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick