Presentation is loading. Please wait.

Presentation is loading. Please wait.

Materi configure & building kernels System And Kernel Management The Complete Guide to Linux System Administration Chapter 13.

Similar presentations


Presentation on theme: "Materi configure & building kernels System And Kernel Management The Complete Guide to Linux System Administration Chapter 13."— Presentation transcript:

1 Materi configure & building kernels System And Kernel Management The Complete Guide to Linux System Administration Chapter 13

2 CATATAN MATERI INI TERMASUK SEBAGIAN DARI MATERI “BACKUP AND RESTORE” YANG AKAN DIPELAJARI PADA KAJIAN 3 The Complete Guide to Linux System Administration2

3 3 Objectives Establish a Linux backup strategy Configure and review system log files Understand the use of kernel modules and the features of a high-end kernel Upgrade and recompile the Linux kernel

4 The Complete Guide to Linux System Administration4 Backing Up a Linux System Backup –Copy of data on computer system –Form of insurance

5 The Complete Guide to Linux System Administration5 Designing a Backup Strategy Backup plan –Written document that outlines: When and how files are backed up How files are stored How files are restored Backup media –Item that holds backed-up data Restore data –Copy from backup media to file system

6 The Complete Guide to Linux System Administration6 Designing a Backup Strategy (continued) Backup plan questions –What files should be backed up? –Who will back up files? –Where are files located? –How should backups be performed? –Must you be able to restore data within a specific period of time?

7 The Complete Guide to Linux System Administration7 Designing a Backup Strategy (continued) Determining value of data –Spend more to protect integrity of expensive data Opportunity cost Determine when to back up data –Data changes frequently in most organizations User data Log files E-mail archives Constitutes daily work of users within organization

8 The Complete Guide to Linux System Administration8 A Linux Backup Strategy Backup level –Defines how much data is backed up –Backup operation at given backup level stores all data that has changed since last backup of previous level –Levels Level 0, full backup Level 1, weekly differential backup Level 2, daily differential backup

9 The Complete Guide to Linux System Administration9 A Linux Backup Strategy (continued) Full backup –Also called epoch backup –Everything on system is backed up Differential backup stores only files that changed since full backup Incremental backup stores files that changed since most recent incremental backup or differential backup

10 The Complete Guide to Linux System Administration10 A Linux Backup Strategy (continued)

11 The Complete Guide to Linux System Administration11 A Linux Backup Strategy (continued) Restoring file from three-level backup –Check most recent level 2 backup, level 1backup, and level 0 backup Entire system restore from three-level backup –Restore most recent level 0 backup, level 1 backup, and level 2 backup

12 The Complete Guide to Linux System Administration12 A Linux Backup Strategy (continued) Managing and storing backup media –Determine how many backup media needed for each level –Carefully label media –Most organizations store one set of monthly backup media off-site Possibly weekly as well –Can reuse same set of level 1 weekly tape cartridges each month starting with oldest one

13 The Complete Guide to Linux System Administration13 A Linux Backup Strategy (continued)

14 The Complete Guide to Linux System Administration14 A Linux Backup Strategy (continued) Backing up root file system –Requires special attention in backup plan –Contains tools normally used to restore damaged data –Think about how to respond if root file system is damaged

15 The Complete Guide to Linux System Administration15 Hardware and Software Issues Determine best tools to get job done Linux includes all necessary software utilities for many backup tasks Backup media such as tape cartridges cost much less than hard disk Verify backups regularly Check backup log each morning

16 The Complete Guide to Linux System Administration16 Hardware and Software Issues (continued) Know exactly what information is backed up –Backup utilities normally include options to maintain or ignore file ownership and permissions Choose whether to use compression feature –When data compressed, redundancy removed

17 The Complete Guide to Linux System Administration17 Using Linux Backup Utilities tar cpio dump restore dd (“Data dump”)

18 The Complete Guide to Linux System Administration18 Using Linux Backup Utilities (continued) Graphical utilities rely on tar, cpio, or dump and restore in background Common to use Linux backup utilities across network Most full-featured backup utilities create own network connections ark –Graphical tool for managing data backup operations

