Re: atactl parity w/scsictl? (enable SATA write cache?)

2017-08-10 Thread Michael van Elst
jdba...@mylinuxisp.com ("John D. Baker") writes:

>I'd like to use them as ordinary disks, so having the write caches
>enabled would be nice.  Is there any way to do that with tools in
>base?

dkctl wd0 setcache rw


-- 
-- 
Michael van Elst
Internet: mlel...@serpens.de
"A potential Snark may lurk in every tree."


Re: atactl parity w/scsictl? (enable SATA write cache?)

2017-08-10 Thread John D. Baker
On Thu, 10 Aug 2017, John D. Baker wrote:

> Now to see if that makes a difference.  (There's still the possibility
> of OEM-crippled firmware making it misbehave unless it gets the secret
> handshake from the OEM's RAID controller.)

That helped and sped up the write by a factor of 8.73.

The cache settings are not savable, so wherever these disks get used,
they will need their write cache turned on again whenever the machine
is power-cycled.

-- 
|/"\ John D. Baker, KN5UKS   NetBSD Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]comOpenBSDFreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645



Re: atactl parity w/scsictl? (enable SATA write cache?)

2017-08-10 Thread John D. Baker
On Thu, 10 Aug 2017, Jonathan A. Kollasch wrote:

> You're probably looking for dkctl(8)'s getcache and setcache.

Thanks!  That was it.  (too many XXXctl tools...)

Now to see if that makes a difference.  (There's still the possibility
of OEM-crippled firmware making it misbehave unless it gets the secret
handshake from the OEM's RAID controller.)

-- 
|/"\ John D. Baker, KN5UKS   NetBSD Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]comOpenBSDFreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645



Re: atactl parity w/scsictl? (enable SATA write cache?)

2017-08-10 Thread Jonathan A. Kollasch
On Thu, Aug 10, 2017 at 08:29:19AM -0500, John D. Baker wrote:
> I came into possession of a couple of SATA disks which appear to have
> their write caches disabled.  'atactl wdN identify' reports, in part:

You're probably looking for dkctl(8)'s getcache and setcache.

Jonathan Kollasch


atactl parity w/scsictl? (enable SATA write cache?)

2017-08-10 Thread John D. Baker
I came into possession of a couple of SATA disks which appear to have
their write caches disabled.  'atactl wdN identify' reports, in part:

[...]
Device supports following standards:
ATA-1 ATA-2 ATA-3 ATA-4 ATA-5 ATA-6 ATA-7 
Command set support:
READ BUFFER command (enabled)
WRITE BUFFER command (enabled)
Look-ahead (enabled)
Write cache (disabled)
[...]
Serial ATA features:
Software Settings Preservation (enabled)

Writing to the disk is excruciatingly slow.  'dd'ing /dev/zero to
/dev/rwdNd with bs=128m reported "6951724 bytes/sec" or just under
7MB/s.

The disks were probably originally intended to be used with some
RAID controller which did its own caching and so didn't want it on
the storage units themselves.

I'd like to use them as ordinary disks, so having the write caches
enabled would be nice.  Is there any way to do that with tools in
base?

While 'scsictl' has the "setcache" command, there appears to be no
analogue in 'atactl'.  Indeed, there are a number of things 'scsictl'
can do which have parallels on ata devices/busses but which are not
available in 'atactl'.

Perhaps 'drvctl' can fill the gap, but it appears one must have more
low-level knowledge of the device than can be gleaned from "identify".

-- 
|/"\ John D. Baker, KN5UKS   NetBSD Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]comOpenBSDFreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645