guide to linux installation and administration, 2e 1 chapter 9 preparing for emergencies

38
Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Upload: nicholas-rice

Post on 11-Jan-2016

228 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 1

Chapter 9

Preparing for Emergencies

Page 2: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 2

Objectives

In this chapter, you will:

• Understand your system’s vulnerabilities and plan to protect data and ensure minimum downtime

• Manage the power supply to your Linux computer

• Check the integrity of your Linux file systems

• Understand how redundant disk systems can protect data

Page 3: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 3

Understanding a System’s Vulnerabilities

• Computers continue to break down

• System administrators handle crises• System administrators outline policies and

procedures for emergencies

Page 4: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 4

Creating a Disaster Plan

• A disaster plan describes how an organization will respond to various threats to its information systems

• A disaster plan is based on an evaluation of different risk levels and the value of having systems up and their data available

• A disaster plan includes:– Information about your computer systems

– Immediate steps that you will take to reduce their vulnerability

– Steps required to get them running again when various problems occur

Page 5: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 5

Preventing Downtime

• Downtime — Occasions when an organization’s computer systems cannot respond to requests for information

• To prevent downtime:– Remove single points of failure

– Make vulnerable components redundant

Page 6: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 6

Understanding High Availability

• Fault-tolerant computer systems that run continuously provide high availability

• High availability systems use special hardware and software to improve statistical uptime (up to 99.999%)

• A high availability cluster uses a resource group to handle computing tasks

Page 7: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 7

Creating Rescue Disks

• A rescue disk is a floppy disk that you can use to boot a Linux-based computer

• A boot disk lets you start your Linux system when the hard disk or boot manager has been damaged

Page 8: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 8

Maintaining Software Masters

• Software masters are original copies of an application supplied by software vendors

• Software masters and manuals should be carefully stored and maintained to allow recovery after a disaster

Page 9: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 9

Managing the Computer’s Power Supply

• The power supply converts the AC power from a wall socket to the low-voltage DC power used by computer chips, disk drives, and other peripherals

• For occasions when the power supply does fail– Keep a second power supply

– Purchase a server with a built-in backup power supply

Page 10: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 10

A Computer’s Power Supply

Page 11: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 11

Providing Consistent Power to a Linux System

• Surge suppressors protect the computer’s power supply by removing the voltage spikes and minor power irregularities

• When the power actually fails, an uninterruptible power supply (UPS) is needed

Page 12: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 12

A Surge Suppressor Removes Voltage Spikes

Page 13: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 13

A Computer Connected to a UPS

Page 14: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 14

Automating Linux Shutdown

• A UPS allows time for a system administrator to shut down a Linux system gracefully

• UPS devices have a serial communications port that signals the Linux system in the event of a power outage

• In response, the Linux system executes simple scripts to determine what actions to take

Page 15: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 15

Events Tracked by a UPS Devicevia a Serial Port

Page 16: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 16

A Serial Connection between a UPS and a Linux System

Page 17: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 17

A Gnome-Based Graphical Interface to the Network UPS Tools Package

Page 18: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 18

Responding to a Power Outage

• Utilities that manage a UPS typically interact with the init program to send signals

• Init checks the /etc/inittab configuration file to determine what action to take

• All three signals cause to use the shutdown command:– shutdown –f –h +2

– shutdown -c

– shutdown –h now

Page 19: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 19

Checking File System Integrity

• The fsck utility checks the integrity of a Linux file system

• Each Linux ext2 or ext3 file system includes a superblock where parameters about the file system are stored

• An inode contains parameters that describe each file in a file system.

• File records hold a file’s name and point to an inode

• Directory records are files that contain a list of filenames and corresponding inode numbers

Page 20: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 20

Checking File System Integrity

• A link allows two or more file records to refer to the same physical data stored in a file system

• A symbolic link is a file record that includes a path and filename, but not an inode number

• A hard link is a file record that includes a filename and inode, just like a regular file record

Page 21: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 21

Using the fsck Utility

• The fsck utility is run automatically at boot time to check all mounted file systems

