On Fri, 3 Feb 2017, Tinker wrote:
> On 2017-02-04 03:57, Philip Guenther wrote:
> > On Fri, 3 Feb 2017, Tinker wrote:
> > > After rebooting the machine (now in ordinary softdep mode, and fsck did
> > > its job), I tried to do "rm -rf /home/lost+found", and got "ffs_blkfree:
> > > freeing free block".
> > ...
> > > I'm not so freaked out by this error as indeed my FS must have been in a
> > > badly inconsistent state, however, nonetheless I guess this is a bug.
> > 
> > Unfortunately, there are possible corruptions which fsck cannot repair or
> > does not detect.  This includes some failures 'below' the filesystem, as
> > well as kernel bugs, random scribling to the device, etc.
> > 
> > When something like that happens, then way to get back to a totally
> > consistent filesystem is, unfortunately: backup, newfs, restore.
...
> Remaking filesystems from ground up is an arduous task, and putting 
> yourself at unnecessary risk of needing to do it is stupid -
> 
> So that sounds like an excellent reason to never ever mount filesystems 
> with any important info on them in "async" but only as "softdep" and 
> "sync"!

Oh god, yes.  Or without any of the three options.  Is the warning on the 
mount(8) manpage not scary enough?

             async      Metadata I/O to the file system should be done
                        asynchronously.  By default, only regular data is
                        read/written asynchronously.

                        This is a dangerous flag to set since it does not
                        guarantee to keep a consistent file system structure
                        on the disk.  You should not use this flag unless you
                        are prepared to recreate the file system should your
                        system crash.  The most common use of this flag is to
                        speed up restore(8) where it can give a factor of two
                        speed increase.


> "softdep" is 1) essentially as safe as "sync" though and 2) should come 
> with some performance benefits on both SSD:s and magnet disks, right?

(1) practically/essentially, yes, though the fact that softdep -- at least 
on OpenBSD -- can panic if there's a unrecoverable I/O failure is a 
blocker to some users.  (I seem to recall that Kirk made fixes in that 
area to FreeBSD in the last year or so, but I don't have a direct 
pointer.)

(2) since the original advantage of softdeps was reducing the number of 
synchronous I/O operations that a given FS operation could require, I 
would expect the relative benefit to be lower on low latency devices...but 
I haven't seen any recent measurements.


Philip Guenther

Reply via email to