From owner-freebsd-questions@FreeBSD.ORG Wed Dec 7 22:15:05 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3DAD416A41F for ; Wed, 7 Dec 2005 22:15:05 +0000 (GMT) (envelope-from freebsd@sopwith.solgatos.com) Received: from schitzo.solgatos.com (c-67-168-241-176.hsd1.or.comcast.net [67.168.241.176]) by mx1.FreeBSD.org (Postfix) with ESMTP id BA7D243D7E for ; Wed, 7 Dec 2005 22:14:56 +0000 (GMT) (envelope-from freebsd@sopwith.solgatos.com) Received: from sopwith.solgatos.com (uucp@localhost) by schitzo.solgatos.com (8.11.6/8.11.6) with UUCP id jB7MF4U25337 for freebsd-questions@freebsd.org; Wed, 7 Dec 2005 14:15:04 -0800 Received: from localhost by sopwith.solgatos.com (8.8.8/6.24) id WAA17272; Wed, 7 Dec 2005 22:05:40 GMT Message-Id: <200512072205.WAA17272@sopwith.solgatos.com> To: freebsd-questions@freebsd.org Date: Wed, 07 Dec 2005 14:05:40 +0000 From: Dieter Subject: Disk write caching, hw.ata.wc and atacontrol disagree X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd@sopwith.solgatos.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Dec 2005 22:15:05 -0000 I'm trying to turn off the evil data corrupting on-disk write cache. I added hw.ata.wc=0 to /boot/loader.conf and rebooted. # sysctl hw.ata.wc hw.ata.wc: 0 So far so good. But! atacontrol cap ad4 says: Feature Support Enable Value Vendor write cache yes yes So hw.ata.wc thinks that the disk write cache is off, but atacontrol cap thinks the disk write cache is on? If it matters: AMD64, nforce4, Seagate SATA 7200.8, FreeBSD 6.0 Beta3 So then I boot NetBSD and turn the write caches off with dkctl $disk setcache r and reboot FreeBSD and now I get Feature Support Enable Value Vendor write cache yes no It appears that if hw.ata.wc = 1 then FreeBSD turns the write cache on, and if hw.ata.wc = 0 then FreeBSD leaves the write cache alone? Is there a way to have FreeBSD turn the write cache OFF?