From owner-freebsd-hackers Mon Jul 8 19:43:50 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 26E6137B400 for ; Mon, 8 Jul 2002 19:43:46 -0700 (PDT) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id C803043E31 for ; Mon, 8 Jul 2002 19:43:45 -0700 (PDT) (envelope-from peter@wemm.org) Received: from fw.wemm.org (canning.wemm.org [192.203.228.65]) by canning.wemm.org (Postfix) with ESMTP id AF95B2A7D6 for ; Mon, 8 Jul 2002 19:43:45 -0700 (PDT) (envelope-from peter@wemm.org) Received: from overcee.wemm.org (overcee.wemm.org [10.0.0.3]) by fw.wemm.org (Postfix) with ESMTP id 697054C211 for ; Mon, 8 Jul 2002 19:43:45 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.wemm.org (Postfix) with ESMTP id 8095A3808; Mon, 8 Jul 2002 19:43:45 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: chris@aims.com.au Cc: silby@silby.com, hackers@FreeBSD.ORG Subject: Re: offtopic: low level format of IDE drive. In-Reply-To: <004601c226ed$838bff50$020aa8c0@aims.private> Date: Mon, 08 Jul 2002 19:43:45 -0700 From: Peter Wemm Message-Id: <20020709024345.8095A3808@overcee.wemm.org> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG "Chris Knight" wrote: > Howdy, > > > -----Original Message----- > > From: owner-freebsd-hackers@FreeBSD.ORG > > [mailto:owner-freebsd-hackers@FreeBSD.ORG]On Behalf Of Mike Silbersack > > Sent: Tuesday, 9 July 2002 10:53 > > To: Peter Wemm > > Cc: Julian Elischer; John Nielsen; hackers@FreeBSD.ORG > > Subject: Re: offtopic: low level format of IDE drive. > > > > [snip] > > > > So, this basically means that even a journalling filesystem wouldn't > > be much safer... how about battery backed up controllers - would those > > provide protection? (I suspect not, but maybe they're more > > sophisticated than I thought.) > > > That's right - a journalled filesystem doesn't help. Nor does battery > backed up controllers. > > If the drive has come back and told the controller that it has written > the data, then the controller - battery backed up or not - will mark > those sectors as written. If it's a caching controller, then the cache > entries for those sectors will be returned to the free list pool. > The only way a journalled filesystem would help is if during replay, it > checked that all the sectors matched prior to the checkpoint; ie write > out all the sectors after the last checkpoint, then check sectors prior > to the last checkpoint. That way, the journalled filesystem would know > that the data had been written correctly. Yes. Journalled filesystems are just normal file systems with a journal of recent *intentional* modifications to specific sectors. It cannot save you from modifications to *other* sectors as a side effect of writing. > Does anyone have a detailed list of which SCSI drives do track writes > rather than sector writes? You can find out by turning write caching on and off. camcontrol modepage daN. You want -m 8, the WCE bit. (write cache enable). I do not remember which -P args you need. If you see a HUGE difference in writing smallish blocks to disk between WCE on vs off, then you have a track write drive. A true sectored drive would have much less of a slowdown. I do not have a comparable set handy to get a better idea of what to expect. Really small writes cost scsi overhead though, so that adds to the slowdown. If I was to take a best guiess, I would expect a factor 10+ slowdown for track-write drives on 4K blocksize writes, vs factor 2-5 slowdown for a sectored drive. This is the slowdown factor when turning WCE off. Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message