19 The Complete Guide to Linux System Administration19 Using Linux Backup Utilities (continued) Specialized software for maintaining large numbers of backup media for large volumes of data –BRU (backup and restore utility) –Arkeia –Storix –Hypertape –Amanda –Legato

20 The Complete Guide to Linux System Administration20 Understanding Redundant Disk Systems and RAID Redundant arrays of inexpensive disks –Called RAID subsystems or RAID arrays –Group or array of inexpensive hard disks –If one disk fails, others can take over until failed disk replaced –Can be implemented by Linux kernel As device called /dev/md0 Composed of several actual hard disk partitions

21 The Complete Guide to Linux System Administration21 Understanding Redundant Disk Systems and RAID (continued) Defining RAID levels –Levels differ in: Amount of fault tolerance provided Speed of reading or writing data Cost of implementation –RAID-Linear Combine multiple physical devices into single logical device Not truly RAID level

22 The Complete Guide to Linux System Administration22 Understanding Redundant Disk Systems and RAID (continued) RAID-0 –Data storage technique called striping –Single block of data divided into pieces –Stored on more than one hard disk RAID-1 –Mirrors data across multiple hard disks RAID-3 –Stripes data across multiple hard disks –Provides additional protection against failure by using parity

23 The Complete Guide to Linux System Administration23 Understanding Redundant Disk Systems and RAID (continued)

24 The Complete Guide to Linux System Administration24 Understanding Redundant Disk Systems and RAID (continued) Mirroring –Two or more hard disks contain identical information Duplexing –Mirrored hard disks on separate controller cards Parity –Technique that allows corrupted data to be reconstructed using extra information created as data stored

25 The Complete Guide to Linux System Administration25 Understanding Redundant Disk Systems and RAID (continued) RAID-5 –Similar to RAID-3 –Parity information and stored data striped across multiple hard disks Write caching stores information in memory until it can be written to multiple hard disks without degrading performance overall

26 The Complete Guide to Linux System Administration26 Understanding Redundant Disk Systems and RAID (continued)

27 The Complete Guide to Linux System Administration27 Understanding Redundant Disk Systems and RAID (continued)

28 The Complete Guide to Linux System Administration28 Understanding Redundant Disk Systems and RAID (continued) Hardware-based RAID –Control and management of disk array depends on separate hardware system –All special technology contained in RAID device –Often allow hot-swapping disks –Main disadvantage: cost

29 The Complete Guide to Linux System Administration29 Understanding Logical Volume Management Logical volume manager (LVM) used to manage large hard disks Physical volumes –Use Disk Druid to set up “real” partitions on multiple hard disks –Grouped together into logical volume group –Treated as regular hard disk –Boot loader not able to work directly with LVM

30 The Complete Guide to Linux System Administration30 System Logs Log files –Detailed records of events within system –Created by many programs /var/log/messages –Many different programs write messages Message –Description of what is happening within program –Uses standard format whatis command –Looks at database of program descriptions –Prints one-line description of program

31 The Complete Guide to Linux System Administration31 The syslogd and klogd Daemons syslogd –System logging daemon –Watches for messages submitted by programs klogd –Kernel log daemon –Watches for messages submitted by kernel –Logs kernel messages to /var/log/messages

32 The Complete Guide to Linux System Administration32 syslogd and klogd Work Together to Process Log Messages

33 The Complete Guide to Linux System Administration33 Configuring the System Log /etc/syslog.conf –Configure syslogd and klogd –Each line in syslog.conf file contains two parts: Selector Action

34 The Complete Guide to Linux System Administration34 Configuring the System Log (continued)

35 The Complete Guide to Linux System Administration35 Configuration File Syntax Comment lines –Begin with # character –Precede and explain purpose of each line Some aspects of configuration file syntax not obvious even after reading about facilities and actions After changing syslog.conf configuration file, service syslog restart

