UNEXPECTED SOFT UPDATE INCONSISTENCY; RUN fsck MANUALLY
ertr1013 at student.uu.se
Sat Sep 27 08:04:02 UTC 2008
On Fri, Sep 26, 2008 at 11:44:17PM -0700, Jeremy Chadwick wrote:
> On Fri, Sep 26, 2008 at 10:35:57PM -0700, Derek Kuli??ski wrote:
> > Hello Jeremy,
> > Friday, September 26, 2008, 10:14:13 PM, you wrote:
> > >> Actually what's the advantage of having fsck run in background if it
> > >> isn't capable of fixing things?
> > >> Isn't it more dangerous to be it like that? i.e. administrator might
> > >> not notice the problem; also filesystem could break even further...
> > > This question should really be directed at a set of different folks,
> > > e.g. actual developers of said stuff (UFS2 and soft updates in
> > > specific), because it's opening up a can of worms.
> > > I believe it has to do with the fact that there is much faith given to
> > > UFS2 soft updates -- the ability to background fsck allows the user to
> > > boot their system and have it up and working (able to log in, etc.) in a
> > > much shorter amount of time. It makes the assumption that "everything
> > > will work just fine", which is faulty.
> > As far as I know (at least ideally, when write caching is disabled)
> Re: write caching: wheelies and burn-outs in empty parking lots
> Let's be realistic. We're talking about ATA and SATA hard disks, hooked
> up to on-board controllers -- these are the majority of users. Those
> with ATA/SATA RAID controllers (not on-board RAID either; most/all of
> those do not let you disable drive write caching) *might* have a RAID
> BIOS menu item for disabling said feature.
> FreeBSD atacontrol does not let you toggle such features (although "cap"
> will show you if feature is available and if it's enabled or not).
No, but using 'sysctl hw.ata.wc=0' will quickly and easily let you disable
write caching on all ATA/SATA devices.
This was actually the default setting briefly (back in 4.3 IIRC) but was
reverted due to the performance penalty being considered too severe.
> Users using SCSI will most definitely have the ability to disable
> said feature (either via SCSI BIOS or via camcontrol). But the majority
> of users are not using SCSI disks, because the majority of users are not
> going to spend hundreds of dollars on a controller followed by hundreds
> of dollars for a small (~74GB) disk.
> Regardless of all of this, end-users should, in no way shape or form,
> be expected to go to great lengths to disable their disk's write cache.
> They will not, I can assure you. Thus, we must assume: write caching
> on a disk will be enabled, period. If a filesystem is engineered with
> that fact ignored, then the filesystem is either 1) worthless, or 2)
> serves a very niche purpose and should not be the default filesystem.
> Do we agree?
Sort of, but soft updates does not technically need write caching to be
disabled. It does assume that disks will not 'lie' about if data has
actually been written to the disk or just to the disk's cache. Many (most?)
ATA/SATA disks are unreliable in this regard which means that the guarantees
Soft Updates normally give about consistency of the file system can no
longer be guaranteed.
Using UFS2+soft updates on standard ATA/SATA disks (with write caching
enabled) connected to a standard disk controller is not a problem (not any
more than any other file system anyway.)
Using background fsck together with the above setup is not recommended
however. Background fsck will only handle a subset of the errors that a
standard foreground fsck can handle. In particular it assumes that the soft
updates guarantees of consistency are in place which would mean that there
are only a few non-critical problems that could happen. With the above
setup those guarantees are not in place, which means that background fsck
can encounter errors it cannot (and will not) fix.
<Insert your favourite quote here.>
ertr1013 at student.uu.se
More information about the freebsd-stable