What are the FHS compliant mount points

fhsmount

I'm wondering what the FHS compliant mount points for internal harddrives and networkshares are? Many different tutorials are suggesting to mount them in subdirectories to /mnt or /media

According to the FHS 3.0 (File Hierarchy Standard):

  • /media : Mount point for removable media
    (This directory contains subdirectories which are used as mount points for removable media such as floppy disks, cdroms and zip disks.)
  • /mnt : Mount point for a temporarily mounted filesystem (This directory is provided so that the system administrator may temporarily mount a filesystem as needed. The content of this directory is a local issue and should not affect the manner in which any program is run)

I assume that those mount points could go to /home/foo/extdrive /home/foo/nfsshare for a single user system, but where would I mount them accessible for all users?

Update:
FHS 3.0, Chapter 3.1, second "Rationale" paragraph

  • new directory in / (ie /workspace and /nfsshare) There are several reasons why creating a new subdirectory of the root filesystem is prohibited:
    It demands space on a root partition which the system administrator may want kept small and simple for either performance or security reasons.
    It evades whatever discipline the system administrator may have set up for distributing standard file hierarchies across mountable volumes.
    Distributions should not create new directories in the root hierarchy without extremely careful consideration of the consequences including for application portability.

Best Answer

You make your own mount point directories. If you want to ask why, I can only point to the great answer by Wouter Verhelst.

Internal drives

/mnt is a valid place to make your own if you like, and so is /.

/mnt may have been used for this purpose by some historical installation systems, as well as for removable media (before /media). It's still valid for you to do so, but the system itself is no longer supposed to set up anything in /mnt.

I think it's reasonable to use /mnt if you might make multiple mount points. It makes it easy to see all of them together, and it's known as one of the locations people like to use. Some other people like to use /Volumes - following the OS X system, or /vol. /data is common for a single mount point. /d/ is also used. /disk/ is almost certainly used by some, but may be distracting for storage which is not disk-based.

If you use /mnt, I would also create /mnt/tmp. Then there will still be a convenient directory for temporary mounts, the original use of /mnt which FHS mentions.

Preferred mount points for internal HDDs

It's possible that manually creating mount points under /media is a bad idea on some common systems. Modern Linux OS's will create mount points for removable media automatically, and it's possible the structure they create would conflict, or simply appear inconsistent with your own. You don't say what your system is, but you may be interested in portable guidelines, especially if you're asking about FHS. Note this reasoning is similar to why the FHS says the OS must not populate /mnt.

Mount point for system-wide USB disk

Network filesystems

It is sometimes recommended to mount network filesystems in a dedicated sub-directory e.g. /n/host, /nfs/host or /net/host etc.

For example, if you mount a network filesystem at /host and the network becomes unreachable, ls / may hang when it tries to stat the network filesystem. This could be undesirable and frustrating, at a time when you are already becoming frustrated.

Related Question