Subject: Re: Turning off write cache on IDE disks at startup?
To: None <netbsd-help@netbsd.org>
From: Jukka Salmi <j+nbsd@2005.salmi.ch>
List: netbsd-help
Date: 05/23/2005 16:18:50
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?

I use rc.local:

	for disk in $(sysctl -n hw.disknames); do
		case $disk in
			wd*) dkctl $disk setcache r ;;
		esac
	done

The more elegant way is described in PR 25330...


HTH, Jukka

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~