←back to thread

The File Filesystem (2021)

(mgree.github.io)
346 points wegwerff | 4 comments | | HN request time: 0.925s | source
Show context
paulgb ◴[] No.40216398[source]
This is really neat, but when I saw the headline I got excited that it was something I have been looking for / considering writing, and I figure the comments here would be a good place to ask if something like this exists:

Is there a FUSE filesystem that runs in-memory (like tmpfs) while mounted, and then when dismounted it serializes to a single file on disk? The closest I can find are FUSE drivers that mount archive files, but then you don't get things like symlinks.

replies(5): >>40216686 #>>40216763 #>>40216799 #>>40216812 #>>40220124 #
ranger_danger ◴[] No.40216799[source]
I can't think of anything _exactly_ like that, but I think you can get close by just copying some type of image file to /tmp and then moving it to disk when you're done after unmounting.
replies(1): >>40217275 #
1. AgentME ◴[] No.40217275[source]
/tmp isn't stored in memory; it's usually a normal on-disk filesystem that's cleared regularly. You want /dev/shm instead, which is a purely in-memory filesystem on normal Linux systems.
replies(1): >>40217297 #
2. codetrotter ◴[] No.40217297[source]
> /tmp isn't stored in memory

It is if your system uses tmpfs for /tmp

https://en.wikipedia.org/wiki/Tmpfs

replies(1): >>40217373 #
3. throwway120385 ◴[] No.40217373[source]
The point they were trying to make is that it doesn't have to be, and it isn't in several of the Linux systems I've used over the years. Assuming that it is is a bad idea.
replies(1): >>40218651 #
4. arjvik ◴[] No.40218651{3}[source]
/dev/shm always is though