• To force a complete check of a file system, use the fsck command with the –f option from a command line

• The fsck utility attempts to repair file system errors

Page 22: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 22

Hard and Symbolic Links in a Linux File System

Page 23: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 23

Defragmenting a File System

• All file systems are divided into units of storage called blocks

• Defragmenting is called disk optimization• Defragmenting optimizes access time to files and

reduces wear on the hard disk

Page 24: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 24

Tuning a Linux File System

• The dumpe2fs command provides information about the superblock and data blocks of a Linux ext2 or ext3 file system

• You can use the tune2fs utility both to read and to change file system parameters

Page 25: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 25

Understanding Redundant Disk Systems

• RAID (redundant arrays of inexpensive disks) — a storage technique using multiple inexpensive hard disks arranged in a predefined pattern (an array) to improve performance, increase fault tolerance, or both

• You can add RAID to your system using a separate hardware device

Page 26: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 26

Defining RAID Levels

• RAID levels differ in the amount of fault tolerance, the speed of reading or writing data, and the cost of implementation

• RAID levels include features:– Mirroring

– Duplexing

– Striping

– Parity

Page 27: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 27

RAID-Linear

• RAID-Linear — A storage technique in which multiple physical devices are combined into a single logical device

• It does not provide any redundancy or fault tolerance, nor does it improve system performance

Page 28: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 28

RAID-Linear

Page 29: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 29

RAID-0 (Striping)

• RAID-0 — A RAID level that uses striping to improve disk performance without adding any fault tolerance

• A data storage technique, in which a single block of data is divided into pieces and stored on more than one hard disk, is called striping

Page 30: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 30

RAID-0, or Data Striping

Page 31: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 31

RAID-1 (Disk Mirroring and Duplexing)

• RAID-1 — A RAID level that uses disk mirroring to significantly improve fault tolerance and disk read performance

• Mirroring — a redundancy technique in which the contents of two file systems contain identical information

• Duplexing — a redundancy technique in which hard disks are accessed via different hard disk controllers

Page 32: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 32

RAID-3 (Striping with Parity)

• RAID-3 — A RAID level that uses striping with parity information to improve performance and increase fault tolerance

• Parity is a technique that allows corrupted data to be reconstructed using an extra piece of information that is created as the data is stored

Page 33: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 33

RAID-3, Striping with Parity

Page 34: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 34

RAID-5 (Striping and Parity)

• RAID-5 — A RAID level in which striping with parity is spread across all disks in the RAID array compared to RAID-3, in which the parity information is stored on a single hard disk

• Write caching — a feature of some storage systems in which information to be written to a RAID file system is stored in memory temporarily in order to improve the overall read/write performance of the file system

Page 35: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 35

RAID-5, Parity and Striping over Multiple Disks

Page 36: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 36

Using Hardware-Based RAID

• Hardware-based RAID — A RAID array that is contained in a separate hardware device (a RAID subsystem) and is controlled by a CPU and other components separate from the CPU of the Linux system

• Hot-swapping — Removing and replacing a failed hard drive or other component without turning off the power to the device

Page 37: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 37

Summary

• A disaster plan describes how an organization will respond to various threats to its information systems

• Fault tolerance is achieved by removing single points of failure and making vulnerable components redundant

• High availability systems use special hardware and software to improve statistical uptime

• Surge suppressors and UPS devices provide clean power to a computer system

• A UPS can inform a Linux system of power outages via a serial cable, while supplying power from its batteries until the system can be gracefully shut down

Page 38: Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies

Guide to Linux Installation and Administration, 2e 38

Summary

• The fsck utility checks the integrity of a Linux file system at boot time or whenever the fsck utility is run from a command line

• Each Linux ext2 or ext3 file system includes a superblock where parameters about the file system are stored

• An inode contains parameters that describe each file in a file system, while file records hold a file’s name and point to an inode

• RAID systems let you improve speed, fault tolerance, or both, depending on the configuration you choose

• RAID levels include features such as mirroring, duplexing, striping, and parity