←back to thread

150 points shaunpud | 2 comments | | HN request time: 0s | source
Show context
renewiltord ◴[] No.45060144[source]
Why is there no write through unionfs in Linux? Feels like a very useful tool to have. Does no one else need this? Have half a mind to write one with an NFS interface.

EDIT: Thank you, jaunty. But all of these are device level. Even bcachefs was block device level. It doesn't allow union over a FUSE FS etc. It seems strange to not have it at the filesystem level.

replies(2): >>45060168 #>>45060973 #
1. jona-f ◴[] No.45060973[source]
Do you mean that you can mark files for which still the underlying filesystem is used? As far as I remember there were experiments with that about 20 years ago, but it was decided that the added complexity wasn't worth it. The implementation that replaced all of that has been very stable (unlike the ones before) and i'm using it heavily, so i think they had a point. Some write-through behavior can be scripted on top of that.

EDIT: So, wikipedia lists overlayfs and aufs as active projects and unionfs predates both. Maybe unionfs v2 is what replaced all that? Maybe I'm hallucinating...

replies(1): >>45069236 #
2. renewiltord ◴[] No.45069236[source]
Overlayfs doesn't write through, and I believe unionfs and aufs no longer support write-through.

What I want is pretty much like how a write-through cache would work.

1. Write to top-level FS? The write cascades down but reads are fast immediately

2. Data not available in top-level FS? The read goes down to the bottom level and then reads up to the top so future reads are fast.