/    /  OS – File System Mounting

File System Mounting

 

Mounting refers to the grouping of files in a file system structure accessible to the user of the group of users. It can be local or remote, in the local mounting, it connects disk drivers as one machine, while in the remote mounting it uses Network File System (NFS) to connect to directories on other machines so that they can be used as if they are the part of the user’s file system. 

The directory structure can be built out of multiple volumes which are supposed to be mounted to make them available within the file-system namespace. The procedure for mounting is simple, the OS is given the name of the device and the location within the file structure where the file system is attached. 

 

For example, in a UNIX system, there is a single directory tree, and all the accessible storage must have a location in the single directory tree. Mounting is used to make the storage accessible. A file system containing the user’s home directories might be mounted as /home, and they can be accessed by using directory names with time like /home/janc. Similarly, if the file system is mounted as /user, then we will use /user/janc to access it. Then the operating system verifies if the device contains a valid file system by asking the device driver to read the directory and verify that the directory has the expected format. Then the operating system finally notes down the directory structure that the file system is mounted at the specified mount point. 

 

This method helps the operating system traverse through the directory structure and switch among file systems as appropriate. 

 

A system may either allow the same file system to be mounted repeatedly on different mount points or it may allow one mount per file system. 

For example, the Macintosh operating system. In this whenever the system encounters a disk for the first time, it searches for the file system in the disk, and if it finds one it automatically mounts the system at the root level and adds a folder icon on the screen labelled as the name of the file system. The Microsoft OS maintains a two-level directory structure. 

 

Reference 

File System Mounting