 Hello, everyone. Welcome to the session on system calls for the file system. At the end of this session, students will be able to explain mount and unmount file systems manually. Configure user mountable, removable file systems such as external USB drives, CDs or DVDs. Explain how to do the file system maintenance. Okay, so file system is a way that an operating system organizes files on a disk. These file systems come in many different flavors depending on your specific needs. For Windows, you have the NTFS, FAT, FAT16 or FAT32 file systems. For Macintosh, you have the HFS file system and for Linux, you have more file systems than we can list in this tutorial. One of the great things about Linux is that you have the ability to access data stored on many different file systems, even if these file systems are from other operating systems. In order to access file system in Linux, you first need to mount it. Mounting a file system simply means making the particular file system accessible at a certain point in the Linux directory. When mounting a file system, it does not matter if the file system is a hard disk partition, CD-ROM, Floppy or USB storage device. You simply need to know the device name associated with the particular storage device and a directory you would like to mount it on file system. Having the ability to mount a new storage device at any point in the directory is very advantageous. For example, let us say that you have a website stored in slash user slash local slash website directory. The website has become very popular and you are running out of space on your 36GB hard drive. In order to determine what file systems are currently being used, then you have to type the command on this dollar prompt that is mount. When you type this command at a command prompt, this command will display all the mounted devices. The file system type it is mounted as and the mount point. These are the three parameters when you type the mount command. The mount point here is being a local directory that is assigned to a file system during the process of mounting. Before you can mount a file system to a directory, you must be logged in as a root. That is some file systems can be mountable by a standard user and the directory you want to mount the file system to must first exist. Also, in some situations, you must be logged in as a root user in order to make the particular mount directory. If the directory exists and any user can mount that particular device, then it is not necessary to be logged in as a root. When mounting a particular file system or device, you need to know the special device file associated with it. A device file is a special file in Unix or Linux operating systems that are used to allow programs and the user to communicate directly with the various partitions and devices on your computer. These devices files are found in the slash dev slash fold. As a first example, let us use a real-world example of accessing your windows files from a floppy in Linux. In order to mount a device to a particular folder, that folder must exist. Many Linux distributions will contain a slash mnt folder or even a slash mnt slash floppy folder that is used to mount various devices. If the folder that you would like to mount the device to exist, then you are all set. If not, you need to create it like this. On the dollar prompt, you have to type mkdir space slash mnt slash floppy. This command will have now created a directory called slash mnt slash floppy. The next step would be to mount the file system in order to that folder or mount point. To mount a CD-ROM, the slash mnt directory by the Unix convention is where temporary mounts such as CD-ROM drives, remote network drives and floppy drives which are located. If you need to mount a file system, you can use the mount command with the following syntax. For example, if you want to mount a CD-ROM to the directory slash mnt slash CD-ROM, you can type on the dollar prompt mount space slash t, space file system name ISO 9660 slash directory name DEV slash CD-ROM slash mnt slash CD-ROM. This assumes that your CD-ROM device is called slash dev slash CD-ROM and that you want to mount it to slash mnt slash CD-ROM directory. Refer to the mount man page for more specific information or type the mount space dash h at the command line for the help information of this slash CD-ROM directory. After mounting, you can use the CD command to navigate the newly available file system through the mount point you just made. Now you have to pause the video and answer the question. The question is which is a directory which should exist on which to mount the file system? Here the answer is mount point. The answer is mount point because mount point is the point where actually we mount the file systems wherever we mount the particular devices in the file system. So, the answer is mount point which is the correct answer for this file system. We have next question. State true or false? Linux file system contains mainly ordinary files, device files and directory files. You have to think on this question for a while. The answer is true because we will go the again first one. Linux file system contains mainly yes ordinary files because which is very important and by default files. Then device files where we mount the all the devices like CD-ROM, and directory files where we installed the directory in the Linux system. So, the answer is again true. After mounting particular file system in the Unix, our work is finished. Then we want to do unmount command. To unmount or we can say remove the file system from your system, use the unmount command by identifying the mount point or devices. For example, to unmount CD-ROM just what we have mounted, to unmount CD-ROM use the following command unmount that is you mount space slash dev slash CD-ROM. Here the mount command enables you to access your file system, but on most modern Unix systems, the auto mount function makes this process invisible to the user and requires no intervention. Then we go for the file system abstraction. Here we can see an abstraction that supports the creation, deletion and modifications of files and organization of files into deletries. It also supports control of access to files and deletries and manages the disk space according to it. A file system is actually the flat structure sitting on a linear storage device such as a disk partition. The flat structure is completely hidden from the user but not entirely from the programmer. File system maintenance. In the file system we require a maintenance. Most versions of Unix by default provide very similar file systems capabilities. The default file system does not provide any extraordinary safeguards against the file loss due to events such as power failure or system crashes. These file systems rely on their understanding that everything will get returned to disk and nothing bad will happen. In the event that something bad does occur, a few utilities are provided to clean up the resulting mess. FSCK is a multi-phase file system checker. Here in this diagram we have all the five phases where these five phases is used for multi-phase file system checker by the FSCK command, the full form of FSCK's file system check. In this diagram, phase 1 indicates checks that all of the right blocks are used or unused within the file system. This phase also checks that the size of the file as recorded in the iNode agrees with the size of the data stored in the user blocks. Phase 2 of FSCK checks to ensure that the directory and the file name structure is coherent. Phase 3 of FSCK checks to ensure that the directories are connected to the file system tree in the proper places and that all the links are properly referenced in the iNode structure. Phase 4 checks to ensure that the link counts and the reference counts are correct. Phase 5 checks individual cylinder group utilization and reports file system statistics. So these are five phases are very important by FSCK to check the multi-phase file system checker. Then we go for file system maintenance again. There are two categories of file system damage. One is recoverable file system damage and second one is unrecoverable file system damage. First we'll go for recoverable file system damage. It can be repaired using the FSCK utility just we have seen and it caused by the improper shutdown of system crashes. File system data or metadata had not been stored on the disk and the file system state is inconsistent. FSCK can generally fix these problems using information stored in alternate super blocks. Any orphaned file or directories are placed in the last plus form directory which is very important directory where all the deleted files are stored on the top of the file system. Here we use the symbol as standard input since the file name is not stored in the inode these files are stored using the inode number for the file name. Again we go for the second type of file system maintenance that is unrecoverable file system damage. In this file system some types of disk corruptions are not properly repaired using FSCK. We have referred these references. Thank you.