Page 177 - DCAP602_NETWORK_OPERATING_SYSTEMS_I
P. 177
Unit 10: File System
Most Linux systems use fdisk at installation time to set the partition type. As you may have notes
noticed during the exercise from previous unit, this usually happens automatically. On some
occasions, however, you may not be so lucky. In such cases, you will need to select the partition
type manually and even manually do the actual partitioning. The standard Linux partitions have
number 82 for swap and 83 for data, which can be journaled (ext3) or normal (ext2, on older
systems). The fdisk utility has built-in help, should you forget these values.
Apart from these two, Linux supports a variety of other file system types, such as the relatively
new Reiser file system, JFS, NFS, FATxx and many other file systems natively available on other
(proprietary) operating systems.
The standard root partition (indicated with a single forward slash, /) is about 100-500 MB, and
contains the system configuration files, most basic commands and server programs, system
libraries, some temporary space and the home directory of the administrative user. A standard
installation requires about 250 MB for the root partition.
Swap space (indicated with swap) is only accessible for the system itself, and is hidden from view
during normal operation. Swap is the system that ensures, like on normal UNIX systems, that
you can keep on working, whatever happens. On Linux, you will virtually never see irritating
messages like Out of memory, please close some applications first and try again, because of
this extra memory. The swap or virtual memory procedure has long been adopted by operating
systems outside the UNIX world by now.
Using memory on a hard disk is naturally slower than using the real memory chips of a computer,
but having this little extra is a great comfort.
Linux generally counts on having twice the amount of physical memory in the form of swap
space on the hard disk. When installing a system, you have to know how you are going to do
this.
Example: An example on a system with 512 MB of RAM:
1. 1st possibility: one swap partition of 1 GB
2. 2nd possibility: two swap partitions of 512 MB
3. 3rd possibility: with two hard disks: 1 partition of 512 MB on each disk.
The last option will give the best results when a lot of I/O is to be expected.
Read the software documentation for specific guidelines. Some applications, such as databases,
might require more swap space. Others, such as some handheld systems, might not have any
swap at all by lack of a hard disk. Swap space may also depend on your kernel version.
The kernel is on a separate partition as well in many distributions, because it is the most important
file of your system. If this is the case, you will find that you also have a /boot partition, holding
your kernel(s) and accompanying data files.
The rest of the hard disk(s) is generally divided in data partitions, although it may be that all of
the non-system critical data resides on one partition, for example when you perform a standard
workstation installation. When non-critical data is separated on different partitions, it usually
happens following a set pattern:
1. a partition for user programs (/usr)
2. a partition containing the users’ personal data (/home)
3. a partition to store temporary data like print- and mail-queues (/var)
4. a partition for third party and extra software (/opt)
LoveLy professionaL university 171