Date: Mon, 08 Jul 2002 19:43:45 -0700 From: Peter Wemm <peter@wemm.org> To: chris@aims.com.au Cc: silby@silby.com, hackers@FreeBSD.ORG Subject: Re: offtopic: low level format of IDE drive. Message-ID: <20020709024345.8095A3808@overcee.wemm.org> In-Reply-To: <004601c226ed$838bff50$020aa8c0@aims.private>
next in thread | previous in thread | raw e-mail | index | archive | help
"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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020709024345.8095A3808>