Unix - Discuss the mount and unmount system calls

Discuss the mount and unmount system calls

Mount system call makes a directory accessible by attaching a root directory of one file system to another directory. In UNIX directories are represented by a tree structure, and hence mounting would mean attaching them to the branches. This means the file system found on one device can be attached to the tree. The location in the system where the file is attached is called as a mount point.

Example:-
Mount –t type device dir

- This will attach or mount the file system found on device of type type to the directory dir.
- Unmount system calls does the opposite. It un mounts or detaches the attached file front the target or mount point. If a file is opened or used by some process cannot be detached.

Discuss the mount and unmount system calls

The attaching of a file system to another file system is done by using mount system call. At the time of mounting, there is an essential splicing one directory tree onto a branch in another directory tree is done. The mount takes two arguments. One – the mount point, which is a directory in the current file naming system, two – the file system to mount to that point. At the time of inserting CDROM into the system, the corresponding CDROM file system will automatically mounts to the directory - /dev/cdrom in the system.

The unmount system call is used to detach a file system.
Unix - What are the process states in Unix?
What are the process states in Unix? - UNIX has the following process states:.......
Unix - What is use of sed command?
What is use of sed command? - Sed command in UNIX is commonly used for processing of files.........
Unix - What is 'inode'?
What is 'inode'? - A file in UNIX is given a unique number.........
Post your comment