Username:
Password:
Linux Professional Institute: Level 2 Tutorials

Files & Filesystems / Design Hard Disk Layout

Subtitles of the Movie

Exam objective 1.102.1 has a weight of 5, and is designed to verify that candidates understand how to design a disk partitioning scheme for a Linux system. You should understand how to allocate file systems and swap space to separate partitions, or to separate disks. You need to know how to tailor the layout to work well with the intended use of the system and to ensure that the boot partition conforms to the BIOS requirement for booting. When you install Linux you will always be given the chance to partition the hard drives. The simplest installation is a single disk drive divided into two partitions. The root partition, the one with all the files, including the Linux distribution, is simply named Slash. It takes up most of the space on the disk. It's the only partition you will see and work with; no matter how you partition your system, this partition must exist. The other required partition is the Swap Partition. Other than creating it, you'll never deal with it. It's used by Linux to manage virtual memory. Linux uses this space to effectively expand RAM when it needs the space. A rule of thumb is that the Swap Partition should be the same size as the size of RAM, but it varies. If the users of the system have a large number of programs running, you will need a large amount of swap space. If the computer is to be a server, having a large swap space will be necessary to handle heavy loads. Without enough swap space the server can crash. If you have a system with more than one disk drive, split up the swap space among the drives. Linux can work with as many as 64 swap partitions. If you have some disks that are faster than others; faster disks have more heads, a good use of the speed is swap space. Any directory can be allocated as its own partition, and every disk drive has its own partitions. If you have lots of data, such as a database, you will want to put that on a faster drive. The file systems are all mounted to directories accessed through the root directory. Where you put what depends on how the system is going to be used. In general, you want to put the user and home directories on separate disks. You should be aware that the VAR directory contains lots of data files. Among other things, it contains the log files, which almost every process writes to. A separate disk will speed this up. To figure out the best organization, figure out what your tasks are, and what they need. For example, if you're configuring a print server, figure out where the spool files will go. Or, if you're configuring a mail server, find out where the mail is stored. Put heavy use on the faster drives and give them plenty of space. The Mount command will show you the active mounted file systems. Here you see the first hard drive, HDA, and the first partition on it: HDA1. This is the root directory. And it is a standard EXT3 file system. Here is the first partition on the second hard drive, HDB. This partition is mounted as the User Local Directory, and is also an EXT3 file system. The others are all special cases, and I'll cover that in future lessons. The swap partitions don't have a file system and are not mounted, so they don't show up in this list. The Swap On command, with the S option shows you the swap partition. This system only has one, and it's on the first hard disk drive, partition number 5. When the partition is powered up, it looks for something bootable. Where it looks is determined by a BIOS setting. It usually searches in this order, but you can change the order in the BIOS. It varies how you get to the BIOS editor, but generally you press DEL, or F1, or F2 or F10, while the system is booting. Here are some exercises you can use to see how this thing works. Use the Mount command to examine your mounted file systems. Just enter the Mount command with no arguments. Enter the DF command to see how much disk is used, and how much free space you have. The acronym DF is short for Disk Free. This command shows you the status of the virtual memory at one-second intervals. Run this command in a terminal window while you execute programs from a second terminal window to see how the virtual memory is used. The SO and SI columns show the amount of memory swapped out, and swapped in.

Tutorial Information

Course: Linux Professional Institute: Level 2
Author: Arthur Griffith
SKU: 33894
ISBN: 1-934743-79-8
Release Date: 2008-07-21
Duration: 7.5 hrs / 113 lessons
Captions: Available on CD and Online University
Compatibility: Vista/XP/2000, OS X, Linux
QuickTime 7, Flash 8

VTC Sign up & Benefits

  • Unlimited Access
  • 81,350 Video Tutorials (20,800 free)
  • Video Available as Flash or QuickTime
  • Over 782 Courses
  • $30 for One Month Access
  • Multi-User Discounts Available