Tuesday, June 14, 2011

---- THE LINUX FILESYSEM ----


My first post at this blog will be about the linux filesystem. Its important for you to understand, and should be the first thing you learn wen undertaking the art of administrating a Linux Server. I hope to be a good resource for you and that you will enjoy your stay at this site!


There is no drives, only partitions under Linux. To muddy the 
Waters a Little more, the partitions actual locations on the hard drive 
are not identified clearly. 

Linux hides the unnecessary details from you. The operating kernel is 
sorted in a directory called /boot/, Firefox is in /us/lib/, your 
personal data like photos and stuff is stored in /home/username/photos 
and temporary files are stored in /tamp/. There are no signs of where 
these files actually reside on different hard drives.

Linux filesystem assigns each partition a different mount point: a 
directory through which we can access the partitions. The / is the top 
of the hierarchy

--- The ext3 Filesystem

Ext3 is the default Filesystem under Fedora, Ubuntu and many others 
Distributions. Ext3 is a journaling Filesystem. Journaling Filesystem 
Facilitates quick system recovery, and ensures a high level of data 
Integrity. It constant updates with notes of file actions that are 
Pending, and those that have been completed. 

Journaling protects against corruption with speed and ease. All pending 
And completed operations are logged to the journal. The system checks 
the journal when rebooting, and completes those operations that was 
pending at the time of a system failure or dirty shutdown. This protects 
the consistency of the data that was buffered at the time of failure. 

Recovery is also decreased by the use of journaling layer. Rather than 
checking each file, bit for bit, the system merely completes any 
Pending writes noted in the journal. This reduces a recovery from 20 to 
30 minutes to seconds. 

- note
Other distributions may use different filesystems, like Suse uses 
ReiserFS.

You can find a complete list at www.linuxjournal.com

--- A Quick Tour of the filesystem

Lets look at a outline of the filesystem structure, and explore its 
various functions and elements.

/ (the root directory
This is the top level of any Linux system, known as the root 
directory, unfortunately, there is also a directory named root.
Don’t worry about this: I will explain this to you in a minute

/boot

This directory contains all the files necessary to boot the 
operation system, including the Linux kernel.

/bin and /sbin

These directories’ are similar in their consistency both contain 
executable binary files but differs in purpose. /bin contains 
executables that you are likely to use from the command line.
Command such as ls, cp mkdir and so on. /sbin contains commands 
and processes that are used by the operation system, so stay 
away from this directory when you are starting out!

/dev

These are the device files abstractions of all the devices that 
are on the system, as well ass all the devices that could be added 
to the system. These files provide the operation system with a 
description of, and instructions for handling each device.

/etc

This directory contains system-specific configuration files.

As an administrator.you are likely to spend quite some time in 
the /etc directory, because it contains configuration 
Instructions for most of the applications on the system.

/home

This directory contains the home directories for each user of 
the system.

/root

This is the home directory of the root user.

/lib

The lib directory contains all the shares libraries that will be 
accessed by various applications in the system. It also contains
libraries that will be used by the kernel

/media /mnt

These directories serve as mount point for temporary mounted 
filesystem. For example, the cd-rom drive will be mounted in
/media/cdrom

/opt

This directory offers storage for packages that have been added 
to the system

/var

Contains variable data files: Files that may change during the 
operation of an application with which they are associated, 
including log files and mailbox files.

- note

The concept of mount point might be confusing. You can think of them as 
containers in which the content of a device is emptied.

No comments:

Post a Comment