File System Characteristics

File System Features

The Linux file system consists of several important parts:

  • Load block : It is reserved to store the boot loader of the operating system.
  • Superblock : Contains the information about the file system.
  • Table of inodes : For each file or directory, there is an element in this table that contains a number and that identifies the location of the file or directory within the data area.
  • Data blocks : It occupies the rest of the disk and stores the files and directories of the system.

File system schema

 

Types of File Systems

Linux supports a wide variety of file systems, on the one hand those based on disks, such as EXT3, EXT4, ReiserFS, XFS, JFS, UFS, FAT, NTFS, etc; and on the other hand those based on network communication, such as NFS or SMB.

 

Journaling

The journaling or “journaling” is a mechanism that possess some file systems based on keep a journal or diary in which is stored the information needed to restore data affected by a transaction if it fails.

The procedure is basically the following:

  1. The data structures affected by the transaction are locked so that no other process can modify them for the duration of the transaction.
  2. A resource is reserved to store the journal. In general, they are usually some disk blocks, so that if the system stops abruptly (power outage, breakdown, operating system failure …) the journal remains available once the system is restarted.
  3. Modifications to the data structure are made one by one. For each one:
    1. It is noted in the journal how to undo the modification and makes sure that this information is physically written to disk.
    2. The modification is made.
  4. If at any time you want to cancel the transaction, the changes are undone one by one by reading and deleting them from the journal.
  5. If all went well, the journal is deleted and the affected data structures are unlocked.

 

In the specific case of file systems, journaling is usually limited to operations that affect the structures that maintain information on:

  1. Directory structures.
  2. Disk free blocks.
  3. File descriptors (size, modification date …).

 

The fact that journaling of the specific data of a file is not usually implemented is usually unimportant, since the aim of file system journaling is to avoid the cumbersome and lengthy disk checks that systems perform when shutting down abruptly. since the system when booting will only have to undo the journal to have a coherent system again.

The EXT3, ReiserFS, XFS, JFS, UFS, and NTFS file systems have this feature.

 

by Abdullah Sam
I’m a teacher, researcher and writer. I write about study subjects to improve the learning of college and university students. I write top Quality study notes Mostly, Tech, Games, Education, And Solutions/Tips and Tricks. I am a person who helps students to acquire knowledge, competence or virtue.

Leave a Comment