36 The Complete Guide to Linux System Administration36 Configuration File Syntax (continued) SIGHUP signal –Send with kill command –Tells daemon to reread configuration files –kill -HUP ‘cat /var/run/syslogd.pid’

37 The Complete Guide to Linux System Administration37 Using the Logger Utility Logger utility sends message to syslog function Example: logger compression utility started Logged wherever syslog.conf file has configured messages matching selector

38 The Complete Guide to Linux System Administration38 Analyzing Log Files System administrator should regularly check log files for indications of trouble –Become accustomed to what is normal and what is unexpected –Use standard Linux tools to search for information in log files –Use special log management utilities that watch log files for specified conditions Notify via e-mail about problems

39 The Complete Guide to Linux System Administration39 Rotating Log Files Erase old log files to free up disk space for new log information Compress log files and store them on archive medium Rename and compress log files Common log rotation system stores log files for a month logrotate utility

40 The Complete Guide to Linux System Administration40 Exploring Kernel Components Learn how Linux keeps track of time Learn about /proc file system Work with kernel modules and several high-end features of Linux kernel

41 The Complete Guide to Linux System Administration41 Timekeeping in Linux Hardware clock –Electronic clock with small battery –Maintains correct time even when computer is off System clock –Internal clock in kernel –Maintained internally as single number Number of seconds since January 1, 1970

42 The Complete Guide to Linux System Administration42 Timekeeping in Linux (continued) date command –See current date and time from system clock hwclock command –See current date and time from hardware clock Network time server –Computer that maintains highly accurate time based on atomic or radio clocks –Network Time Protocol (NTP) /etc/ntp.conf file

43 The Complete Guide to Linux System Administration43 Kernel Management Using the /proc File System /proc file system –Interact with system resources as if they were files –Query to learn about system hardware –Can also write information to some file names in /proc sysctl command –Preferred method of viewing and updating many kernel parameters –Operates on values stored in /proc/sys

44 The Complete Guide to Linux System Administration44 Using Kernel Modules Linux kernel modules –Files containing computer code –Can be loaded into kernel or removed from kernel as needed lsmod command lists modules that are installed modinfo command –Learn about modules

45 The Complete Guide to Linux System Administration45 Using Kernel Modules (continued) Adding and removing modules –modprobe command loads module with any required supporting modules –rmmod command removes module from kernel –Module parameters provides information needed by module to locate system resources

46 The Complete Guide to Linux System Administration46 Configuring and Upgrading Kernel Components Add features to kernel by inserting kernel modules –Some kernel features not available as modules Recompile Linux kernel from source code –File vmlinuz-26.5-1.358 contains Linux kernel –Usually located in / or /boot directory

47 The Complete Guide to Linux System Administration47 Installing Kernel Source Code Source code in single rpm –Named kernel-source –Use rpm command to install Explore source code files in directory /usr/src/linux-26.5-1.358 Patch file Patch command –Insert and change lines based on patch file

48 The Complete Guide to Linux System Administration48 Configuring Kernel Features Select which kernel options to include or activate for system Configuration utilities –config –menuconfig –xconfig make command –Programming utility uses instructions in configuration file to execute series of instructions

49 The Complete Guide to Linux System Administration49 Compiling a New Kernel Execute series of make commands –Prepare all source code files –Compile them into kernel image Requires between 30 minutes and 3 hours Example: make dep; make bzimage; make modules; make modules_install

50 The Complete Guide to Linux System Administration50 Summary Backup plan creates orderly system for backing up data on regular basis and restoring lost data as needed Log files record activities of Linux programs System clock in Linux kernel maintains time and date for system events RAID systems improve speed and fault tolerance

51 The Complete Guide to Linux System Administration51 Summary (continued) /proc file system –View details about Kernel Running processes Other system information Linux kernel sometimes updated by Linux vendors via new rpm file


Download ppt "Materi configure & building kernels System And Kernel Management The Complete Guide to Linux System Administration Chapter 13."

Similar presentations


Ads by Google