Title: Preparing for Emergencies
1Chapter 9
- Preparing for Emergencies
2Objectives
- In this chapter, you will
- Understand your systems 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
3Understanding a Systems Vulnerabilities
Valued Gateway Client
- Computers continue to break down
- System administrators handle crises
- System administrators outline policies and
procedures for emergencies
4Creating a Disaster Plan
Valued Gateway Client
- 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
5Preventing Downtime
Valued Gateway Client
- Downtime Occasions when an organizations
computer systems cannot respond to requests for
information - To prevent downtime
- Remove single points of failure
- Make vulnerable components redundant
6Understanding High Availability
Valued Gateway Client
- 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
7Creating Rescue Disks
Valued Gateway Client
- 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
8Maintaining Software Masters
Valued Gateway Client
- 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
9Managing the Computers Power Supply
Valued Gateway Client
- 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
10A Computers Power Supply
11Providing Consistent Power to a Linux System
Valued Gateway Client
- Surge suppressors protect the computers power
supply by removing the voltage spikes and minor
power irregularities - When the power actually fails, an uninterruptible
power supply (UPS) is needed
12A Surge Suppressor Removes Voltage Spikes
13A Computer Connected to a UPS
14Automating Linux Shutdown
Valued Gateway Client
- 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
15Events Tracked by a UPS Devicevia a Serial Port
16A Serial Connection between a UPS and a Linux
System
17A Gnome-Based Graphical Interface to the Network
UPS Tools Package
18Responding to a Power Outage
Valued Gateway Client
- 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
19Checking File System Integrity
Valued Gateway Client
- 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 files name and point to an
inode - Directory records are files that contain a list
of filenames and corresponding inode numbers
20Checking File System Integrity
Valued Gateway Client
- 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
21Using the fsck Utility
Valued Gateway Client
- 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
22Hard and Symbolic Links in a Linux File System
23Defragmenting a File System
Valued Gateway Client
- 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
24Tuning a Linux File System
Valued Gateway Client
- 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
25Understanding Redundant Disk Systems
Valued Gateway Client
- 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
26Defining RAID Levels
Valued Gateway Client
- 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
- Stripping
- Parity
27RAID-Linear
Valued Gateway Client
- 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
28RAID-Linear
29RAID-0 (Striping)
Valued Gateway Client
- 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
30RAID-0, or Data Striping
31RAID-1 (Disk Mirroring and Duplexing)
Valued Gateway Client
- 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
32RAID-3 (Striping with Parity)
Valued Gateway Client
- 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
33RAID-3, Striping with Parity
34RAID-5 (Striping and Parity)
Valued Gateway Client
- 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
35RAID-5, Parity and Striping over Multiple Disks
36Using Hardware-Based RAID
Valued Gateway Client
- 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
37Summary
- 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
38Summary
- 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
files 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