This research paper will present research on various file systems available for Linux. I will discuss the main features of each file system before making the final comparison and drawing a conclusion.

Authors Avatar

A Comparison of Linux File Systems

CB353

Co-operative Operating Systems

Assignment 1

By

Christopher Waite

Student Number: - 0103396

Abstract

This research paper will present research on various file systems available for Linux. I will discuss the main features of each file system before making the final comparison and drawing a conclusion.

Introduction

A file system is used by an operating system to organize and access files.  This document will examine the various ‘built-in’ and independent file systems available for Linux.  This will cover file systems suitable for both personal and enterprise use. I will go into depth about the functions offered by each file system and the advantages and disadvantages of its use in the Linux environment.

In Linux a file system doesn’t talk directly to the kernel, instead the Linux kernel contains a VFS (Virtual file system) layer. This isn’t a complete file system but instead it is an integral part pf the kernel. Card, Ts’o and Tweedie go on to explain that the virtual file system layer calls specific actions in the actual file system when requested to do so. It is designed to make it easier to migrate a file system into the Linux kernel.

The diagram demonstrates that when the user invokes a process such as deleting a file, this process is trapped by the system, which then calls the VFS layer. The VFS calls the appropriate command in the file system in use on that partition. This command is then stored in the buffer where the appropriate device drivers are used to access the disk. All of the files systems in this paper use the VFS layer to aid in sending commands to the kernel. This is further detailed in R. Card, T. Ts’o, and S. Tweedie, ‘Design and Implementation of the Second Extended File System’.

FAT32

Linux supports FAT32, commonly used by windows, and also has some support for NTFS.  FAT32 is a good place to begin this document, as you will most likely be familiar with this file system.  FAT stands for File Allocation Table and the number 32 refers to the file allocation table being 32-bits.  The file allocation table is a component of the FAT32 file system that is located at the start of every partition. It works as a table, with each entry pointing to the beginning of a file block on the disk.

        

The diagram demonstrates how the File allocation table works. The Doc1 file in the directory points to the first block in the FAT. This block in turn points to another block. This continues until the last block of the file. The last block has a special entry to identify it as the end of the file.

Ext2FS

Ext2FS an abbreviation of extended file system version 2.  This was the standard file system before its replacement came in the form of Ext3FS. The core features used in Ext2FS still remain in its successor. Appleton (1997, p. 2) explains that the Ext2 file system is broken up into groups. Each group contains a superblock, a group descriptor, a block bitmap, an I-node bitmap, an I-node table, and data blocks. These are set when the partition is formatted and cannot be altered. Information general to the whole file system is stored in the superblock. This is important as the file system is mounted using this information. The superblock in each group contains a copy of the original in case of an error. If an error occurs then the system can recover the original from one of the copies.

Join now!

The second extended file system also implements I-nodes. Each file on the disk is associated with one I-node. An I-node contains information on the file such as its creation date and time, its permission, and pointers to the files location on disk. The most important feature of an I-node is the pointers it contains. This principal is detailed by Appleton (1997, p.3) who tells us that an I-node has 15 pointers. The first thirteen point directly to blocks of data on the disk. However, if the file is larger than this then the 14th pointer can be used which points firstly ...

This is a preview of the whole essay