Red Hat ENTERPRISE LINUX 4 - INTRODUCTION TO SYSTEM ADMINISTRATION Administration Manual

Introduction to system administration
Hide thumbs Also See for ENTERPRISE LINUX 4 - INTRODUCTION TO SYSTEM ADMINISTRATION:
Table of Contents

Advertisement

Red Hat Enterprise Linux 4
Introduction to System
Administration

Advertisement

Table of Contents
loading

Summary of Contents for Red Hat ENTERPRISE LINUX 4 - INTRODUCTION TO SYSTEM ADMINISTRATION

  • Page 1 Red Hat Enterprise Linux 4 Introduction to System Administration...
  • Page 2 All other trademarks referenced herein are the property of their respective owners. The GPG fingerprint of the security@redhat.com key is: CA 20 86 86 2B D6 9D FC 65 F6 EC C4 21 91 80 CD DB 42 A6 0E...
  • Page 3: Table Of Contents

    Table of Contents Introduction............................i 1. Architecture-specific Information ..................i 2. Document Conventions ......................i 3. Activate Your Subscription ....................iv 3.1. Provide a Red Hat Login..................iv 3.2. Provide Your Subscription Number ............... v 3.3. Connect Your System..................... v 4.
  • Page 4 3. Bandwidth and Processing Power ....................31 3.1. Bandwidth ........................31 3.1.1. Buses ......................... 31 3.1.2. Datapaths......................32 3.1.3. Potential Bandwidth-Related Problems ............32 3.1.4. Potential Bandwidth-Related Solutions ............33 3.1.5. In Summary..................... 33 3.2. Processing Power ......................34 3.2.1.
  • Page 5 5.5. Making the Storage Usable ....................69 5.5.1. Partitions/Slices ....................70 5.5.2. File Systems ...................... 71 5.5.3. Directory Structure.................... 73 5.5.4. Enabling Storage Access................... 74 5.6. Advanced Storage Technologies ..................74 5.6.1. Network-Accessible Storage................74 5.6.2. RAID-Based Storage ..................75 5.6.3.
  • Page 6 7. Printers and Printing ........................135 7.1. Types of Printers ......................135 7.1.1. Printing Considerations................... 135 7.2. Impact Printers ....................... 136 7.2.1. Dot-Matrix Printers ..................136 7.2.2. Daisy-Wheel Printers ..................137 7.2.3. Line Printers....................137 7.2.4. Impact Printer Consumables ................137 7.3.
  • Page 7: Introduction

    Enterprise Linux Reference Guide. HTML, PDF, and RPM versions of the manuals are available on the Red Hat Enterprise Linux Docu- mentation CD and online at http://www.redhat.com/docs/. Note Although this manual reflects the most current information possible, read the Red Hat Enterprise Linux Release Notes for information that may not have been available prior to our documenta- tion being finalized.
  • Page 8: Document Conventions

    Introduction 2. Document Conventions When you read this manual, certain words are represented in different fonts, typefaces, sizes, and weights. This highlighting is systematic; different words are represented in the same style to indicate their inclusion in a specific category. The types of words that are represented this way include the following: command Linux commands (and other operating system commands, when used) are represented this way.
  • Page 9 Introduction Under File on a GNOME terminal, the New Tab option allows you to open multiple shell prompts in the same window. If you need to type in a sequence of commands from a GUI menu, they are shown like the following example: Go to Main Menu Button (on the Panel) =>...
  • Page 10: Activate Your Subscription

    If you can not complete registration during the Setup Agent (which requires network access), you can alternatively complete the Red Hat registration process online at http://www.redhat.com/register/. 3.1. Provide a Red Hat Login...
  • Page 11: Provide Your Subscription Number

    If you spot a typo in the Red Hat Enterprise Linux Introduction to System Administration, or if you have thought of a way to make this manual better, we would love to hear from you. Please submit a report in Bugzilla (http://bugzilla.redhat.com/bugzilla) against the component rhel-isa Be sure to mention the manual’s identifier:...
  • Page 12 Introduction If you have a suggestion for improving the documentation, try to be as specific as possible. If you have found an error, please include the section number and some of the surrounding text so we can find it easily.
  • Page 13: The Philosophy Of System Administration

    Chapter 1. The Philosophy of System Administration Although the specifics of being a system administrator may change from platform to platform, there are underlying themes that do not. These themes make up the philosophy of system administration. The themes are: Automate everything •...
  • Page 14: Document Everything

    Chapter 1. The Philosophy of System Administration 1.2. Document Everything If given the choice between installing a brand-new server and writing a procedural document on performing system backups, the average system administrator would install the new server every time. While this is not at all unusual, you must document what you do. Many system administrators put off doing the necessary documentation for a variety of reasons: "I will get around to it later."...
  • Page 15: Communicate As Much As Possible

    Chapter 1. The Philosophy of System Administration All of these changes should be documented in some fashion. Otherwise, you could find yourself being completely confused about a change you made several months earlier. Some organizations use more complex methods for keeping track of changes, but in many cases a simple revision history at the start of the file being changed is all that is necessary.
  • Page 16: Tell Your Users What You Are Doing

    Chapter 1. The Philosophy of System Administration module to a faster model, and reboot. Once this is done, you will move the database itself to faster, RAID-based storage. Here is one possible announcement for this situation: System Downtime Scheduled for Friday Night Starting this Friday at 6pm (midnight for our associates in Berlin), all financial applications will be unavail- able for a period of approximately four hours.
  • Page 17: Know Your Resources

    Chapter 1. The Philosophy of System Administration 1.3.3. Tell Your Users What You Have Done After you have finished making the changes, you must tell your users what you have done. Again, this should be a summary of the previous messages (invariably someone will not have read them.) However, there is one important addition you must make.
  • Page 18: Know Your Users

    Chapter 1. The Philosophy of System Administration Time (often of critical importance when the time involves things such as the amount of time during • which system backups may take place) Knowledge (whether it is stored in books, system documentation, or the brain of a person that has •...
  • Page 19: The Risks Of Social Engineering

    Chapter 1. The Philosophy of System Administration The type and frequency of authorized access to the systems • While you are thinking about security, do not make the mistake of assuming that possible intruders will only attack your systems from outside of your company. Many times the perpetrator is someone within the company.
  • Page 20: Plan Ahead

    Chapter 1. The Philosophy of System Administration 1.8. Plan Ahead System administrators that took all this advice to heart and did their best to follow it would be fan- tastic system administrators — for a day. Eventually, the environment will change, and one day our fantastic administrator would be caught flat-footed.
  • Page 21: Automation

    Chapter 1. The Philosophy of System Administration 1.10.1. Automation Automation of frequently-performed tasks under Red Hat Enterprise Linux requires knowledge of several different types of technologies. First are the commands that control the timing of command or script execution. The commands are most commonly used in these roles.
  • Page 22: Security

    Chapter 1. The Philosophy of System Administration The subject of the best text editor has sparked debate for nearly as long as computers have existed and will continue to do so. Therefore, the best approach is to try each editor for yourself, and use what works best for you.
  • Page 23: Installed Documentation

    Chapter 1. The Philosophy of System Administration 1.11.1. Installed Documentation The following resources are installed in the course of a typical Red Hat Enterprise Linux installation and can help you learn more about the subject matter discussed in this chapter. man pages —...
  • Page 24: Related Books

    Chapter 1. The Philosophy of System Administration 1.11.3. Related Books Most books on system administration do little to cover the philosophy behind the job. However, the following books do have sections that give a bit more depth to the issues that were discussed here: The Red Hat Enterprise Linux Reference Guide;...
  • Page 25: Resource Monitoring

    Chapter 2. Resource Monitoring As stated earlier, a great deal of system administration revolves around resources and their efficient use. By balancing various resources against the people and programs that use those resources, you waste less money and make your users as happy as possible. However, this leaves two questions: What are resources? And: How is it possible to know what resources are being used (and to what extent)?
  • Page 26: Monitoring System Capacity

    Chapter 2. Resource Monitoring 2.2. System Performance Monitoring As stated above, system performance monitoring is normally done in response to a performance prob- lem. Either the system is running too slowly, or programs (and sometimes even the entire system) fail to run at all.
  • Page 27: Monitoring Cpu Power

    Chapter 2. Resource Monitoring Unfortunately, it is not that simple. For example, consider a disk drive. What things might you want to know about its performance? How much free space is available? • How many I/O operations on average does it perform each second? •...
  • Page 28: Monitoring Bandwidth

    Chapter 2. Resource Monitoring However, eventually the process state changes, and the process becomes runnable. As the name implies, a runnable process is one that is capable of getting work done as soon as it is scheduled to receive CPU time. However, if more than one process is runnable at any given time, all but of the runnable processes must wait for their turn at the CPU.
  • Page 29: Monitoring Memory

    Chapter 2. Resource Monitoring 2.4.3. Monitoring Memory If there is one area where a wealth of performance statistics can be found, it is in the area of moni- toring memory utilization. Due to the inherent complexity of today’s demand-paged virtual memory operating systems, memory utilization statistics are many and varied.
  • Page 30: Red Hat Enterprise Linux-Specific Information

    Chapter 2. Resource Monitoring Free Space Free space is probably the one resource all system administrators watch closely; it would be a rare administrator that never checks on free space (or has some automated way of doing so). File System-Related Statistics These statistics (such as number of files/directories, average file size, etc.) provide additional detail over a single free space percentage.
  • Page 31 Chapter 2. Resource Monitoring A better solution than using would be to run using the command. For example, free -s free watch to display memory utilization every two seconds (the default display interval for ), use this watch command: watch free command issues the command every two seconds, updating by clearing the screen watch...
  • Page 32: Vmstat

    Chapter 2. Resource Monitoring Warning Although appears like a simple display-only program, this is not the case. That is because uses single character commands to perform various operations. For example, if you are logged in as root, it is possible to change the priority and even kill any process on your system. Therefore, until you have reviewed ’s help screen (type [?] to display it), it is safest to only type [q] (which exits 2.5.2.1.
  • Page 33 Chapter 2. Resource Monitoring procs memory swap system swpd free buff cache cs us sy id wa 5276 315000 130744 380184 1 47 The first line divides the fields in six categories, including process, memory, swap, I/O, system, and CPU related statistics. The second line further identifies the contents of each field, making it easy to quickly scan data for specific statistics.
  • Page 34: The Sysstat Suite Of Resource Monitoring Tools

    Chapter 2. Resource Monitoring 2.5.4. The Sysstat Suite of Resource Monitoring Tools While the previous tools may be helpful for gaining more insight into system performance over very short time frames, they are of little use beyond providing a snapshot of system resource utilization. In addition, there are aspects of system performance that cannot be easily monitored using such simplistic tools.
  • Page 35 Chapter 2. Resource Monitoring The device specification, displayed as , where dev < major-number > -sequence-number • is the device’s major number , and is a sequence < major-number > < sequence-number > number starting at zero. The number of transfers (or I/O operations) per second. •...
  • Page 36 Chapter 2. Resource Monitoring 2.5.4.4. The command command produces system utilization reports based on the data collected by . As config- sadc ured in Red Hat Enterprise Linux, is automatically run to process the files automatically collected . The report files are written to and are named , where sar <...
  • Page 37: Oprofile

    Chapter 2. Resource Monitoring 2.5.5. OProfile The OProfile system-wide profiler is a low-overhead monitoring tool. OProfile makes use of the pro- cessor’s performance monitoring hardware to determine the nature of performance-related problems. Performance monitoring hardware is part of the processor itself. It takes the form of a special counter, incremented each time a certain event (such as the processor not being idle or the requested data not being in cache) occurs.
  • Page 38 Chapter 2. Resource Monitoring op_to_source Displays annotated source code and/or assembly listings op_visualise Graphically displays collected data These programs make it possible to display the collected data in a variety of ways. The administrative interface software controls all aspects of data collection, from specifying which events are to be monitored to starting and stopping the collection itself.
  • Page 39 Chapter 2. Resource Monitoring CTR_COUNT[1]= CTR_KERNEL[1]=1 CTR_USER[1]=1 CTR_UM[1]=0 CTR_EVENT_VAL[1]= one_enabled=1 SEPARATE_LIB_SAMPLES=0 SEPARATE_KERNEL_SAMPLES=0 VMLINUX=/boot/vmlinux-2.4.21-1.1931.2.349.2.2.entsmp Next, use to actually start data collection with the command: opcontrol opcontrol --start Using log file /var/lib/oprofile/oprofiled.log Daemon started. Profiler running. Verify that the daemon is running with the command oprofiled ps x | grep -i oprofiled 32019 ?
  • Page 40: Additional Resources

    Chapter 2. Resource Monitoring Where: represents the number of samples collected < sample-count > • represents the percentage of all samples collected for this specific executable < sample-percent > • is a field that is not used < unused-field > •...
  • Page 41: Useful Websites

    Chapter 2. Resource Monitoring 2.6.2. Useful Websites http://people.redhat.com/alikins/system_tuning.html — System Tuning Info for Linux Servers. A • stream-of-consciousness approach to performance tuning and resource monitoring for servers. http://www.linuxjournal.com/article.php?sid=2396 — Performance Monitoring Tools for Linux. • This Linux Journal page is geared more toward the administrator interested in writing a customized performance graphing solution.
  • Page 42 Chapter 2. Resource Monitoring...
  • Page 43: Bandwidth And Processing Power

    Chapter 3. Bandwidth and Processing Power Of the two resources discussed in this chapter, one (bandwidth) is often hard for the new system administrator to understand, while the other (processing power) is usually a much easier concept to grasp. Additionally, it may seem that these two resources are not that closely related — why group them together? The reason for addressing both resources together is that these resources are based on the hardware that tie directly into a computer’s ability to move and process data.
  • Page 44: Datapaths

    Chapter 3. Bandwidth and Processing Power 3.1.1.1. Examples of Buses No matter where in a computer system you look, there are buses. Here are a few of the more common ones: Mass storage buses (ATA and SCSI) • Networks (Ethernet and Token Ring) •...
  • Page 45: Potential Bandwidth-Related Solutions

    Chapter 3. Bandwidth and Processing Power 3.1.4. Potential Bandwidth-Related Solutions Fortunately, bandwidth-related problems can be addressed. In fact, there are several approaches you can take: Spread the load • Reduce the load • Increase the capacity • The following sections explore each approach in more detail. 3.1.4.1.
  • Page 46: Processing Power

    Chapter 3. Bandwidth and Processing Power For example, consider a SCSI adapter that is connected to a PCI bus. If there are performance problems with SCSI disk I/O, it might be the result of a poorly-performing SCSI adapter, even though the SCSI and PCI buses themselves are nowhere near their bandwidth capabilities.
  • Page 47: Improving A Cpu Shortage

    Chapter 3. Bandwidth and Processing Power A single-CPU system can only do one thing at any given time. Therefore, if your application is run- ning, everything else on the system is not. And the opposite is, of course, true — if something other than your application is running, then your application is doing nothing.
  • Page 48 Chapter 3. Bandwidth and Processing Power Eliminating applications entirely • 3.2.3.1.1. Reducing Operating System Overhead To reduce operating system overhead, you must examine your current system load and determine what aspects of it result in inordinate amounts of overhead. These areas could include: Reducing the need for frequent process scheduling •...
  • Page 49 Chapter 3. Bandwidth and Processing Power 3.2.3.2.1. Upgrading the CPU The most straightforward approach is to determine if your system’s CPU can be upgraded. The first step is to determine if the current CPU can be removed. Some systems (primarily laptops) have CPUs that are soldered in place, making an upgrade impossible.
  • Page 50: Red Hat Enterprise Linux-Specific Information

    Chapter 3. Bandwidth and Processing Power 3.3. Red Hat Enterprise Linux-Specific Information Monitoring bandwidth and CPU utilization under Red Hat Enterprise Linux entails using the tools discussed in Chapter 2 Resource Monitoring; therefore, if you have not yet read that chapter, you should do so before continuing.
  • Page 51 Chapter 3. Bandwidth and Processing Power points with device names, it is possible to use this report to determine if, for example, the partition containing is experiencing an excessive workload. /home/ Actually, each line output from is longer and contains more information than this; here is iostat -x the remainder of each line (with the device column added for easier reading): Device:...
  • Page 52: Monitoring Cpu Utilization On Red Hat Enterprise Linux

    Chapter 3. Bandwidth and Processing Power 3.3.2. Monitoring CPU Utilization on Red Hat Enterprise Linux Unlike bandwidth, monitoring CPU utilization is much more straightforward. From a single percent- age of CPU utilization in GNOME System Monitor, to the more in-depth statistics reported by it is possible to accurately determine how much CPU power is being consumed and by what.
  • Page 53 Chapter 3. Bandwidth and Processing Power To gain more detailed knowledge regarding CPU utilization, we must change tools. If we examine output from , we obtain a slightly different understanding of our example system: vmstat procs memory swap system swpd free buff cache...
  • Page 54 Chapter 3. Bandwidth and Processing Power The statistics contained in this report are no different from those produced by many of the other tools. The biggest benefit here is that makes the data available on an ongoing basis and is therefore more useful for obtaining long-term averages, or for the production of CPU utilization graphs.
  • Page 55: Additional Resources

    Chapter 3. Bandwidth and Processing Power This report (which has been truncated horizontally to fit on the page) includes one column for each interrupt level (for example, the field illustrating the rate for interrupt level 2). If this were a i002/s multiprocessor system, there would be one line per sample period for each CPU.
  • Page 56: Useful Websites

    Chapter 3. Bandwidth and Processing Power 3.4.2. Useful Websites http://people.redhat.com/alikins/system_tuning.html — System Tuning Info for Linux Servers. A • stream-of-consciousness approach to performance tuning and resource monitoring for servers. http://www.linuxjournal.com/article.php?sid=2396 — Performance Monitoring Tools for Linux. • This Linux Journal page is geared more toward the administrator interested in writing a customized performance graphing solution.
  • Page 57: Physical And Virtual Memory

    Chapter 4. Physical and Virtual Memory All present-day, general-purpose computers are of the type known as stored program computers. As the name implies, stored program computers load instructions (the building blocks of programs) into some type of internal storage, where they subsequently execute those instructions. Stored program computers also use the same storage for data.
  • Page 58: Cpu Registers

    Chapter 4. Physical and Virtual Memory Very limited expansion capabilities (a change in CPU architecture would be required) • Expensive (more than one dollar/byte) • However, at the other end of the spectrum, off-line backup storage is: Very slow (access times may be measured in days, if the backup media must be shipped long •...
  • Page 59: Main Memory - Ram

    Chapter 4. Physical and Virtual Memory When writing data from the CPU, things get a bit more complicated. There are two different ap- proaches that can be used. In both cases, the data is first written to cache. However, since the purpose of cache is to function as a very fast copy of the contents of selected portions of RAM, any time a piece of data changes its value, that new value must be written to both cache memory and RAM.
  • Page 60: Hard Drives

    Chapter 4. Physical and Virtual Memory 2. The address at which the data is to be stored is presented to the address connections. 3. The read/write connection is set to write mode. Retrieving data is just as straightforward: 1. The address of the desired data is presented to the address connections. 2.
  • Page 61: Off-Line Backup Storage

    Chapter 4. Physical and Virtual Memory Note Although there is much more to learn about hard drives, disk storage technologies are discussed in more depth in Chapter 5 Managing Storage. For the time being, it is only necessary to keep in mind the huge speed difference between RAM and disk-based technologies and that their storage capacity usually exceeds that of RAM by a factor of at least 10, and often by 100 or more.
  • Page 62: Backing Store - The Central Tenet Of Virtual Memory

    Chapter 4. Physical and Virtual Memory A later approach known as overlaying attempted to alleviate the problem by allowing programmers to dictate which parts of their application needed to be memory-resident at any given time. In this way, code only required once for initialization purposes could be written over (overlayed) with code that would be used later.
  • Page 63: Page Faults

    Chapter 4. Physical and Virtual Memory 4.4. Virtual Memory: The Details First, we must introduce a new concept: virtual address space. Virtual address space is the maximum amount of address space available to an application. The virtual address space varies according to the system’s architecture and operating system.
  • Page 64: The Working Set

    Chapter 4. Physical and Virtual Memory While the first three actions are relatively straightforward, the last one is not. For that, we need to cover some additional topics. 4.4.2. The Working Set The group of physical memory pages currently dedicated to a specific process is known as the working set for that process.
  • Page 65: Worst Case Performance Scenario

    Chapter 4. Physical and Virtual Memory However, this is no reason to throw up one’s hands and give up. The benefits of virtual memory are too great to do that. And, with a bit of effort, good performance is possible. The thing that must be done is to examine those system resources impacted by heavy use of the virtual memory subsystem.
  • Page 66 Chapter 4. Physical and Virtual Memory Using , it is possible to get a concise (if somewhat simplistic) overview of memory and swap free utilization. Here is an example: total used free shared buffers cached Mem: 1288720 361448 927272 27844 187632 -/+ buffers/cache: 145972...
  • Page 67 Chapter 4. Physical and Virtual Memory fields show the typical free and used memory statistics, with the kbmemfree kbmemused percentage of memory used displayed in the field. The fields %memused kbbuffers kbcached show how many kilobytes of memory are allocated to buffers and the system-wide data cache. field is always zero for systems (such as Red Hat Enterprise Linux) using the 2.4 kbmemshrd Linux kernel.
  • Page 68: Additional Resources

    — Learn how to produce daily system resource utilization report files. • sa2(8) 4.7.2. Useful Websites http://people.redhat.com/alikins/system_tuning.html — System Tuning Info for Linux Servers. A • stream-of-consciousness approach to performance tuning and resource monitoring for servers. http://www.linuxjournal.com/article.php?sid=2396 — Performance Monitoring Tools for Linux.
  • Page 69: Related Books

    Chapter 4. Physical and Virtual Memory performance graphing solution. Written several years ago, some of the details may no longer apply, but the overall concept and execution are sound. 4.7.3. Related Books The following books discuss various issues related to resource monitoring, and are good resources for Red Hat Enterprise Linux system administrators: The Red Hat Enterprise Linux System Administration Guide;...
  • Page 70 Chapter 4. Physical and Virtual Memory...
  • Page 71: Managing Storage

    Chapter 5. Managing Storage If there is one thing that takes up the majority of a system administrator’s day, it would have to be storage management. It seems that disks are always running out of free space, becoming overloaded with too much I/O activity, or failing unexpectedly. Therefore, it is vital to have a solid working knowledge of disk storage in order to be a successful system administrator.
  • Page 72: Access Arms

    Chapter 5. Managing Storage 5.1.2. Data reading/writing device The data reading/writing device is the component that takes the bits and bytes on which a computer system operates and turns them into the magnetic or optical variations necessary to interact with the materials coating the surface of the disk platters.
  • Page 73: Storage Addressing Concepts

    Chapter 5. Managing Storage 5.2. Storage Addressing Concepts The configuration of disk platters, heads, and access arms makes it possible to position the head over any part of any surface of any platter in the mass storage device. However, this is not sufficient; to use this storage capacity, we must have some method of giving addresses to uniform-sized parts of the available storage.
  • Page 74: Block-Based Addressing

    Chapter 5. Managing Storage this address — the head and sector — remain undefined. 5.2.1.2. Head Although in the strictest sense we are selecting a particular disk platter, because each surface has a read/write head dedicated to it, it is easier to think in terms of interacting with a specific head. In fact, the device’s underlying electronics actually select one head and —...
  • Page 75: Mass Storage Device Interfaces

    Chapter 5. Managing Storage to the mass storage device, which then internally performs the conversion to the geometry-based address required by the device’s control circuitry. Because the conversion to a geometry-based address is always done by the device itself, it is always consistent, eliminating the problem inherent with giving the device geometry-based addressing.
  • Page 76: Present-Day Industry-Standard Interfaces

    Chapter 5. Managing Storage ST506/412 A hard drive interface dating from the early 80s. Used in many personal computers of the day, this interface used two cables — one 34-conductor and one 20-conductor. ESDI Standing for Enhanced Small Device Interface, this interface was considered a successor to ST506/412 with faster transfer rates and larger supported drive sizes.
  • Page 77 Chapter 5. Managing Storage Note A more recent innovation is the introduction of cable select capabilities to ATA. This innovation re- quires the use of a special cable, an ATA controller, and mass storage devices that support cable select (normally through a "cable select" jumper setting). When properly configured, cable select eliminates the need to change jumpers when moving devices;...
  • Page 78: Hard Drive Performance Characteristics

    Chapter 5. Managing Storage differential signaling, where two conductors are used to pass a signal. Differential SCSI (which was later renamed to high voltage differential or HVD SCSI) had the benefit of reduced sensitivity to electrical noise and allowed longer cable lengths, but it never became popular in the mainstream computer market.
  • Page 79: Mechanical/Electrical Limitations

    Chapter 5. Managing Storage stand, because without at least basic knowledge of how hard drives operate, it is possible to unwittingly making changes to your system configuration that could negatively impact its performance. The time it takes for a hard drive to respond to and complete an I/O request is dependent on two things: The hard drive’s mechanical and electrical limitations •...
  • Page 80: I/O Loads And Performance

    Chapter 5. Managing Storage 5.4.1.3. Rotational Latency Because a hard drive’s disk platters are continuously spinning, when the I/O request arrives it is highly unlikely that the platter will be at exactly the right point in its rotation necessary to access the desired sector.
  • Page 81: Making The Storage Usable

    Chapter 5. Managing Storage The impact of this is that devices that take longer to process write I/O operations (for example) are able to handle fewer write I/Os than read I/Os. Looked at another way, a write I/O consumes more of the device’s ability to process I/O requests than does a read I/O.
  • Page 82: Partitions/Slices

    Chapter 5. Managing Storage What is needed are methods of making the raw storage a hard drive provides more easily usable. The following sections explore some commonly-used techniques for doing just that. 5.5.1. Partitions/Slices The first thing that often strikes a system administrator is that the size of a hard drive may be much larger than necessary for the task at hand.
  • Page 83: File Systems

    Chapter 5. Managing Storage 5.5.1.1.2.2. Extended Partitions Extended partitions were developed in response to the need for more than four partitions per disk drive. An extended partition can itself contain multiple partitions, greatly extending the number of partitions possible on a single drive. The introduction of extended partitions was driven by the ever-increasing capacities of new disk drives.
  • Page 84 Chapter 5. Managing Storage 5.5.2.1. File-Based Storage While file systems that use the file metaphor for data storage are so nearly universal as to be considered a given, there are still some aspects that should be considered here. First is to be aware of any restrictions on file names. For instance, what characters are permitted in a file name? What is the maximum file name length? These questions are important, as it dictates those file names that can be used and those that cannot.
  • Page 85: Directory Structure

    Chapter 5. Managing Storage Various file systems may extend the list to include other actions such as deleting, or even the ability to make changes related to a file’s access control. 5.5.2.5. Accounting of Space Utilized One constant in a system administrator’s life is that there is never enough free space, and even if there is, it will not remain free for long.
  • Page 86: Enabling Storage Access

    Chapter 5. Managing Storage Restore the backup onto the new storage • Rename directory original storage something like • engineering (before deleting it entirely after running smoothly with the new engineering-archive configuration for a month) Make the necessary changes so that all engineering personnel can access their files on the new •...
  • Page 87: Raid-Based Storage

    Chapter 5. Managing Storage There are a number of different networked storage technologies available; choosing one can be diffi- cult. Nearly every operating system on the market today includes some means of accessing network- accessible storage, but the different technologies are incompatible with each other. What is the best approach to determining which technology to deploy? The approach that usually provides the best results is to let the built-in capabilities of the client decide the issue.
  • Page 88 Chapter 5. Managing Storage 5.6.2.1. Basic Concepts RAID is an acronym standing for Redundant Array of Independent Disks . As the name implies, RAID is a way for multiple disk drives to act as if they were a single disk drive. RAID techniques were first developed by researchers at the University of California, Berkeley in the mid-1980s.
  • Page 89 Chapter 5. Managing Storage Better read/write performance — The I/O load on a RAID 0 array is spread evenly among all the • drives in the array (Assuming all the I/O is not concentrated on a single chunk) No wasted space — All available storage on all drives in the array are available for data storage •...
  • Page 90 Chapter 5. Managing Storage 5.6.2.1.1.3. RAID 5 RAID 5 attempts to combine the benefits of RAID 0 and RAID 1, while minimizing their respective disadvantages. Like RAID 0, a RAID 5 array consists of multiple disk drives, each divided into chunks. This allows a RAID 5 array to be larger than any single drive.
  • Page 91 Chapter 5. Managing Storage 5.6.2.1.1.4. Nested RAID Levels As should be obvious from the discussion of the various RAID levels, each level has specific strengths and weaknesses. It was not long after RAID-based storage began to be deployed that people began to wonder whether different RAID levels could somehow be combined, producing arrays with all of the strengths and none of the weaknesses of the original levels.
  • Page 92: Logical Volume Management

    Chapter 5. Managing Storage Specialized utility programs that run as applications under the host operating system, presenting a • software interface to the controller card An on-board interface using a serial port that is accessed using a terminal emulator • A BIOS-like interface that is only accessible during the system’s power-up testing •...
  • Page 93: Storage Management Day-To-Day

    Chapter 5. Managing Storage This makes it possible for a system administrator to treat all storage as being part of a single pool, available for use in any amount. In addition, drives can be added to the pool at a later time, making it a straightforward process to stay ahead of your users’...
  • Page 94: Monitoring Free Space

    Chapter 5. Managing Storage Backup-related issues • Performance-related issues • Adding/removing storage • The following sections discuss each of these issues in more detail. 5.7.1. Monitoring Free Space Making sure there is sufficient free space available should be at the top of every system administrator’s daily task list.
  • Page 95 Chapter 5. Managing Storage Provide temporary space • Make archival backups • Give up • You might find that the user can reduce their usage if they have some amount of temporary space that they can use without restriction. People that often take advantage of this situation find that it allows them to work without worrying about space until they get to a logical stopping point, at which time they can perform some housekeeping, and determine what files in temporary storage are really needed or not.
  • Page 96: Disk Quota Issues

    Chapter 5. Managing Storage An increase in the number of users using the application • The application fails to clean up after itself, leaving no-longer-needed temporary files on disk • The application is broken, and the bug is causing it to use more storage than it should •...
  • Page 97: File-Related Issues

    Chapter 5. Managing Storage disk would actually have to be 150GB to allow everyone to reach their temporary quota at the same time. However, in practice not everyone exceeds their permanent quota at the same time, making some amount of overcommitment a reasonable approach. Of course, the selection of permanent and tempo- rary quotas is up to the system administrator, as each site and user community is different.
  • Page 98: Adding/Removing Storage

    Chapter 5. Managing Storage Files shared out of a user’s directory are vulnerable to disappearing unexpectedly when the user • either leaves the organization or does nothing more unusual than rearranging their files. Maintaining shared access for more than one or two additional users becomes difficult, leading to •...
  • Page 99 Chapter 5. Managing Storage No matter what storage hardware you use, you should always consider the load a new disk drive adds to your computer’s I/O subsystem. In general, you should try to spread the disk I/O load over all available channels/buses. From a performance standpoint, this is far better than putting all disk drives on one channel and leaving another one empty and idle.
  • Page 100 Chapter 5. Managing Storage 6. Reinstalling the temporarily-removed third disk drive Temporarily install the original disk drive and the new disk drive in another computer, copy the data • to the new disk drive, and then install the new disk drive in the original computer As you can see, sometimes a bit of effort must be expended to get the data (and the new hardware) where it needs to go.
  • Page 101 Chapter 5. Managing Storage Use your network to copy the data to another system with sufficient free space, and restore after • installing the new disk drive Use the space physically occupied by a third disk drive by: • 1. Temporarily removing the third disk drive 2.
  • Page 102 Chapter 5. Managing Storage 5.7.4.1.3. Formatting the Partition(s) At this point, the new disk drive has one or more partitions that have been created. However, before the space contained within those partitions can be used, the partitions must first be formatted. By formatting, you are selecting a specific file system to be used within each partition.
  • Page 103 Chapter 5. Managing Storage 2. Modify the backup schedule so that the disk drive is no longer backed up 3. Update the system configuration 4. Erase the contents of the disk drive 5. Remove the disk drive As you can see, compared to the installation process, there are a few extra steps to take. These steps are discussed in the following sections.
  • Page 104: A Word About Backups

    Chapter 5. Managing Storage 5.8. A Word About Backups. . . One of the most important factors when considering disk storage is that of backups. We have not covered this subject here, because an in-depth section (Section 8.2 Backups) has been dedicated to backups.
  • Page 105 Chapter 5. Managing Storage 5.9.1.1.2. Unit Following the two-letter device type are one or two letters denoting the specific unit. The unit desig- nator starts with "a" for the first unit, "b" for the second, and so on. Therefore, the first hard drive on your system may appear as SCSI’s ability to address large numbers of devices necessitated the addition of a second unit charac- ter to support systems with more than 26 SCSI devices attached.
  • Page 106: File System Basics

    Chapter 5. Managing Storage 4. The SCSI drive formerly known as now has a new name, because the first SCSI drive /dev/sda on the new controller is now /dev/sda In theory, this sounds like a terrible problem. However, in practice it rarely is. It is rarely a problem for a number of reasons.
  • Page 107 Chapter 5. Managing Storage EXT2 • EXT3 • • ISO 9660 • MSDOS • VFAT • The following sections explore the more popular file systems in greater detail. 5.9.2.1. EXT2 Until recently, the ext2 file system had been the standard file system for Linux. As such, it has received extensive testing and is considered one of the more robust file systems in use today.
  • Page 108: Mounting File Systems

    Chapter 5. Managing Storage Rock Ridge — Uses some fields undefined in ISO 9660 to provide support for features such as long • mixed-case file names, symbolic links, and nested directories (in other words, directories that can themselves contain other directories) Joliet —...
  • Page 109 Chapter 5. Managing Storage point. When a file system is mounted, that file system is made available as a set of subdirectories under the specified mount point. This apparent shortcoming is actually a strength. It means that seamless expansion of a Linux file system is possible, with every directory capable of acting as a mount point for additional disk space.
  • Page 110 Chapter 5. Managing Storage Note file is meant to be used to display the status of currently-mounted file systems only. /etc/mtab It should not be manually modified. Each line represents a file system that is currently mounted and contains the following fields (from left to right): The device specification •...
  • Page 111: Network-Accessible Storage Under Red Hat Enterprise Linux

    Chapter 5. Managing Storage 5.9.3.2.3. Issuing the Command While using lets you know what file systems are currently mounted, /etc/mtab /proc/mounts it does little beyond that. Most of the time you are more interested in one particular aspect of the file systems that are currently mounted —...
  • Page 112: Mounting File Systems Automatically With

    Chapter 5. Managing Storage 5.9.4.2. SMB SMB stands for Server Message Block and is the name for the communications protocol used by various operating systems produced by Microsoft over the years. SMB makes it possible to share storage across a network. Present-day implementations often use TCP/IP as the underlying transports; previously NetBEUI was the transport.
  • Page 113 Chapter 5. Managing Storage 5.9.6.1. Adding Storage The process of adding storage to a Red Hat Enterprise Linux system is relatively straightforward. Here are the steps that are specific to Red Hat Enterprise Linux: Partitioning • Formatting the partition(s) • Updating •...
  • Page 114 Chapter 5. Managing Storage Partition number (1-4): 1 First cylinder (1-767): 1 Last cylinder or +size or +sizeM or +sizeK: +512M Second, by setting the file system type (using the command): Command (m for help): t Partition number (1-4): 1 Hex code (type L to list codes): 82 Partition type 82 represents a Linux swap partition.
  • Page 115 Chapter 5. Managing Storage 5.9.6.1.3. Updating /etc/fstab As outlined in Section 5.9.5 Mounting File Systems Automatically with , you must add /etc/fstab the necessary line(s) to to ensure that the new file system(s) are mounted whenever /etc/fstab the system reboots. Once you have updated , test your work by issuing an "incomplete"...
  • Page 116 Chapter 5. Managing Storage umount /dev/hda2 umount /home A partition can only be unmounted if it is not currently in use. If the partition cannot be unmounted while at the normal runlevel, boot into rescue mode and remove the partition’s entry.
  • Page 117: Implementing Disk Quotas

    Chapter 5. Managing Storage 5.9.7. Implementing Disk Quotas Red Hat Enterprise Linux is capable of keeping track of disk space usage on a per-user and per- group basis through the use of disk quotas. The following section provides an overview of the features present in disk quotas under Red Hat Enterprise Linux.
  • Page 118 Chapter 5. Managing Storage 5.9.7.1.4. Tracks Disk Block Usage Disk quotas track disk block usage. Because all the data stored on a file system is stored in blocks, disk quotas are able to directly correlate the files created and deleted on a file system with the amount of storage those files take up.
  • Page 119 Chapter 5. Managing Storage 1. Modifying /etc/fstab 2. Remounting the file system(s) 3. Running quotacheck 4. Assigning quotas file controls the mounting of file systems under Red Hat Enterprise Linux. Because /etc/fstab disk quotas are implemented on a per-file-system basis, there are two options — usrquota —...
  • Page 120: Creating Raid Arrays

    Chapter 5. Managing Storage Making sure that the disk quotas remain accurate • Creating a disk usage report entails running the utility program. Using the command repquota produces this output: repquota /home *** Report for user quotas on device /dev/md3 Block grace time: 7days;...
  • Page 121 Chapter 5. Managing Storage For more information on creating software RAID arrays during the Red Hat Enterprise Linux installa- tion process, refer to the Red Hat Enterprise Linux System Administration Guide. 5.9.8.2. After Red Hat Enterprise Linux Has Been Installed Creating a RAID array after Red Hat Enterprise Linux has been installed is a bit more complex.
  • Page 122: Day To Day Management Of Raid Arrays

    Chapter 5. Managing Storage 5.9.9. Day to Day Management of RAID Arrays There is little that needs to be done to keep a RAID array operating. As long as no hardware problems crop up, the array should function just as if it were a single physical disk drive. However, just as a system administrator should periodically check the status of all disk drives on the system, the RAID arrays’...
  • Page 123: Logical Volume Management

    Chapter 5. Managing Storage Here is a command that can be used to watch the rebuild as it takes place: watch -n1 cat /proc/mdstat This command displays the contents of , updating it every second. /proc/mdstat 5.9.10. Logical Volume Management Red Hat Enterprise Linux includes support for LVM.
  • Page 124: Useful Websites

    Chapter 5. Managing Storage 5.10.2. Useful Websites http://www.pcguide.com/ — A good site for all kinds of information on various storage technolo- • gies. http://www.tldp.org/ — The Linux Documentation Project has HOWTOs and mini-HOWTOs that • provide good overviews of storage technologies as they relate to Linux. 5.10.3.
  • Page 125: Managing User Accounts And Resource Access

    Chapter 6. Managing User Accounts and Resource Access Managing user accounts and groups is an essential part of system administration within an organiza- tion. But to do this effectively, a good system administrator must first understand what user accounts and groups are and how they work. The primary reason for user accounts is to verify the identity of each individual using a computer system.
  • Page 126 Chapter 6. Managing User Accounts and Resource Access The size of your organization matters, as it dictates how many users your naming convention must support. For example, a very small organization might be able to have everyone use their first name. For a much larger organization this naming convention would not work.
  • Page 127 Chapter 6. Managing User Accounts and Resource Access 6.1.1.2. Dealing with Name Changes If your organization uses a naming convention that is based on each user’s name, it is a fact of life that you will eventually have to deal with name changes. Even if a person’s actual name does not change, a change in username may from time to time be requested.
  • Page 128: Passwords

    Chapter 6. Managing User Accounts and Resource Access The new user never receives any email — it all goes to the original user. • The original user suddenly stops receiving any email — it all goes to the new user. •...
  • Page 129 Chapter 6. Managing User Accounts and Resource Access 6.1.2.1. Weak Passwords As stated earlier, a weak password fails one of these three tests: It is secret • It is resistant to being guessed • It is resistant to a brute-force attack •...
  • Page 130 Chapter 6. Managing User Accounts and Resource Access 6.1.2.1.3. Recognizable Words Many attacks against passwords are based on the fact that people are most comfortable with pass- words they can remember. And for most people, passwords that are memorable are passwords that contain words.
  • Page 131 Chapter 6. Managing User Accounts and Resource Access a physically-secure location that requires multiple people to cooperate in order to get access to the paper. Vaults with multiple locks and bank safe deposit boxes are often used. Any organization that explores this method of storing passwords for emergency purposes should be aware that the existence of written passwords adds an element of risk to their systems’...
  • Page 132: Access Control Information

    Chapter 6. Managing User Accounts and Resource Access Note Keep in mind that just using the first letters of each word in a phrase is not sufficient to make a strong password. Always be sure to increase the password’s character set by including mixed-case alphanumeric characters and at least one special character as well.
  • Page 133: Managing Accounts And Resource Access Day-To-Day

    Chapter 6. Managing User Accounts and Resource Access Therefore, if your organization requires this kind of environment, you should make a point of docu- menting the exact steps required to create and correctly configure a user account. In fact, if there are different types of user accounts, you should document each one (creating a new finance user account, a new operations user account, etc.).
  • Page 134 Chapter 6. Managing User Accounts and Resource Access When handling system "lock-downs" in response to terminations, proper timing is important. If the lock-down takes place after the termination process has been completed, there is the potential for unauthorized access by the newly-terminated person. On the other hand, if the lock-down takes place before the termination process has been initiated, it could alert the person to their impending termination, and make the process more difficult for all parties.
  • Page 135: Managing User Resources

    Chapter 6. Managing User Accounts and Resource Access Further complicating the situation is the fact that often there is a transition period where the user per- forms tasks related to both sets of responsibilities. This is where the user’s original and new manager can help you by giving you a time frame for this transition period.
  • Page 136: Where Users Access Shared Data

    Chapter 6. Managing User Accounts and Resource Access Who to put in a given group • What type of permissions should these shared resources have • A common-sense approach to these questions is helpful. One possibility is to mirror your organiza- tion’s structure when creating groups.
  • Page 137: What Barriers Are In Place To Prevent Abuse Of Resources

    Chapter 6. Managing User Accounts and Resource Access having centralized home directories may not be desirable. But if it makes sense for your organization, deploying centralized home directories can make a system administrator’s life much easier. 6.2.3. What Barriers Are in Place To Prevent Abuse of Resources The careful organization of groups and assignment of permissions for shared resources is one of the most important things a system administrator can do to prevent resource abuse among users within an organization.
  • Page 138 Chapter 6. Managing User Accounts and Resource Access One important point to keep in mind regarding permissions and user accounts is that every application run on Red Hat Enterprise Linux runs in the context of a specific user. Typically, this means that if user launches an application, the application runs using user ’s context.
  • Page 139: Files Controlling User Accounts And Groups

    Chapter 6. Managing User Accounts and Resource Access these UIDs/GIDs are never to be assigned to a user, as it is likely that some system component either currently uses or will use these UIDs/GIDs at some point in the future. For more information on these standard users and groups, see the chapter titled Users and Groups in the Red Hat Enterprise Linux Reference Guide.
  • Page 140 Chapter 6. Managing User Accounts and Resource Access For more information about , see the man page. /etc/passwd passwd(5) 6.3.2.2. /etc/shadow Because the file must be world-readable (the main reason being that this file is used /etc/passwd to perform the translation from UID to username), there is a risk involved in storing everyone’s pass- word in .
  • Page 141 Chapter 6. Managing User Accounts and Resource Access juan:$1$.QKDPc5E$SWlkjRWexrXYgc98F.:12825:0:90:5:30:13096: This line shows the following information for user juan The password was last changed February 11, 2005 • There is no minimum amount of time required before the password can be changed •...
  • Page 142: User Account And Group Applications

    Chapter 6. Managing User Accounts and Resource Access Group administrators — Group members listed here (in a comma delimited list) can add or remove • group members using the command. gpasswd Group members — Group members listed here (in a comma delimited list) are regular, •...
  • Page 143 Chapter 6. Managing User Accounts and Resource Access Application Function Changes the user’s default shell. chsh Table 6-2. User Management Command Line Tools The following table describes some of the more common command line tools used to create and manage groups: Application Function Adds groups, but does not assign users to those groups.
  • Page 144: Additional Resources

    Chapter 6. Managing User Accounts and Resource Access 6.4. Additional Resources This section includes various resources that can be used to learn more about account and resource management, and the Red Hat Enterprise Linux-specific subject matter discussed in this chapter. 6.4.1.
  • Page 145: Related Books

    Chapter 6. Managing User Accounts and Resource Access 6.4.3. Related Books The following books discuss various issues related to account and resource management, and are good resources for Red Hat Enterprise Linux system administrators. The Red Hat Enterprise Linux Security Guide; Red Hat, Inc. — Provides an overview of the •...
  • Page 146 Chapter 6. Managing User Accounts and Resource Access...
  • Page 147: Printers And Printing

    Chapter 7. Printers and Printing Printers are an essential resource for creating a hard copy — a physical depiction of data on paper — version of documents and collateral for business, academic, and home use. Printers have become an indispensable peripheral in all levels of business and institutional computing. This chapter discusses the various printers available and compares their uses in different computing environments.
  • Page 148: Impact Printers

    Chapter 7. Printers and Printing JIS B5 — (182mm x 257mm) • legal — (8 1/2" x 14") • If certain departments (such as marketing or design) have specialized needs such as creating posters or banners, there are large-format printers capable of using A3 (297mm x 420mm) or tabloid (11" x 17") paper sizes.
  • Page 149: Daisy-Wheel Printers

    Chapter 7. Printers and Printing Dot-matrix printers vary in print resolution and overall quality with either 9 or 24-pin printheads. The more pins per inch, the higher the print resolution. Most dot-matrix printers have a maximum resolution of around 240 dpi (dots per inch). While this resolution is not as high as those possible in laser or inkjet printers, there is one distinct advantage to dot-matrix (or any form of impact) printing.
  • Page 150: Inkjet Consumables

    Chapter 7. Printers and Printing Inkjets were originally manufactured to print in monochrome (black and white) only. However, the printhead has since been expanded and the nozzles increased to accommodate cyan, magenta, yellow, and black. This combination of colors (called CMYK) allows the printing of images with nearly the same quality as a photo development lab (when using certain types of coated paper.) When coupled with crisp and highly readable text print quality, inkjet printers are a sound all-in-one choice for monochrome or color printing needs.
  • Page 151: Laser Printer Consumables

    Chapter 7. Printers and Printing 7.4.1. Color Laser Printers Color laser printers aim to combine the best features of laser and inkjet technology into a multi- purpose printer package. The technology is based on traditional monochrome laser printing, but uses additional components to create color images and documents.
  • Page 152: Printer Languages And Technologies

    Chapter 7. Printers and Printing Dye-sub is quite popular in the design and publishing world as well as the scientific research field, where preciseness and detail are required. Such detail and print quality comes at a price, as dye-sub printers are also known for their high costs-per-page. Solid Ink Printers Used mostly in the packaging and industrial design industries, solid ink printers are prized for their ability to print on a wide variety of paper types.
  • Page 153: Red Hat Enterprise Linux-Specific Information

    Chapter 7. Printers and Printing other necessities. While local printers attached via a parallel or USB cable to every workstation are an ideal solution for the user, it is usually not economically feasible. Printer manufacturers have addressed this need by developing departmental (or workgroup) printers. These machines are usually durable, fast, and have long-life consumables.
  • Page 154: Additional Resources

    Chapter 7. Printers and Printing Locally-connected — a printer attached directly to the computer through a parallel or USB port. • Networked CUPS (IPP) — a printer that can be accessed over a TCP/IP network via the Internet • Printing Protocol, also known as IPP (for example, a printer attached to another Red Hat Enterprise Linux system running CUPS on the network).
  • Page 155: Useful Websites

    Chapter 7. Printers and Printing 7.9.2. Useful Websites http://www.webopedia.com/TERM/p/printer.html — General definitions of printers and descrip- • tions of printer types. http://www.linuxprinting.org/ — A database of documents about printing, along with a database of • nearly 1000 printers compatible with Linux printing facilities. http://www.cups.org/ —...
  • Page 156 Chapter 7. Printers and Printing...
  • Page 157: Planning For Disaster

    Chapter 8. Planning for Disaster Disaster planning is a subject that is easy for a system administrator to forget — it is not pleasant, and it always seems that there is something else more pressing to do. However, letting disaster planning slide is one of the worst things a system administrator can do.
  • Page 158 Chapter 8. Planning for Disaster Before taking the approach of first fixing it yourself, make sure that the hardware in question: Is not still under warranty • Is not under a service/maintenance contract of any kind • If you attempt repairs on hardware that is covered by a warranty and/or service contract, you are likely violating the terms of these agreements and jeopardizing your continued coverage.
  • Page 159 Chapter 8. Planning for Disaster 8.1.1.1.3. Spares That Are Not Spares When is a spare not a spare? When it is hardware that is in day-to-day use but is also available to serve as a spare for a higher-priority system should the need arise. This approach has some benefits: Less money dedicated to "non-productive"...
  • Page 160 Chapter 8. Planning for Disaster As you might expect, the cost of a contract increases with the hours of coverage. In general, extending the coverage Monday through Friday tends to cost less than adding on Saturday and Sunday coverage. But even here there is a possibility of reducing costs if you are willing to do some of the work. 8.1.1.2.1.1.
  • Page 161 Chapter 8. Planning for Disaster times can range from eight hours (which effectively becomes "next day" service for a standard busi- ness hours agreement), to 24 hours. As with every other aspect of a service agreement, even these times are negotiable — for the right price. Note Although it is not a common occurrence, you should be aware that service agreements with re- sponse time clauses can sometimes stretch a manufacturer’s service organization beyond its ability...
  • Page 162: Software Failures

    Chapter 8. Planning for Disaster 8.1.1.2.4. Available Budget As outlined above, service contracts vary in price according to the nature of the services being pro- vided. Keep in mind that the costs associated with a service contract are a recurring expense; each time the contract is due to expire you must negotiate a new contract and pay again.
  • Page 163 Chapter 8. Planning for Disaster 8.1.2.1. Operating System Failures In this type of failure, the operating system is responsible for the disruption in service. Operating system failures come from two areas: Crashes • Hangs • The main thing to keep in mind about operating system failures is that they take out everything that the computer was running at the time of the failure.
  • Page 164 Chapter 8. Planning for Disaster Each type of support is described in more detail in the following sections. 8.1.2.3.1. Documentation Although often overlooked, software documentation can serve as a first-level support tool. Whether online or printed, documentation often contains the information necessary to resolve many issues. 8.1.2.3.2.
  • Page 165: Environmental Failures

    Chapter 8. Planning for Disaster Still, there are instances where on-site support makes sense. As an example, consider a small organi- zation with a single system administrator. The organization is going to be deploying its first database server, but the deployment (and the organization) is not large enough to justify hiring a dedicated database administrator.
  • Page 166 Chapter 8. Planning for Disaster Organizations located near the boundaries of a power company might be able to negotiate connec- tions to two different power grids: The one servicing your area • The one from the neighboring power company • The costs involved in running power lines from the neighboring grid are sizable, making this an option only for larger organizations.
  • Page 167 Chapter 8. Planning for Disaster Noise The power must not include any RFI (Radio Frequency Interference) or EMI (Electro-Magnetic Interference) noise. Current The power must be supplied at a current rating sufficient to run the data center. Power supplied directly from the power company does not normally meet the standards necessary for a data center.
  • Page 168 Chapter 8. Planning for Disaster 8.1.3.2.3.1. Providing Power For the Next Few Seconds Since the majority of outages last only a few seconds, your backup power solution must have two primary characteristics: Very short time to switch to backup power (known as transfer time) •...
  • Page 169 Chapter 8. Planning for Disaster Note Strictly speaking, this approach to calculating VA is not entirely correct; however, to get the true VA you would need to know the power factor for each unit, and this information is rarely, if ever, provided. In any case, the VA numbers obtained from this approach reflects worst-case values, leaving a large margin of error for safety.
  • Page 170: Human Errors

    Chapter 8. Planning for Disaster The point here is that your organization must determine at what point an extended outage will just have to be tolerated. Or if that is not an option, your organization must reconsider its ability to function completely independently of on-site power for extended periods, meaning that very large generators will be needed to power the entire building.
  • Page 171 Chapter 8. Planning for Disaster 8.1.4.1. End-User Errors The users of a computer can make mistakes that can have serious impact. However, due to their normally unprivileged operating environment, user errors tend to be localized in nature. Because most users interact with a computer exclusively through one or more applications, it is within applications that most end-user errors occur.
  • Page 172 Chapter 8. Planning for Disaster The procedures exist and are correct, but the operator will not (or cannot) follow them. • Depending on the management structure of your organization, you might not be able to do much more than communicate your concerns to the appropriate manager. In any case, making yourself available to do what you can to help resolve the problem is the best approach.
  • Page 173 Chapter 8. Planning for Disaster 8.1.4.3.1.1. Change Control The common thread of every configuration change is that some sort of a change is being made. The change may be large, or it may be small. But it is still a change and should be treated in a particular way.
  • Page 174 Chapter 8. Planning for Disaster 8.1.4.3.2. Mistakes Made During Maintenance This type of error can be insidious because there is usually so little planning and tracking done during day-to-day maintenance. System administrators see the results of this kind of error every day, especially from the many users that swear they did not change a thing —...
  • Page 175: Backups

    Chapter 8. Planning for Disaster 8.2. Backups Backups have two major purposes: To permit restoration of individual files • To permit wholesale restoration of entire file systems • The first purpose is the basis for the typical file restoration request: a user accidentally deletes a file and asks that it be restored from the latest backup.
  • Page 176: Backup Software: Buy Versus Build

    Chapter 8. Planning for Disaster Application Software This data changes whenever applications are installed, upgraded, or removed. Application Data This data changes as frequently as the associated applications are run. Depending on the specific application and your organization, this could mean that changes take place second-by-second or once at the end of each fiscal year.
  • Page 177: Types Of Backups

    Chapter 8. Planning for Disaster As you can see, there is no clear-cut method for deciding on a backup system. The only guidance that can be offered is to ask you to consider these points: Changing backup software is difficult; once implemented, you will be using the backup software •...
  • Page 178: Backup Media

    Chapter 8. Planning for Disaster Incremental backups are used in conjunction with a regularly-occurring full backup (for example, a weekly full backup, with daily incrementals). The primary advantage gained by using incremental backups is that the incremental backups run more quickly than full backups.
  • Page 179 Chapter 8. Planning for Disaster 8.2.4.2. Disk In years past, disk drives would never have been used as a backup medium. However, storage prices have dropped to the point where, in some cases, using disk drives for backup storage does make sense. The primary reason for using disk drives as a backup medium would be speed.
  • Page 180: Storage Of Backups

    Chapter 8. Planning for Disaster By backing up over the network, the disk drives are already off-site, so there is no need for transporting fragile disk drives anywhere. With sufficient network bandwidth, the speed advantage you can get from backing up to disk drives is maintained. However, this approach still does nothing to address the matter of archival storage (though the same "spin off to tape after the backup"...
  • Page 181: Disaster Recovery

    Chapter 8. Planning for Disaster The important thing to do is to look at the various restoration scenarios detailed throughout this section and determine ways to test your ability to actually carry them out. And keep in mind that the hardest one to test is also the most critical one.
  • Page 182: Creating, Testing, And Implementing A Disaster Recovery Plan

    Chapter 8. Planning for Disaster By thinking about this, you have taken the first step of disaster recovery. Disaster recovery is the ability to recover from an event impacting the functioning of your organization’s data center as quickly and completely as possible. The type of disaster may vary, but the end goal is always the same. The steps involved in disaster recovery are numerous and wide-ranging.
  • Page 183: Backup Sites: Cold, Warm, And Hot

    Chapter 8. Planning for Disaster 8.3.2. Backup Sites: Cold, Warm, and Hot One of the most important aspects of disaster recovery is to have a location from which the recovery can take place. This location is known as a backup site. In the event of a disaster, a backup site is where your data center will be recreated, and where you will operate from, for the length of the disaster.
  • Page 184: Availability Of Backups

    Chapter 8. Planning for Disaster single item must be identified. Often organizations work with manufacturers to craft agreements for the speedy delivery of hardware and/or software in the event of a disaster. 8.3.4. Availability of Backups When a disaster is declared, it is necessary to notify your off-site storage facility for two reasons: To have the last backups brought to the backup site •...
  • Page 185: Moving Back Toward Normalcy

    Self support options are available via the many mailing lists hosted by Red Hat (available at https://www.redhat.com/mailman/listinfo). These mailing lists take advantage of the combined knowledge of Red Hat’s user community; in addition, many lists are monitored by Red Hat personnel, who contribute as time permits.
  • Page 186 Chapter 8. Planning for Disaster However, it is also possible to use your Red Hat Enterprise Linux CD-ROM as a system recovery en- vironment; for more information see the chapter on basic system recovery in the Red Hat Enterprise Linux System Administration Guide. 8.4.2.1.
  • Page 187 Chapter 8. Planning for Disaster There are many other options to (and ); to learn more about them read the cpio find cpio(1) man pages. find(1) 8.4.2.3. : Not Recommended for Mounted File Systems! dump restore programs are Linux equivalents to the UNIX programs of the same name. dump restore As such, many system administrators with UNIX experience may feel that...
  • Page 188: Additional Resources

    Chapter 8. Planning for Disaster 8.4.2.4. The Advanced Maryland Automatic Network Disk Archiver (AMANDA) AMANDA is a client/server based backup application produced by the University of Maryland. By having a client/server architecture, a single backup server (normally a fairly powerful system with a great deal of free space on fast disks and configured with the desired backup device) can back up many client systems, which need nothing more than the AMANDA client software.
  • Page 189: Useful Websites

    • reviewing these various documents and example files. 8.5.2. Useful Websites http://www.redhat.com/apps/support/ — The Red Hat support homepage provides easy access to • various resources related to the support of Red Hat Enterprise Linux. http://www.disasterplan.com/ — An interesting page with links to many sites related to disaster •...
  • Page 190 Chapter 8. Planning for Disaster...
  • Page 191: Index

    Index technologies used, 173 cpio, 174 dump, 175 tar, 174 Symbols types of, 165 differential backups, 166 /etc/cups/, 141 full backups, 165 /etc/fstab file incremental backups, 165 mounting file systems with, 100 bandwidth-related resources updating, 103 (see resources, system, bandwidth) /etc/group file bash shell, automation and, 9 group, role in, 129...
  • Page 192 type, 92 file-system specific, 105 unit, 93 grace period, 106 whole-device access, 93 group specific, 105 devlabel, 94 hard limits, 106 inode usage tracking, 106 df command, 99 soft limits, 106 disaster planning, 145 user specific, 105 power, backup, 155 disk space generator, 157 motor-generator set, 156...
  • Page 193 tools for managing, 130 gpasswd command, 130 laser printers, 138 groupadd command, 130 color, 139 groupdel command, 130 consumables, 139 groupmod command, 130 line printers grpck command, 130 (see impact printers) UID, 126 logical volume management group ID (see LVM) (see GID) lpd, 142 groupadd command, 130...
  • Page 194 printer configuration, 141 CUPS, 141 NFS, 99 text-based application, 141 Printer Configuration Tool (see printer configuration) OProfile, 18, 25 printers additional resources, 142 color, 137 page description languages (PDL), 140 CMYK, 137 Interpress, 140 inkjet, 137 PCL, 140 PostScript, 140 laser, 139 page faults, 51 considerations, 135...
  • Page 195 resource monitoring tools, 18 free, 18, 53 RAID iostat, 38 arrays OProfile, 18 management of, 110 sar, 39, 41, 54 raidhotadd command, use of, 110 Sysstat, 18 rebuilding, 110 top, 18, 40 status, checking, 110 vmstat, 18, 38, 40, 54 arrays, creating, 108 RPM, 10 after installation time, 109...
  • Page 196 application overhead, reducing, 36 ATA disk drive, 87 application use of, 34 backup schedule, modifying, 90 applications, eliminating, 36 configuration, updating, 90 formatting, 90, 102 capacity, increasing, 36 consumers of, 34 hardware, installing, 86 partitioning, 89, 101 CPU, upgrading, 37 SCSI disk drive, 88 facts related to, 34 deploying, 69...
  • Page 197 head, 62 technologies, advanced, 74 heads, 60 subscription registration, iv heads reading, 67 swapping, 52 heads writing, 67 symmetric multiprocessing, 37 I/O loads, performance, 68 Sysstat, 18, 22 I/O loads, reads, 68 I/O loads, writes, 68 system administration I/O locality, 69 philosophy of, 1 IDE interface, 64 automation, 1...
  • Page 198 user ID (see UID) UID, 126 useradd command, 130 unexpected, preparation for, 8 userdel command, 130 user account usermod command, 130 access control, 120 username, 113 files controlling, 127 changing, 115 /etc/group, 129 collisions between, 114 /etc/gshadow, 129 naming convention, 113 /etc/passwd, 127 users /etc/shadow, 128...
  • Page 199: Colophon

    Colophon The manuals are written in DocBook SGML v4.1 format. The HTML and PDF formats are produced using custom DSSSL stylesheets and custom jade wrapper scripts. The DocBook SGML files are written in Emacs with the help of PSGML mode. Garrett LeSage created the admonition graphics (note, tip, important, caution, and warning).
  • Page 200 Nadine Richter — German translations Audrey Simons — French translations Francesco Valente — Italian translations Sarah Wang — Simplified Chinese translations Ben Hung-Pin Wu — Traditional Chinese translations...

Table of Contents