380 likes | 392 Views
Learn how to protect data and minimize downtime, manage power supply, check file system integrity, and use redundant disk systems to safeguard your Linux computer.
E N D
Preparing for Emergencies Chapter 9
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
Understanding a System’s Vulnerabilities • Computers continue to break down • System administrators handle crises • System administrators outline policies and procedures for emergencies
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
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
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
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
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
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
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
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
A Gnome-Based Graphical Interface to the Network UPS Tools Package
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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