Académique Documents
Professionnel Documents
Culture Documents
Unit 1
The File System
Outline
The / Directory
The / Directory
The / directory is called the root directory and is typically at the top of
the file system structure
The above figure shows a file system with the / directory mounted as
the only partition, with all other directories mounted beneath it
The primary purpose of the / directory is booting the system, and to
correct any problems that might be preventing the system from
booting
According to the FHS, the / directory must contain, or have links to,
the following directories:
bin This directory contains command files for use by the system
administrator or other users. The bin directory can not contain
subdirectories.
boot This directory contains the kernel & other files related to booting
the system, such as the bootloader.
dev This directory contains files with information about devices, either
hardware or software devices, on the system.
The / Directory
etc This directory and its subdirectories contain most of the system
configuration files like network related files, X Windows related and many others
home This directory contains the directories of users on the system.
lib The shared system files and kernel modules are contained in this directory
and its subdirectories.
mnt This directory is the location of the mount point for temporary file
systems, such as a floppy or CD.
opt This directory and its subdirectories are often used to hold applications
installed on the system.
proc Information about system processes is included in this directory.
root This is the home directory of the root user. Dont confuse this with the /
directory, which has the same name.
sbin Contained in this directory are system binaries used by the system
administrator or the root user.
tmp This directory contains temporary files used by the system.
usr This directory is often mounted on its own partition. It contains shareable,
read-only data. Subdirectories can be used for applications, typically under
/usr/local.
var Subdirectories and files under var contain variable information, such as
system logs and print queues.
Compiled by Bhavesh Shah
Description
Provides a detailed listing of each file, with owner, permission,
size, and date information
cp filename filename
Copies a file. cp takes two arguments: the original file & the name
of the new copy. You can use pathnames for the files to copy
across directories
rm filenames
mv filename filename
mkdir directory
Creates a directory.
rmdir directory
Erases a directory.
cd directory name
pwd
Linux is a very flexible operating system that has a long history of interoperability with
other systems on a number of different hardware platforms
A consequence of this friendliness to other operating systems is that Linux can read
and write to several different file systems that originated with other operating systems
much different from Linux
One reason that Linux supports so many file systems is because of the design of its
Virtual File Systems (VFS) layer
The VFS layer is a data abstraction layer between the kernel and the programs in
userspace that issues file system commands
Only one common, small API set accesses each of the file system types, to simplify
programming file system support
There are two sets of file systems
Support for these file systems are compiled into the kernel by default
Support for these file systems needs to be explicitly compiled into the Linux kernel, since kernel support for
them is not configured by default
MINIX
EXT2
ext2 was the standard file system for Linux until the introduction of
ext3.
ext2 is flexible, can handle file systems up to 4TB large, and
supports long filenames up to 1,012 characters long
In case user processes fill up a file system, ext2 normally reserves
about 5 percent of disk blocks for exclusive use by root so that
root can easily recover from that situation
Compiled by Bhavesh Shah
REISERFS
UFS
SYSTEMV
FAT
Linux currently provides read support for SystemV partitions, and write
support is experimental
The SystemV file system driver currently supports AFS/EAFS/EFS,
Coherent FS, SystemV/386 FS, Version 7 FS, and Xenix file systems
FAT is one of a few different file systems used with Windows over the
years
Almost every computer user has used FAT at one time or another
HPFS
The High Performance File System first came with OS/2 Version 1
created by Microsoft
Its the standard OS/2 file system
Since OS/2 usage has dropped off significantly, HPFS has become a
relatively uncommon file system
Compiled by Bhavesh Shah
NTFS
HFS
IBM JFS
SGI XFS
SGIs Extended File System (XFS) is SGIs newest file system for all
Silicon Graphics systems, from workstations to their supercomputer line
XFS is designed for high performance
It rapidly recovers from system crashes and can support extremely large
disk farms (it can handle files as large as a million terabytes.)
XFS can be backed up while still in use, which comes in handy since it
reduces system administration time
Compiled by Bhavesh Shah
FREEVXFS
GFS
CRAMFS
TMPFS
tmpfs is structured around the idea that whatever is put in the /tmp
file system is accessed again shortly
tmpfs exists solely in memory, so what you put in temp doesnt
persist between reboots
Compiled by Bhavesh Shah
RAMFS
ROMFS
PROC
SYSFS
/DEV/PTS
DEVFS
Software RAID
In software RAID there is no RAID controller card.
The operating system is used to set up a logical array, and the
operating system controls the RAID level used by the system.
Software RAID must be configured during system installation.
Compiled by Bhavesh Shah
RAID level 0
This RAID level requires at least two disks and uses a method called striping that
writes data across both drives.
There is no redundancy provided by this level of RAID, since the loss of either
drive makes it impossible to recover the data.
This level of RAID does give a speed increase in writing to the disks.
RAID level 1
This RAID level requires at least two disks and uses a method called mirroring.
With mirroring, the data is written to both of the drives. So, each drive is an exact
mirror of the other one, and if one fails the other still holds all the data.
RAID level 5
This RAID level, which is the most widely used, requires at least three disks and
uses striping to write the data across the two disks similarly to RAID level 1.
But unlike RAID level 1, this level of RAID uses the third disk to hold parity
information that can be used to reconstruct the data from either, but not both, of
the two disks after a single disk failure.
Questions?
Please don't keep it to yourself ?