Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • 2
    Strange arguments. Leave that directory empty. Otherwise this will be confusing Quite the opposite. His approach avoids this confusion (at least partly). multiple tools will refuse to mount something "atop" of a non-empty directory So which tools are that? systemd is not among them. And if you mount USB sticks from a file manager and the mountpoint is created dynamically then this approach is nor really applicable anyway. a device containing a file system doesn't [...] says "I need to be mounted under /path/to/mountpoint" Not really true: dumpe2fs -h /dev/vda1 | grep mounted Commented Oct 5 at 22:57
  • 4
    That command extracts where it was previously mounted, not where it will be mounted next time. Commented Oct 5 at 23:36
  • 3
    Do you have an example of these "multiple tools" that refuse to mount a filesystem onto a non-empty directory? I've never used one (that said, mount and pmount have always served my needs). Commented Oct 6 at 8:06
  • 1
    @user10489 I specifically addressed that: there's no knowing at all where it will be mounted next, unless you configure your system to mount it in a specific place. But if you do that, you know where it will be mounted, and through the mechanism used there, you would also trivially know whether it's currently mounted at all. Commented Oct 6 at 13:06
  • 2
    @TobySpeight mount.fuse for example does that by default, mounting zfs will typically complain if the mountpoint isn't empty, etc. Commented Oct 6 at 13:08