Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Mar 2018 08:40:13 +0000
From:      Arthur Chance <freebsd@qeng-ho.org>
To:        "J.B." <non.euc.geo.1854@gmail.com>, freebsd-questions@freebsd.org
Subject:   Re: How to prevent HDD spin-down.
Message-ID:  <f1fe7770-c9fe-d8c1-9639-e3f78f9c1911@qeng-ho.org>
In-Reply-To: <99f2e64c-577c-20e1-b595-9b8391efaf8e@gmail.com>
References:  <99f2e64c-577c-20e1-b595-9b8391efaf8e@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 06/03/2018 02:37, J.B. wrote:
> Hey. I purchased a new WD laptop hard disk drive, but it keeps spinning
> down and parking its heads after 25 seconds of inactivity. How can I
> disable that feature or extend the timeout to something less idiotic? I
> checked the BIOS, but there's no setting for it. I booted into a Linux
> (Debian-based) OS duel-booting on the same disk, and the disk doesn't
> spin down, so either Linux is doing something to override that feature,
> or FreeBSD is doing something to enable it (possibly a package I
> installed). Thanks.

I had the same problem and fixed it with sysutils/smartmontools. Here's
the start of my /usr/local/etc/smartd.conf (my mailer will line wrap).
The attributes to monitor came from Backblaze's document on what SMART
values are useful. It's the "-e" line that prevents spin down, but note
that this is for a *server* system that's always on mains power. On a
laptop this will probably eat your battery, so you'll need to tweak the
value. Unfortunately ISTR the number isn't just the timeout in seconds
but is more complex. You'll need to search for the exact spec I fear.

---- smartd.conf ----
# Monitor all disks. Use smartd_flags="-s /var/db/smartd/"
# and mkdir /var/db/smartd beforehand.

# set defaults for all drives. The test schedule is
# long Mon 4 am, short all other days 5 am
#
# read_error_rate is ignored because nobody knows what it means

DEFAULT -o on -S on \                   # turn on offline tests, saving data
        -e standby,off \                # turn off spin down
        -H -f -C 197+ -U 198+ \         # report failures: health, old
age, sector problems
        -t -R 5! -R 187! -R 188! \      # track attrs, report when
5,17,188 raw changes
         -I 1 -I 9 -I 194 \             # ignore
        -l error -l selftest \          # report errors, selftest fails
        -s (L/../../1/04|S/../../[234567]/05) \
        -m root@qeng-ho.org \           # mail root with problems
        -M diminishing                  # repeat nags, but less frequently

[The disks you want to monitor go here]

-- 
An amusing coincidence: log2(58) = 5.858 (to 0.0003% accuracy).



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f1fe7770-c9fe-d8c1-9639-e3f78f9c1911>