Subject: Re: Turning off write cache on IDE disks at startup?
To: None <netbsd-help@netbsd.org>
From: Andy Ruhl <acruhl@gmail.com>
List: netbsd-help
Date: 05/23/2005 09:53:41
On 5/23/05, Jukka Salmi <j+nbsd@2005.salmi.ch> wrote:
> Andy Ruhl --> netbsd-help (2005-05-23 06:32:54 -0700):
> > Is there some generally accepted way of doing this?
> >
> > I'm migrating from a FreeBSD 4.10 server and I learned the hard way
> > that I had to turn off write caching if I'm using soft updates. But
> > over there it's just a sysctl, no big deal.
> >
> > I learned about dkctl on NetBSD. Should I just toss it into rc.local
> > and be done with it, or is there a more elegant way to do this?
>=20
> I use rc.local:
>=20
>         for disk in $(sysctl -n hw.disknames); do
>                 case $disk in
>                         wd*) dkctl $disk setcache r ;;
>                 esac
>         done
>=20
> The more elegant way is described in PR 25330...

Ahh, I like yours better. I think in the PR I saw a script called
"writecache" and this will turn off write caching? So the implication
will be that writecache=3DYES will actually turn off write caching?
Umm... Counter intuitive...

Would be nicer if it was a sysctl, but other than that I think your
script is as good as any. Besides, you can choose which disks you want
to do this on too.

Andy