4

I notice on my system (Manjaro Linux) that:

  1. I have an empty directory named /net
  2. This directory is not mentioned in the Filesystem Hierarchy Standard

What is the intention behind this directory (quoting chapter and verse)?


Is it like /mnt (which is for temporary mounts) but for network (eg sshfs, nfs) mountpoints?

Or, in other words, is it like /media, but for non-removable non-temporary mount points?

1 Answer 1

3

Yes, it is very similar to /mnt and is designed to contain nfs shared directories from remote hosts.

If there is a NFS server named nfsserver sharing a directory named shared-directory, you can access it just by listing or reading files in /net/nfsserver/shared-directory[/filepath].

This featured is provided by the automounter, was first implemented by Sun Microsystems in SunOS 4 (1988).

Unlike Linux, Solaris is documenting it in its file system hierarchy standard documentation:

$ man filesystem
...
/net

   Temporary mount point for file systems that are  mounted
   by the automounter.

Note that the /net directory is not hardcoded and you can select a different one by editing the /etc/auto.master or /etc/autofs/auto.master configuration file. See for example this documentation page.

Note also that the same mechanism can be used to automount CIFS or fuse based (e.g. sshfs) file systems shares. See this Gentoo wiki page or that Ubuntu documentation one.

5
  • @Kusalananda Yes but amd standard configuration is to mount on /a, not /net which is autofs standard mount point. I assume the OP machine is running autofs, not amd.
    – jlliagre
    Apr 15, 2017 at 6:45
  • Thanks, I've not played with autofs. What happens if there is already a sshfs /mnt/hostname mounted there?
    – Tom Hale
    Apr 15, 2017 at 7:03
  • /mnt and /net are different directories and sshfs and NFS are different protocols. Nothing particular would happen if you use both methods to access the same shared directory. That would gave you to different paths to the same data.
    – jlliagre
    Apr 15, 2017 at 7:06
  • Sorry I meant to say: What happens if there is an existing sshfs /net/host mounted and autofs wants to mount host's NFS directories?
    – Tom Hale
    Apr 15, 2017 at 7:16
  • 1
    You can't have both sshfs and NFS configured to handle the same mount directory. You have to select different ones in the auto_master file.
    – jlliagre
    Apr 15, 2017 at 7:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .