Re: Preventing writes to the underlying directory when a mounted filesystem disappears

"Thomas Schmitt" <[email protected]> Mon, 27 Jul 2026 14:22:44 +0200
Newsgroups gmane.linux.debian.user
Message-ID <[email protected]>
Hi,

The Wanderer wrote:
> [...] it only works if you have
> that much control over the applications that will be writing the files
> (and if they won't automatically create any "missing" directories in the
> path specified for them to write to).
> [...]
> The only other fallback option that's occurred to me is to mount the
> root filesystem read-only, such that if the mounted writable FS goes
> away, any writes would be rejected for being to a read-only filesystem.

... or maybe have a directory /mnt/sdd/WeIrD_NaMe in the root
filesystem without any permissions ?
It will become visible when the mounted filesystem vanishes.

Maybe the logger program is not daring enough to open up the existing
directory.


Have a nice day :)

Thomas