Name File System (NameFS)

NameFS provides the function of file-over-file and directory-over-directory mounts (also called soft mounts) that allows you to mount a subtree of a file system in a different place in the file name space, allowing a file to be accessed through two different path names.

This function can also be useful in modifying the mount attributes for certain directories. For instance, if the files in a particular directory need direct I/O support, but the entire file system is not suitable for direct I/O, then that directory or file can be remounted with namefs using the -o dio flag (assuming the file system type containing the object supports dio).

A NameFS file system is a purely logical entity. It exists only during the time it is mounted, and serves only as a means of grouping files for logical reasons. All operations on an object accessed through NameFS are implemented by the physical file system type that contains it and the function and semantics of that file system apply as if there were no interposing NameFS.

A NameFS file system is created by mounting a pathname path1 over another pathname path2. The objects specified by path1 and path2 must be either regular files or directories, and the types of the objects must match. Subsequent to a file-over-file mount, the object accessed through path2 is the object that is specified by path1. Subsequent to a directory-over-directory mount, the object accessed as path2/<pathname> is the object that is specified by path1/<pathname>. The programming interface to NameFS is covered by the standard file interface system calls. NameFS is accessed by specifying its gfstype in the vmount structure passed to the vmount() system call. The user interface to NameFS is the mount command. The mount command recognizes the vfs type namefs as a valid option for the -v flag.

Note: NameFS file systems cannot be exported by NFS.