Page 175 - DCAP602_NETWORK_OPERATING_SYSTEMS_I
P. 175
Unit 10: File System
A file system has to look, feel and operate in the same way no matter what device is holding it. notes
Moreover, using Linux’s file systems, it does not matter (at least to the system user) that these
different file systems are on different physical media controlled by different hardware controllers.
The file system might not even be on the local system, it could just as well be a disk remotely
mounted over a network link. Consider the following example where a Linux system has its root
file system on a SCSI disk:
A E boot etc lib opt tmp usr
C F cdrom fd proc root var sbin
D bin dev home mnt lost+found
Neither the users nor the programs that operate on the files themselves need know that /C is in
fact a mounted VFAT file system that is on the first IDE disk in the system. In the example (which
is actually my home Linux system), /E is the master IDE disk on the second IDE controller. It
does not matter either that the first IDE controller is a PCI controller and that the second is an ISA
controller which also controls the IDE CDROM. We can dial into the network where we work
using a modem and the PPP network protocol using a modem and in this case we can remotely
mount my Alpha AXP Linux system’s file systems on /mnt/remote.
The files in a file system are collections of data. A file system not only holds the data that is
contained within the files of the file system but also the structure of the file system. It holds all of
the information that Linux users and processes see as files, directories soft links, file protection
information and so on. Moreover it must hold that information safely and securely, the basic
integrity of the operating system depends on its file systems. Nobody would use an operating
system that randomly lost data and files.
Minix, the first file system that Linux had is rather restrictive and lacking in performance.
Its filenames cannot be longer than 14 characters (which is still better than 8.3 filenames) and
the maximum file size is 64MBytes. 64Mbytes might at first glance seem large enough but large
file sizes are necessary to hold even modest databases. The first file system designed specifically
for Linux, the Extended File system, or EXT, was introduced in April 1992 and cured a lot of the
problems but it was still felt to lack performance.
So, in 1993, the Second Extended File system, or EXT2, was added. Stephen Tweedie first revealed
that he was working on extending ext2 in Journaling the Linux ext2fs Filesystem in 1998 paper
and later in a February 1999 kernel mailing list posting and the filesystem was merged with the
mainline Linux kernel in November 2001 from 2.4.15 onward. Its main advantage over ext2 is
journaling which improves reliability and eliminates the need to check the file system after an
unclean shutdown. Its successor is ext4. The ext4 or fourth extended filesystem is a journaling
file system developed as the successor to ext3. It was born as a series of backward compatible
extensions to add 64-bit storage limits and other performance improvements to ext3.
An important development took place when the EXT file system was added into Linux. The real
file systems were separated from the operating system and system services by an interface layer
known as the Virtual File system, or VFS.
All of the details of the Linux file systems are translated by software so that all file systems
appear identical to the rest of the Linux kernel and to programs running in the system. Linux’s
Virtual File system layer allows you to transparently mount the many different file systems at
the same time.
The Linux Virtual File system is implemented so that access to its files is as fast and efficient
as possible. It must also make sure that the files and their data are kept correctly. These two
requirements can be at odds with each other. The Linux VFS caches information in memory
from each file system as it is mounted and used. VFS allows Linux to support many, often very
different, file systems, each presenting a common software interface to the VFS.
LoveLy professionaL university 169