Files contained in a file system can be accessed only when the file system is mounted. Each device consists of its own local file system.
File System Mounting
•
Files contained in a file system can be accessed only when the file system is
mounted. Each device consists of its own local file system. Mounting is the
operation that administrator/user perform to cause the file system on a
physical storage device to appear as part of the file system.
•
Mount system call is used on UNIX/Linux OS for mounting file system and unmount
system call for disconnecting the file system. Mounting file system is used
when there are more than one file system is used. Required file system is
mounted in the host file system machine as a root directory.
• Some operating system support the mounting the file system at any point.
• File
system stores directories and files. Each file system contains exactly one
directory at the very top level, called the root directory for that file
system. This root directory can contain other directories and files. One file
system is designated the root file system or /. Every other file system is
mounted under the root file system.
Procedure
for mounting file system :
•
To mount the file system, device name and location within the file structure
•
Fig. 6.4.1 shows the mounting a file system on secondary storage device. File
system manage mounted directories by using mount table. User can create soft
links to files in mounted file system. Mount tables keep track of the actual
physical location of the files.
•
When a file system is mounted, the client can reference files by the local path
name. There is no reference to remote host location, although files remain
physically located at the remote site.
Busy
file system is can not unmount by using unmount command. A file system is
considered busy in following situation :
1.
File system is shared in between the users.
2. A program has a file open in that file
system.
3.
A user is accessing a file/directory in the file system.
Example: Consider a file structure of
the pen drive. Following is Fig. 6.4.2 of file
• The file system structure in the pen
drive is as follows:
•
Now, the pen drive is mounted to the directory sorting_program. Here, the pen
drive becomes the part of the file
Advantages
of mounting:
1.
It is a user-oriented naming scheme
2.
It makes sense to be able to mount at any level.
Disadvantages
of mounting :
1. The hardware is less obvious since devices can be located anywhere in the tree structure
Example 6.4.1 Discuss the advantages and disadvantages of
supporting links to files that cross mount points.
Solution :
Advantages:
1. Greater transparency
2. User does not need to be aware of
mount points.
Disadvantages:
1. The error condition would expose to
the user that a link is a dead link and that the link does indeed cross file
system boundaries.
Introduction to Operating Systems: Unit IV(b): File System : Tag: : File System - Introduction to Operating Systems - File System Mounting
Introduction to Operating Systems
CS3451 4th Semester CSE Dept | 2021 Regulation | 4th Semester CSE Dept 2021 Regulation