Linked by Amjith Ramanujam on Fri 1st Aug 2008 15:32 UTC, submitted by Daniel Sieger
NetBSD Today, support for metadata journaling has been added to NetBSD's implementation of the Berkeley Fast File System (FFS), eliminating the need for lengthy file system checks after a crash or power failure. Support for converting existing file systems to use the new journaling capabilities is provided as well. See the official announcement for all the details.
Thread beginning with comment 325294
To read all comments associated with this story, please click here.
NetBSD just got journaling?
by sbergman27 on Fri 1st Aug 2008 16:05 UTC
sbergman27
Member since:
2005-07-24

So, NetBSD just got journaling? Did they not have soft-updates previously? How can a server OS survive in today's large-disk world without some way to get around its fscking problems?

RE: NetBSD just got journaling?
by anomie on Fri 1st Aug 2008 16:27 in reply to "NetBSD just got journaling?"
anomie Member since:
2007-02-26

Did they not have soft-updates previously?


Soft updates were available and documented here: http://www.netbsd.org/docs/misc/#softdeps

Reply Parent Bookmark Score: 2

RE: NetBSD just got journaling?
by diegocg on Fri 1st Aug 2008 16:43 in reply to "NetBSD just got journaling?"
diegocg Member since:
2005-07-08

So, NetBSD just got journaling?



Yes...but not in the same way other people do journaling. Apparently they've metadata journaling - just like XFS, JFS or ext3 with the "data=writeback" mount option.

But if you only journal the metadata, you're only sure that the metadata is safe - not the data. IOW, you don't get metadata corruption (you don't need to fsck after a hard reboot), but the data of the file you were writting at the time of the reboot can be lost/corrupted. In XFS for example a file can get completely zeroed after a hard reboot.

There're two main ways to workaround this. One, journal the data (like in ext3 with the data=journal option) - but it's too slow. Second, write the data of a file before you journal its metadata, so that even in the event of a hard reboot, you are sure that the content of the file are not corrupted/lost - they may be outdated (the data was in ram and was not written to disk when the reboot happened), but not lost/corrupte (you may get a "corrupted" file in the sense that the process which was writting to it doesn't finishes writting what it was doing, but certainly you don't get rubbish). This is what ext3 does by default - it harms performance, but it's worth of it, specially for desktops.

You can also avoid completely the journaling, like zfs/btrfs do, but that's not really a "journaling mode"

Reply Parent Bookmark Score: 3

happycamper Member since:
2006-01-01

Did they not have soft-updates previously?



it says in the announcement to remove "softdep" if presnet.

Note that WAPBL is not compatible with soft-dependencies, so please ensure that you first remove the softdep option if present. See the wapbl(4) manual page for more information.


Edited 2008-08-01 17:25 UTC

Reply Parent Bookmark Score: 3

danieldk Member since:
2005-11-18

So, NetBSD just got journaling? Did they not have soft-updates previously?


Soft-updates and the log-structured filesystem (LFS). But soft-updates are fairly complex, and LFS does not have the same proven reliability as FFS. So, the addition of journaling to FFS is great, and a very nice contribution from Wasabi!

Reply Parent Bookmark Score: 3