hdparm for FreeBSD?

David Kelly dkelly at HiWAAY.net
Mon Jan 10 17:50:40 PST 2005


On Jan 10, 2005, at 7:33 PM, Kirk Strauser wrote:

> On Monday 10 January 2005 05:04 pm, Lowell Gilbert wrote:
>
>> You mean like atacontrol(8)?
>> Or maybe you mean something more like tunefs(8)?
>
> Nope.  atacontrol returns information about a drive's capabilities, 
> but offers
> no way to change the settings that affect them.  Example:
>
>     # atacontrol cap 2 0
>     [...]
>     write cache                    yes      yes
>     read ahead                     yes      yes
>     dma queued                     no       no      0/0x00
>     SMART                          yes      yes
>     microcode download             yes      yes
>     security                       yes      no
>     power management               yes      yes
>     advanced power management      no       no      0/0x00
>     automatic acoustic management  yes      no      254/0xFE        
> 128/0x80
>
> shows that read ahead is available and enabled, but I don't have a way 
> to turn it off.  tunefs only affects a filesystem's attributes but not 
> the underlying hardware.

"man ata" lists the sysctl for controlling write caching:

      hw.ata.wc
      set to 1 to enable Write Caching, 0 to disable (default is 
enabled).
      WARNING: can cause data loss on power failures.

I don't know of any tool for setting the wc preference on a 
per-ata-drive basis for FreeBSD. Camcontrol allows setting the mode 
page on SCSI devices, which is where this task is performed in SCSI.

IIRC there was some discussion of support for S.M.A.R.T. coming to 
FreeBSD, which seems like it would be the logical place for 
manufacturers to provide a control interface to their drive hardware.

--
David Kelly N4HHE, dkelly at HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.



More information about the freebsd-questions mailing list