Hacker News new | ask | show | jobs
by doublepg23 20 days ago
My hobby horse is the lack of a “modern” filesystem on obsd.

Without journaling I really don’t agree with the oft repeated claims it makes a good “router”.

Any networking gear I’ve used is treated as an appliance and I don’t want an unfortunate power outage causing data loss.

6 comments

I ran it diskless for years with read-only NFS mounts. Set up syslog and a pflog daemon to send logs elsewhere, and you don't need write access most of the time.
I believe that while the file system does not have journaling, that can be offset by applications. I.e. I think the SQLite Write Ahead Log would still protect you against data loss even if there's no journal in the file system, assuming you set various settings correctly. So I think it kinda depends on how the applications store data.
Yeah, if OpenBSD had ZFS it’d be perfect.
What's the use for a writable filesystem in network gear, that is detrimental if lost at power outage? Some sort of very important logging?
He does not know.
Out of curiosity, why put "router" in quotes?
OpenBSD's FFS can be told to be fully synchronous, making it about as robust as can be for not being journaled. If you lose power it will lose the specific data currently being written to disk. It won't lose other data, because it doesn't keep a bunch of it sitting around in a RAM cache while lying to the writing process about the I/O op already being completed. A journaled file system, too, will lose in-flight data that has yet to land on disk if the power is cut.

I've had my share of sudden power cuts hit OpenBSD during the 20+ years I've been using it, and I have yet to ever see its file system actually go corrupt.

A sincere question: what important data does your router frequently and busily need to persist? If you don't have a UPS for it, perhaps it isn't too important after all. Maybe we have different perspectives of what a router is and should be. I manage a router (with OpenBSD) and it can drop off the power grid at any moment without losing anything of importance. If your router is in fact a multi-functional server I can understand the notion. Consider making all of the file systems fully synchronous. It has worked great for me for two decades.

> OpenBSD's FFS can be told to be fully synchronous, making it about as robust as can be for not being journaled.

I am very interested, is there anything we can read to achieve that?

You can look at the mount command and the "sync" option: https://man.openbsd.org/mount

If you're really curious about it, Michael Lucas wrote a full book about the OpenBSD file system.

Man, thanks for this precious tip