securefs icon indicating copy to clipboard operation
securefs copied to clipboard

Feature to unmount filesystem after some idle time

Open peesock opened this issue 1 year ago • 2 comments

Like CryFS's --unmount-idle option to automatically unmount the filesystem X time after no operations (or open files, i assume).

In the absence of this feature, i wrote a shell script to parse the output of securefs m --trace, but obviously the logging slows things down (1.8s to 2.6s when writing a 100MiB file from /dev/random) and with my current shell implementation of the parser, it's super slow (7.6s). But otherwise it works well.

It would be nice to have this feature in securefs if possible. In the meantime i'll optimize the shell script -- probably stop it from reading lines for ~5 seconds after it detects a [Trace] line, or rewrite the parsing in awk.

peesock avatar Jul 12 '24 03:07 peesock

Let me think how this can be done.

netheril96 avatar Jul 12 '24 14:07 netheril96

Here's the initial CryFS commit if it helps https://github.com/cryfs/cryfs/commit/978e7dbc467a22ab8b66dee4ff9fbabf019b0401

peesock avatar Jul 12 '24 15:07 peesock

Fixed in https://github.com/netheril96/securefs/releases/tag/v2.0.0-beta1.

netheril96 avatar Jun 22 '25 08:06 netheril96