Introduction to FileSystem

Written by Mike on September 18, 2008 – 8:54 pm -

Dumping a cupboard-full of documents, audio cassettes, video tapes and even photo albums on a hard drive or DVD might sound easy, but is actually a complex process. Operating systems use logical data structures for storing, organizing and keeping track of files on a partition or on an optical disc, called a Filesystem. The basic function of a FileSystem is to make efficient use of disk space for data storage, ease basic file operations (read, write, copy and delete) and catalogue files for faster retrieval.

A disk partition is like a compartment in a train, while the Filesystem is the seating arrangement fixed within the compartments. Before using any partition on a disk, a logical Filesystem needs to be initialized on it. Let’s have a look at how a typical Filesystem works.

How Filesystems Work?

The space in a hard drive is divided into units called sectors, usually of 512 bytes. The Filesystem groups the sectors together after creating a sector index; the group is called a cluster or an allocation unit. It’s difficult for the Filesystem to deal with data on a sector-by-sector basis, so when the Filesystem needs to access a sector for a read-write operation, it will first define the cluster number of that sector. Then from that cluster, it will use the sector index to access that particular sector. Each logical volume (hard drive) has a table—called the File Allocation Table (FAT)—that carries all the information about the sectors and the files stored on those sectors.

Types of Filesystems

Disk-based Filesystems
These would be found on hard disks, CD-ROMs and DVDs. Files are stored in a sequence of bytes on fixed-sized blocks called sectors; these Filesystems feature random-access file reads and writes, and also file fragmentation across the disk. Some disk-based Filesystems also have journaling and versioning. In a Journaling Filesystem like XFS on the Silicon Graphics platform, changes in files are logged first in a specially allocated area called a Journal before they’re actually written on the main Filesystem. Versioning Filesystems like OpenVMS allow for the existence of several versions of the same file, and take periodic backups. Popular disk-based Filesystems include:

Windows: New Technology File System (NTFS), File Allocation Table (FAT, FAT16, FAT32), and many more;
Linux: ext, ext2, ext2fs, NSS, ReiserFS and several others based on Linux and UNIX variants
Mac OS X: Hierarchical Filesystem (HFS+), HFS, Macintosh Filesystem (MFS), Xsan

Disk-based Filesystems can be further classified into:

Solid-state media Filesystems: These are designed for storing files on devices that rely on Flash memory as their storage. Such Filesystems require special handling, because data blocks wear out if information is repetitively written and rewritten on the drive. Besides, the blocks have to be erased explicitly before any data is written on them. The Journaling Flash Filesystem (JFFS) and Yet Another Flash Filesystem (YAFFS) are popular solid-state Filesystems.

Record-oriented Filesystems: The basic purpose of such Filesystems is to store files in the form of records to be compatible with older operating systems that are used exclusively on mainframes and minicomputers.

Shared-disk Filesystem: These are also known as SAN (Storage Area Network) Filesystems or Cluster Filesystem. As the name suggests, they are used on huge blocks of storage which are directly accessible to computers via a network connection.

Network Filesystems
Network Filesystems (or distributed Filesystems) support the sharing of files, printers and other computing resources over a network. The performance of such Filesystems is measured by the time it requires to satisfy the service requests by different computers connected on the network. Such Filesystems are found on file-servers and provide access to files by acting as clients for remote access protocols like NFS (Network Filesystem) or SMB (Server Message). NFS and SMB are popular examples of network Filesystems. Several network Filesystems prevail today: 9P, Apple Filing Protocol (AFP), NetWare Core Protocol (NCP), Coda, Distributed File System (DFS) and Google File System (GFS), to name a few.

Filesystems are critical for storage media to run properly with the operating system. Regular maintenance and protection from malware is not only advisable, it’s necessary.

Tags: , , , , , , , , , , , , , , , , , , , , , , , , ,
Posted in Dedicated Server Hosting | No Comments »

Leave a Comment


  • Subscribe Me

  • Tag Cloud

  • Archives