Larry Lile wrote: > > It was pointed out to me by a co-worker that FreeBSD has actually > three modes of operation for mounting ufs filesystems. Could someone > please explain to me, and him, the differences between the three.
There are two kinds of stuff written to the fs: data and metadata. Data is what goes inside files, metadata are things like filenames and sizes (gross simplification, emphasis on gross). Default for FreeBSD is async data and sync data. Sync and Async modes go full sync/async for both metadata and data (in theory, anyway :). The advantage with sync metadata is that the fs never gets "too" damaged. With async metadata writes, the fs can get in a state that fsck won't be able to get back to life. Sync metadata writes will be restricted to recoverable inconsistencies (ie, you may lose files and directories, but not the filesystem). > Also does anyone knows how these compare to sync and async on Linux? Sync and async modes on Linux, last I checked, are like full sync and full async modes on FreeBSD. Then, there is softupdates, which is a whole new ball game. Softupdates is async, but it will order, delete, collapse and expand metadata writes so the file system will never get in an inconsistent state. > > Just a btw, you seem to be able to set sync and async on a filesystem > at the same time. What gives? Beats me. > dlane# mount -u -o sync,async,noatime /var dlane-printer# mount > /dev/wd0s1a on / (local, noatime, synchronous, writes: sync 405 async 23) > /dev/wd0s1e on /usr (local, noatime, synchronous, writes: sync 118365 > async 83882) > /dev/wd0s1f on /var (asynchronous, local, noatime, synchronous, writes: > sync 93 async 216) procfs on /proc (local) > dlane# > > /var looks questionable... Indeed. :-) > I would never try that on purpose, but it just kinda happened, and when I > looked at it I though "wow that's broken"! Looks that way. Try opening a PR. :-) -- Daniel C. Sobral (8-DCS) d...@newsguy.com d...@freebsd.org - Can I speak to your superior? - There's some religious debate on that question. To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-hackers" in the body of the message