Username:
Password:
Linux Professional Institute: Level 2 Tutorials

Files & Filesystems / Maintain the Integrity of Filesystems

Subtitles of the Movie

Exam objective 1.104.2 has a weight of 3, and verifies that candidates are able to maintain a standard file system as well as the extra data associated with a journaling file system. You not only need to be able to monitor the integrity of the file systems, you need to know how to monitor the free space and the Inodes, and to repair simple file system problems. You have some tools available to you for inspecting disk drives. The first thing you want to know is how much space you have on all your drives, and nothing could be easier. The disk free command, df, looks at all the mounted disk drives and gives you size and space information for all of them. This example shows you the size and usage of two drives, and you can use the disk usage command, du, to look into any directory to find out how much space is being used. The var directory is one of your first suspects. Lots of applications use it for storage and some of them have been known to leave things laying around. In particular, you will want to look at the spool files and the log files. The Dumpe2fs command can be used to look at the super block and other information on the hard drive. You can use options to control the amount of information listed, but you can find out a lot, and you can do it while the file system is mounted. A different kind of look requires that the file system be unmounted. You can run debugfs and not only look at the contents in detail, but you can change things. It's an interactive program with lots of commands. Entering Help gives you a list of these commands, and there are lots of them. Some of the commands can be used to modify the disk, but unless you specify the right option, when you start the program it runs as read-only, as I'm doing here. You can find out everything about a the file system. For example, this information is from inside the Inode of the Firefox directory, and this is where that Inode is located. Another disk utility is tune2fs. It can be used to look at the settings of a file system, and it has command line options that can adjust these tunable values. There is the main program for file system checking. This is the workhorse file checker. This one has been around Unix systems for years. It checks a file system on an unmounted disk for any inconsistencies, and it has the ability to fix things that it finds wrong. This is the program that runs when Linux boots to check on the integrity of all files. This program is actually a front-end for a specific file checker. For example, for an ext file system, the file checker that actually does the work is a program written specific for that system. There are fsck programs for many different file systems. You can run the one that fits with the system you are checking, or you can run fsck and let it choose. There is a program that you can use to create an ext2 or ext3 file system to your exact specifications. Mke2fs will create a file system using the default configuration, but it has command line options galore, and you can specify exactly what you want. You can specify the number of Inodes, whether and how you want journaling, the block size, the number of blocks per group and so on. Look up all these commands in the MAN pages and review their options. Use these tools to find out about your disk drives. Save or print the information. If you know what the drives are supposed to look like when they're working, you'll have a better chance of finding the error when something goes wrong.

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
  • 70,000 Video Tutorials (14,250 free)
  • Video Available as Flash or QuickTime
  • Over 650 Courses
  • $30 for One Month Access
  • Multi-User Discounts Available