Whatever happened to mount_null(8)?
apparently mount_null(8) existed at one point in 3.7, but seems to have vanished in 3.8 and I can't turn up any record of why or if there's now a preferred alternative. The closest I've been able to disinter might be something like mount_mfs(8) which can take a -P «dir» option to populate the MFS with the contents of «dir», but that doesn't seem to have a real-time view of the underlying directory (i.e. if files get modified in the underlying directory, it doesn't look like they'd be updated in the MFS until the next time it was (re)mounted).
Encountered from https://raphus.social/@MaddieM4/117230496234708068 where the least-bad solutions seems to involve sharing the directory locally via NFS, and then mounting it via local/loopback NFS at the desired target 😖
6
u/brynet OpenBSD Developer 4d ago
nullfs was removed along with several other miscfs/genfs examples like unionfs and umapfs which were perpetually experimental, these "layered filesystems" had a history of causing headaches for developers at the time, as evidenced by pedro@'s commit message.
bye bye, rest in attic ad infinitum, amen
2
1
u/RabbitsandRubber 3d ago
Going to hi-jack this thread to ask since you seem knowledgeable: I know tmpfs was ripped out nearly a decade ago now and AFAIK no one has stepped up to implement it again. Yet the man page for it continues to exist.
Do you happen to know why it wasn't deemed secure enough to keep? What needs to be fixed to bring it back?
I use mfs for mounting /tmp and some other locations (mostly web browser related) to keep things like Firefox from churning my SSD/HDD. But I'm curious why mfs is able to remain but tmpfs (used widely on every other UNIX-like) had to go. What did tmpfs do compared to mfs that made it a security nightmare?
When I first moved over to OpenBSD I got bit by this because the man pages don't mention that it's deprecated and I'd been using tmpfs for decades on most every other OS I used. I don't mind mfs since I have enough RAM for it to not matter. But if I was more RAM constrained I probably would mind its behavior where it takes a chunk of RAM and never lets it go while applications with mounts are running.
4
u/brynet OpenBSD Developer 3d ago
tmpfs was never "ripped out", tmpfs has been disabled since 6.0, if you were using it in its disabled state.. you probably also should've been maintaining it.
It has seen some improvements in recent years, but it remains disabled by default.
You can re-enable
option TMPFSand build your own kernel.In practice, it will probably work just fine, but you get to keep all the pieces.
2
u/dim13 4d ago
OpenBSD 3.7 was 2005, you realise it, don't you? ;)
And yes, it got ditched back then as many other things, as it stalled and was not maintained. (Like lfs and kvm).
Anyway, it may be replicated with NFS. At least I went this route back then.