Solaris To Linux Migration
Solaris To Linux Migration
A comprehensive reference for a quick transition Presents a task-based grouping of differences between the operating system environments Additional content about how to optimize Linux on IBM Eserver platforms
Mark Brown Chuck Davis William Dy Paul Ionescu Jeff Richardson Kurt Taylor Robbie Williamson
ibm.com/redbooks
International Technical Support Organization Solaris to Linux Migration: A Guide for System Administrators February 2006
SG24-7186-00
Note: Before using this information and the product it supports, read the information in Notices on page xiii.
Contents
Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv The team that wrote this redbook. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii Become a published author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii Comments welcome. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix Part 1. Background and planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Chapter 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1 What is Linux?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.2 Linux kernels, distributions, and distributors . . . . . . . . . . . . . . . . . . . . . . . . 4 1.2.1 The Linux kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2.2 The Linux operating system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2.3 Linux distributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.3 How this book is organized . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.4 Linux administration overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.4.1 Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.4.2 Utilities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.4.3 Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.4.4 Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.5 Reference materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Chapter 2. Planning for migration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.1 Assemble the stakeholders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.2 Set objectives and define scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.3 Assess workload and environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.3.1 Workload types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.3.2 ISV applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.3.3 Custom application porting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.3.4 Databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.3.5 Integration with existing network services . . . . . . . . . . . . . . . . . . . . . 16 2.3.6 Other important infrastructure requirements . . . . . . . . . . . . . . . . . . . 17 2.3.7 Special hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.4 Assess skill requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.5 Build a plan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
iii
Part 2. System administration differences guide. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Chapter 3. Operating system installation . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.1 Basic system installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 3.1.1 Graphical or text installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 3.1.2 Other installation methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 3.1.3 System bundle options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.1.4 Linux LVM consideration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.1.5 Linux firewall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 3.2 Advanced installation and automation. . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 3.2.1 Installing using a serial interface as input/output device . . . . . . . . . . 29 3.2.2 Configuring a serial console device . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.2.3 Installing using remote display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 3.2.4 Solaris Jumpstart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 3.2.5 Red Hat Kickstart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 3.2.6 SUSE AutoYaST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 3.2.7 The PXE protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 3.3 Network-based install: Solaris and Linux heterogeneous environments . . 47 3.3.1 Solaris system serving Linux network installation . . . . . . . . . . . . . . . 47 3.3.2 Linux system serving Solaris network installation . . . . . . . . . . . . . . . 50 Chapter 4. Disks and file systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 4.1 Disks and disk partitioning. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 4.1.1 Disks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 4.1.2 Disk partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 4.2 Disk-based file system management . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 4.3 Virtual file systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 4.4 Network File System (NFS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 4.5 Swap file systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 4.6 File system journaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 4.7 File system organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 4.8 AutoFSCK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 4.9 AutoFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 4.10 Solaris Volume Manager to Linux LVM . . . . . . . . . . . . . . . . . . . . . . . . . . 65 4.11 VERITAS VxVM and VxFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Chapter 5. Software management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 5.1 Packages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 5.1.1 Package management in Solaris . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 5.1.2 Package management in Linux. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 5.2 Patching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 5.2.1 Patching in Solaris . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 5.2.2 Patching in Linux. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 5.3 Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
iv
5.3.1 Dependency management in Solaris . . . . . . . . . . . . . . . . . . . . . . . . 80 5.3.2 Dependency management in Linux. . . . . . . . . . . . . . . . . . . . . . . . . . 80 5.4 Package distribution methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 5.5 Automated software management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 5.5.1 Automated software management in Solaris . . . . . . . . . . . . . . . . . . 81 5.5.2 Automated software management in Linux . . . . . . . . . . . . . . . . . . . . 81 5.6 Activating fixes after updating . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 5.6.1 Patch activation in Solaris . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 5.6.2 Patch activation in Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 5.7 Compiling patches in Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 Chapter 6. Device management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 6.1 Device access and configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 6.1.1 Device naming and access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 6.1.2 Displaying device configuration information . . . . . . . . . . . . . . . . . . . 89 6.1.3 Adding a device. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 6.1.4 Hot-plug devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 6.2 Removable media devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 6.2.1 Supported types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 6.2.2 Managing and accessing removable media . . . . . . . . . . . . . . . . . . . 94 6.2.3 Formatting removable media . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 6.2.4 CDs and DVDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 6.2.5 Tape drives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 6.3 Terminals and modems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 6.3.1 Terminal setup and initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 6.3.2 Modem setup tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 6.3.3 Serial port management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 6.3.4 Port monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 6.4 Distribution-based device management tools . . . . . . . . . . . . . . . . . . . . . 105 Chapter 7. Network services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 7.1 IPv4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 7.2 IPv6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 7.3 Mixed IPv4 and IPv6 networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 7.4 Static and dynamic routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 7.5 IPSec and IKE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 7.6 Network multipath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 7.7 Network trunking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 7.8 IP network services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 7.8.1 inetd-based versus xinetd-based network services . . . . . . . . . . . . 117 7.8.2 DHCP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 7.8.3 DNS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 7.8.4 NTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Contents
7.8.5 LDAP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 7.8.6 NIS and NIS+ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 7.8.7 NFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 7.8.8 Web proxy and cache servers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 7.8.9 Mail services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 7.9 TCP wrappers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 7.10 IP stateful firewalling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 Chapter 8. Boot and system initialization . . . . . . . . . . . . . . . . . . . . . . . . . 125 8.1 Booting a system. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 8.1.1 Booting types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 8.1.2 Booting sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 8.1.3 Booting process overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 8.2 Run levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 8.3 Boot configuration files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 8.3.1 /etc/inittab file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 8.3.2 Run control files (rc files). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 8.3.3 Disabling rc scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 8.4 Shutting down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 8.5 Network booting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 Chapter 9. Managing system resources . . . . . . . . . . . . . . . . . . . . . . . . . . 139 9.1 Displaying system information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 9.2 Resource management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 9.3 Starting and stopping system services . . . . . . . . . . . . . . . . . . . . . . . . . . 141 9.3.1 Solaris system services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 9.3.2 Linux system services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 9.4 Scheduling and cron services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 9.5 Quotas. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 9.6 Process accounting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 9.6.1 Solaris . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 9.6.2 Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 9.7 Remote system management services . . . . . . . . . . . . . . . . . . . . . . . . . . 147 9.7.1 Web-Based Enterprise Management (WBEM) . . . . . . . . . . . . . . . . 147 9.7.2 Simple Network Management Protocol (SNMP) . . . . . . . . . . . . . . . 149 Chapter 10. Printing services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 10.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 10.2 Linux CUPS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 10.3 Client and server setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 10.4 Printer management using the lp commands . . . . . . . . . . . . . . . . . . . . 154 10.5 Printer types and CUPS support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 Chapter 11. Users and groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
vi
11.1 Basic user administration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 11.2 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 11.2.1 Adding user accounts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 11.2.2 Changing user account information . . . . . . . . . . . . . . . . . . . . . . . 161 11.2.3 Removing user accounts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 11.2.4 Home directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 11.3 Directory services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 11.4 NIS and NIS+ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 11.5 User ID and group ID differences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 Chapter 12. Monitoring and performance . . . . . . . . . . . . . . . . . . . . . . . . . 173 12.1 Processors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 12.2 Real and virtual memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 12.3 Physical media, software RAID, LVM, and file systems . . . . . . . . . . . . 176 12.3.1 Logical volume groups and logical volumes . . . . . . . . . . . . . . . . . 177 12.3.2 File systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 12.4 Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 12.5 System and user processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 Chapter 13. Backup and restore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 13.1 Common backup tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 13.2 Compression tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 13.3 File system backup and restore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 13.3.1 Solaris overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 13.3.2 Linux overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 13.4 File system snapshots. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 13.5 AMANDA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 Chapter 14. Security and hardening . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 14.1 Patching and security updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 14.2 Security hardening . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 14.2.1 Hardening tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 14.2.2 Auditing: ASET/BSM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 14.3 Securing and removing services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 14.3.1 inetd/xinetd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 14.3.2 TCP wrappers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 14.3.3 FTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 14.4 Kernel tuning for security. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 14.5 Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 14.6 Access control lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 14.7 PAM. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 14.7.1 PAM module types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 14.7.2 Limiting superuser login to secure terminals . . . . . . . . . . . . . . . . . 196 14.7.3 Restricting user login. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Contents
vii
14.8 umask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 14.9 SSH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 14.10 IPSec and IKE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198 14.11 Kerberos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 14.12 Warning banners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202 14.13 Firewalls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202 Chapter 15. Linux high availability overview . . . . . . . . . . . . . . . . . . . . . . 205 15.1 Introduction to Linux-HA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 15.1.1 Migration scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 15.1.2 Some features of Linux-HA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 15.2 Linux-HA services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207 15.2.1 Heartbeat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207 15.2.2 Cluster Resource Manager (CRM) . . . . . . . . . . . . . . . . . . . . . . . . 207 15.2.3 Consensus Cluster Membership (CCM) . . . . . . . . . . . . . . . . . . . . 208 15.2.4 Local Resource Manager (LRM) . . . . . . . . . . . . . . . . . . . . . . . . . . 208 15.2.5 STONITH daemon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 15.3 Linux migration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 15.4 Cluster environment considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . 209 15.4.1 Data sharing arrangements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209 15.4.2 IBM ServeRAID. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209 Chapter 16. Shell scripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211 16.1 Overview of the shell environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 16.1.1 Solaris shell environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 16.1.2 Linux shell environments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 16.2 Public Domain Korn shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 16.3 Moving from ksh to bash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 Chapter 17. Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 17.1 Troubleshooting the booting process . . . . . . . . . . . . . . . . . . . . . . . . . . 216 17.2 Core files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 17.3 Crash dumps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 17.4 Logs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 17.5 Permissions: File access problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222 17.5.1 Problem: Command not found . . . . . . . . . . . . . . . . . . . . . . . . . . . 222 17.5.2 Problem: File access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 17.6 Printing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 17.6.1 Troubleshooting remote printer connectivity . . . . . . . . . . . . . . . . . 224 17.6.2 Troubleshooting local printers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224 17.7 File systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 17.7.1 Remote file systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 17.7.2 Software RAID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227 17.7.3 Logical volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
viii
17.8 Packages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227 17.9 root password recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 17.10 Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 17.11 System and user processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231 17.12 Diagnostic and debugging tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 Part 3. IBM eServer platforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235 Chapter 18. IBM eServer xSeries hardware platform specifics. . . . . . . . 237 18.1 Installation considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238 18.1.1 xSeries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238 18.1.2 BladeCenter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 18.2 Hardware and device differences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 18.2.1 xSeries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240 18.2.2 BladeCenter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244 18.3 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 Chapter 19. IBM POWER technology hardware platform specifics . . . . 247 19.1 Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 19.1.1 IBM eServer i5 and eServer p5 . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 19.1.2 IBM eServer BladeCenter JS20 . . . . . . . . . . . . . . . . . . . . . . . . . . 254 19.2 Booting and system initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 19.2.1 IBM eServer i5 and eServer p5 . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 19.2.2 eServer BladeCenter JS20 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 19.3 Linux installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 19.3.1 eServer i5 and eServer p5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 19.3.2 eServer BladeCenter JS20 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 19.3.3 Red Hat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279 19.3.4 Novell SUSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280 19.3.5 YaBoot OpenFirmware boot loader. . . . . . . . . . . . . . . . . . . . . . . . 283 19.4 eServer i5 and eServer p5 virtualization . . . . . . . . . . . . . . . . . . . . . . . . 284 19.4.1 Create a virtual I/O server partition profile . . . . . . . . . . . . . . . . . . 285 19.4.2 Create a client partition profile . . . . . . . . . . . . . . . . . . . . . . . . . . . 291 19.4.3 Configure Linux on a virtual I/O server . . . . . . . . . . . . . . . . . . . . . 295 19.4.4 Configure Linux on a virtual client partition . . . . . . . . . . . . . . . . . . 302 19.5 POWER technology platform service and productivity tools . . . . . . . . . 303 19.5.1 Red Hat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304 19.5.2 Novell SUSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304 19.6 References and further readings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304 Chapter 20. IBM eServer zSeries and IBM System z hardware platform specifics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307 20.1 Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309 20.1.1 Hardware resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
Contents
ix
20.1.2 Software resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 20.1.3 Networking resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 20.1.4 Linux distributions and z/VM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 20.2 S/390 and zSeries overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 20.2.1 Processing units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 20.2.2 Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 20.2.3 The channel subsystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313 20.2.4 Tape drives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315 20.2.5 Disk drives. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315 20.2.6 Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316 20.2.7 Printers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 20.2.8 Logical partition concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 20.2.9 Virtualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320 20.3 Installation methods and techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . 320 20.3.1 Preparing the z/VM guest resources . . . . . . . . . . . . . . . . . . . . . . . 321 20.3.2 Server farms or cloned environments . . . . . . . . . . . . . . . . . . . . . . 321 20.4 Booting, system initialization, and shutdown . . . . . . . . . . . . . . . . . . . . . 326 20.5 Device management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 20.5.1 Linux reconfigurability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 20.5.2 DASD hot-plug example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328 20.6 Performance monitoring and tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 20.6.1 Performance monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 20.6.2 Performance tuning. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333 20.7 Troubleshooting and diagnostics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334 20.7.1 z/VM troubleshooting and diagnostics . . . . . . . . . . . . . . . . . . . . . 334 20.7.2 Linux troubleshooting and diagnostics . . . . . . . . . . . . . . . . . . . . . 335 20.8 S/390 and zSeries-specific Linux commands . . . . . . . . . . . . . . . . . . . . 335 20.8.1 Packages specifically for the mainframe . . . . . . . . . . . . . . . . . . . . 336 20.8.2 Commands specifically for the mainframe . . . . . . . . . . . . . . . . . . 336 20.9 High availability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338 20.9.1 Hardware HA. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338 20.9.2 z/VM HA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338 20.9.3 Automating Linux guest boot and shutdown . . . . . . . . . . . . . . . . . 339 20.9.4 Linux-HA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340 20.9.5 Backup and recovery options . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340 20.10 Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341 20.11 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342 Part 4. Appendixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343 Appendix A. Tasks reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345 Packaging. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346 Installing and upgrading tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
Booting and shutting down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348 User management tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351 Device management and configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352 Network management and configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353 NFS management and configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354 Managing system resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354 Managing system services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355 Managing scheduling and cron . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356 Managing quota . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356 Managing process accounting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357 Printer management and configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357 Disk and file system management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358 Swap management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359 Logical volume management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359 General troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362 Network troubleshooting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363 Appendix B. Commands and configuration files reference . . . . . . . . . . 365 Configuration and other files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366 Comparable commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367 Common Solaris and Linux commands . . . . . . . . . . . . . . . . . . . . . . . . . . 369 Appendix C. UNIX to Linux Porting: A Comprehensive Reference (table of contents and sample chapter) . . . . . . . . . . . . . . . . . . . . . . . 371 Table of contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372 Chapter 1 Porting Project Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . 373 Software Application Business Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373 The Porting Process. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374 Defining Project Scope and Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378 Estimating. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380 Creating a Porting Project Schedule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 Porting Process from a Business Perspective . . . . . . . . . . . . . . . . . . . . . . . . 387 Annotated Sample Technical Questionnaire . . . . . . . . . . . . . . . . . . . . . . . . . 387 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394 Appendix D. Example: System information gathering script . . . . . . . . . 397 Appendix E. Additional material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401 Locating the Web material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402 Using the Web material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402 Related publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403 IBM Redbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403 Other publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404
Contents
xi
Online resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405 How to get IBM Redbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411 Help from IBM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413
xii
Notices
This information was developed for products and services offered in the U.S.A. IBM may not offer the products, services, or features discussed in this document in other countries. Consult your local IBM representative for information on the products and services currently available in your area. Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any IBM intellectual property right may be used instead. However, it is the user's responsibility to evaluate and verify the operation of any non-IBM product, program, or service. IBM may have patents or pending patent applications covering subject matter described in this document. The furnishing of this document does not give you any license to these patents. You can send license inquiries, in writing, to: IBM Director of Licensing, IBM Corporation, North Castle Drive Armonk, NY 10504-1785 U.S.A. The following paragraph does not apply to the United Kingdom or any other country where such provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you. This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time without notice. Any references in this information to non-IBM Web sites are provided for convenience only and do not in any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the materials for this IBM product and use of those Web sites is at your own risk. IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring any obligation to you. Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products. This information contains examples of data and reports used in daily business operations. To illustrate them as completely as possible, the examples include the names of individuals, companies, brands, and products. All of these names are fictitious and any similarity to the names and addresses used by an actual business enterprise is entirely coincidental. COPYRIGHT LICENSE: This information contains sample application programs in source language, which illustrates programming techniques on various operating platforms. You may copy, modify, and distribute these sample programs in any form without payment to IBM, for the purposes of developing, using, marketing or distributing application programs conforming to the application programming interface for the operating platform for which the sample programs are written. These examples have not been thoroughly tested under all conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of these programs. You may copy, modify, and distribute these sample programs in any form without payment to IBM for the purposes of developing, using, marketing, or distributing application programs conforming to IBM's application programming interfaces.
xiii
Trademarks
The following terms are trademarks of the International Business Machines Corporation in the United States, other countries, or both: AIX 5L AIX BladeCenter DB2 developerWorks DFSMSdss Domino Enterprise Storage Server ESCON Eserver FICON HiperSockets i5/OS IBM iSeries Lotus Micro-Partitioning OpenPower OS/390 POWER5 POWER PR/SM pSeries RACF RDN Redbooks (logo) Redbooks RMF RS/6000 S/390 ServeRAID System p5 System z9 System z Tivoli TotalStorage VSE/ESA WebSphere Workplace xSeries z/OS z/VM z9 zSeries
The following terms are trademarks of other companies: iPlanet, CacheFS, Java, JavaScript, Portmapper, Solaris, Solstice, Solstice DiskSuite, Sun, Sun Microsystems, SunOS, SunScreen, and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. Microsoft, MS-DOS, Windows, and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both. Intel, Intel logo, Intel Inside logo, and Intel Centrino logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States, other countries, or both. UNIX is a registered trademark of The Open Group in the United States and other countries. Linux is a trademark of Linus Torvalds in the United States, other countries, or both. Other company, product, or service names may be trademarks or service marks of others.
xiv
Preface
The goal of this IBM Redbook is to provide a technical reference for IT system administrators in organizations that are considering a migration from Sun Solaris to Linux-based systems. We present a system administrator view of the technical differences and methods necessary to complete a successful migration to Linux-based systems, including covering the differences between major Linux distributions and IBM server and storage platforms. This book is designed primarily to be a reference work for the experienced Sun Solaris 8 or 9 system administrator who will be working with Linux. It is not a Linux administration how-to book for beginning system administrators, but rather a guide for experienced administrators who need to translate a given Solaris system administration task to Linux. We organize this book into four main parts. In Part 1, Background and planning on page 1, we provide an introduction the topic and a general purpose planning guide for migrations. Part 2, System administration differences guide on page 21 covers of a broad set of system administration topics. Chapters in this part focus on specific configuration management tasks and system functions for which a system administrator is typically responsible. In each chapter, we present the topics with the goal of identifying the major differences between how the tasks and functions are managed in Solaris and Linux. Wherever possible, we also highlight any differences in how those tasks are accomplished between Red Hat Enterprise Linux (RHEL) and SUSE Linux Enterprise Server (SLES). Because it would be impossible to provide a comprehensive reference about each topic in a single volume, we provide links to find more detailed information about the topics presented in each chapter. In Part 3, IBM eServer platforms on page 235, we provide technical implementation details for installing and running Linux on IBM Eserver platforms. We do not attempt to provide a complete reference for running Linux on each IBM platform. Instead, we focus on the Linux administration tasks that change due to hardware differences, such as boot configuration or virtualization functions. To accomplish this, we identify and explain how to leverage the additional industry-leading technologies in IBM Eserver xSeries, IBM POWER technology (iSeries/pSeries), and IBM Eserver zSeries systems
xv
and IBM System z that make them very powerful and flexible platforms for hosting Linux-based solutions. Part 4, Appendixes on page 343 provides quick reference tables for looking up Solaris to Linux task equivalencies, comparing system configuration files and locations, and using comparable commands (different name, comparable function) and common commands (same name and purpose). In Part 4, we also include a sample chapter from the following related publication: Mendoza, et al., UNIX to Linux Porting: A Comprehensive Reference, Prentice Hall, 2006, ISBN 0131871099 Along with the sample chapter, we include link information so that you can order the UNIX to Linux Porting book at a discounted price.
xvi
day-to-day operational support for various commercial outsourcing accounts in Canada, as well as some IBM internal servers. His interests include writing scripts and programs to automate specific tasks. He currently resides in Calgary, Alberta, Canada. Paul Ionescu is a Senior IT Specialist working for IBM Global Services Romania. He has more than 10 years of Linux and 7 years of Sun Solaris systems administration experience focusing on networking and security. He is a Sun Certified System Administrator and Network Administrator for Solaris 9, a Certified Information Systems Security Professional (CISSP), a Cisco Certified Internetworking Expert (CCIE), a Cisco Certified System Instructor, and a Red Hat Certified Engineer (RHCE), and holds several other Linux, networking, and security certifications. He is currently focused on network engineering projects for the ISP, telco, and banking industries, and is also helping customers migrate from other operating systems to the Linux OS. Paul joined IBM in 2000. Jeff Richardson is an Advisory Software Engineer in the IBM Software Group Linux Integration Center. Jeff has a bachelor of arts degree in Computer Science from Saint Edward's University and is an IBM Certified Database Administrator for IBM DB2 UDB V8.1 for Linux, UNIX, and Microsoft Windows. Jeff has worked for IBM for more than 23 years. His first assignment was an OS/MVS and z/VM system operator and analyst. Since then, he has worked with IBM Middleware products on different operating systems and hardware platforms in functional and system test teams. Jeff currently develops educational material and provides pre-sales technical support for IBM Middleware products running on xSeries, pSeries, and zSeries for Linux. Kurt Taylor is a Senior Software Engineer at the IBM Linux Technology Center, located in Austin, Texas. Kurt is currently a Technical Team Leader for the Linux System Management Team. He has worked at IBM for 10 years, and has more than 17 years of industry experience architecting, designing, and developing distributed network and system management products. He is currently working with the OpenPegasus project and the OSDL Desktop Linux work group. Kurt graduated from the University of North Texas with a bachelor of science degree in Computer Science. Robbie Williamson is an Advisory Software Engineer working in the IBM Linux Technology Center (LTC). He is currently the IBM Eserver Red Hat Linux Test Architect. Robbie has a bachelors degree in Computer Science and is completing his masters degree in Engineering Management from the University of Texas at Austin. He has more than seven years of UNIX/Linux experience, including IBM AIX 5L technical support and testing, Hewlett-Packard HP-UX development, and Linux development and testing. He is also an open source project maintainer for the Linux Test Project.
Preface
xvii
Production of this IBM Redbook was managed by: Chris Almond, an ITSO Project Leader and IT Architect based at the ITSO Center in Austin, Texas. In his current role, he specializes in managing content development projects focused on Linux and AIX 5L systems engineering. He has a total of 15 years of IT industry experience, including the last six with IBM.
Acknowledgements
A complete and detailed Redbook about a topic such as this would not have been possible without the support of the IBM Worldwide Linux team, the IBM Linux Technology Center, and the IBM Systems and Technology Group. The primary sponsors supporting development of this book include: Terese Johnson, Susanne Libischer, Mark Brown, Susan Greenlee, Connie Blauwkamp, and John Milford Additional content for this book was provided by Alan Robertson, an IBM employee and a lead developer in the High Availability Linux project. The Redbook team would like to acknowledge the following people for their contribution of draft review feedback in support of this project: Roland Caris, Shane Kilmon, Cliff Laking, Michael MacIsaac, Stephen Wehr, Elton Rajaniemi, and Jeroen van Hoof The team would also like to acknowledge the support efforts of Greg Geiselhart and Stephen Hochstetler from IBM ITSO, Lucy Ringland from Red Hat Inc., Steve Hansen from Novell Inc., and our editor for this book, Elizabeth Barnes, from our ITSO Authoring Services team.
xviii
Find out more about the residency program, browse the residency index, and apply online at:
ibm.com/redbooks/residencies.html
Comments welcome
Your comments are important to us! We want our Redbooks to be as helpful as possible. Send us your comments about this or other Redbooks in one of the following ways: Use the online Contact us review redbook form found at:
ibm.com/redbooks
Mail your comments to: IBM Corporation, International Technical Support Organization Dept. JN9B Building 905 11501 Burnet Road Austin, Texas 78758-3493
Preface
xix
xx
Part 1
Part
Chapter 1.
Introduction
This chapter introduces Linux and the topic of the system administration of the Linux operating system from the perspective of administrators familiar with the Solaris operating system versions 8 or 9 and who are planning their first move to a Linux system. This chapter includes the following topics: What is Linux? Linux kernels, distributions, and distributors How this book is organized Linux administration overview Reference materials
Although Linux itself was free, commercial vendors moved in soon in order to make money by gathering and compiling software and thus creating a package easy to install and distribute, more like the other, more familiar commercial operating systems. Today, Linux has been ported to many other platforms, from hand-held devices to mainframes. It is the fastest growing OS in the server market and is used in enterprise as well as single-purpose server installations. The open nature of its development process has led to rapid and frequent additions of features and technologies. Added support for clustering, for example, has enabled highly available and scalable solutions using Linux. Linuxs roots in the UNIX operating system philosophy make it stable, reliable, and expandable, while at the same time, familiar to experienced UNIX users and administrators.
Small UNIX clone designed for IBM PCs and compatibles. It is ideal for educational purposes due to its small size, microkernel-base design, and full documentation. Although MINIX comes with the source code, it is copyrighted software.
Chapter 1. Introduction
Linux distributions all have one thing in common: They provide Linux in source code and binary form. The base code is freely redistributable under the terms of GNU General Public License (GPL) and any non-free and contributed software has to be clearly marked as such. Distributions divide into two main categories: Non-commercial distributions tend to focus on creating technical excellence and follow a design philosophy or manifesto. These distributions do not offer any direct support other than mailing lists and bug reports. They are freely available on the Internet for download, and for the cost of materials and shipping, some can be purchased as a shrink-wrapped product with manuals. Commercial distributions offer training, certification, and support services in addition to their software, which is commercially distributed through official dealer channels or downloadable from the company's Web sites for payment. Most commercial distributions base themselves on non-commercial ones and are available for free download. However, any commercial software bundled with the product is only available on a separate CD for purchase. Some of the best known and widely-used distributions include Red Hat, SUSE, Mandriva, and Debian. This book describes Linux using the operating system sense and in terms of two major distribution vendors: Red Hat (Red Hat Enterprise Linux 4) Red Hat is a well-known Linux and open-source provider. It was founded in 1993. Red Hat Enterprise Linux runs on multiple architectures and is certified by enterprise software and hardware vendors. Red Hat is based on the Linux kernel version 2.6. Novell SUSE (SUSE Linux Enterprise Server 9) The first distribution of SUSE Linux began in 1993. The company was acquired by Novell in 2004. SUSE Linux Enterprise Server 9 (SLES9) is a secure, reliable platform for open-source computing, supporting a range of hardware platforms and software packages. It also provides open APIs and other development tools to help simplify Linux integration and customization. SLES9 includes the Linux kernel version 2.6.
guide for experienced administrators that need to translate a given Solaris administration task to Linux. We organize this book into four main parts: Part 1, Background and planning Part 2, System administration differences guide Part 3, IBM eServer platforms Part 4, Appendixes Each section of the book attempts to outline the considerations for the experienced Solaris system administrator to keep in mind, the new and different tools and features, and where to go for further in-depth information about the topic. The system administration differences guide section provides task-based technical topics in terms of two major Enterprise Linux server distributions (Red Hat Enterprise Linux and SUSE Linux Enterprise Server) where a generic hardware platform is assumed. The IBM Eserver platforms part outlines the administration tasks that change due to hardware differences, such as boot configuration or virtualization functions. This book also includes appendixes, containing direct side-by-side task, command, and configuration file comparisons, for use as a quick reference.
Chapter 1. Introduction
This is just a short list of commonalities. Almost all of a Solaris administrators skills and experience should transfer easily to Linux, with a short learning curve to pick up the differences in the common tools (in most cases small) or learn the equivalent new tools (in some cases).
1.4.1 Documentation
Documentation for Linux comes in several forms, the most common of which are manual pages (man) and HTML (either on the system or over the network). Almost all commands can be referenced through the man command, which works in the same way as on Solaris and is organized in the same manner (sections 1,2, and so on). System guides are usually provided in HTML or PDF format. Some documentation, particularly for parts of the system that come from Free Software Foundation projects, is documented using the info tool. The C library (GNU libc, or glibc) is one example of this. This is a command line tool that operates as a full-screen, text-based GUI. It has an extensive built-in help system, but requires some time to learn. For basic information about the info tool, use the command man info.
1.4.2 Utilities
Some of the most common software packages that are used to manage your Linux servers include: YaST and YaST2 for SUSE Linux YaST stands for yet another system tool and is a system management GUI. YaST can be started by typing the following command as root on the Linux command line:
~> yast
It contains modules for managing the installation and configuration of the system features. Red Hat setup and system-* utilities setup is the Red Hat implementation of the Linux configuration tool. It is used to configure and manage your Linux server. As system administrator (root) on the Linux command line, start setup by typing the following command on the command line (it will ask for the root password):
~> setup
There are also individual GUI-based utilities for configuration of various system features in the /usr/bin path, as shown in Table 1-1 on page 9.
Table 1-1 Red Hat system configuration GUI tools system-cdinstall-helper system-config-authentication system-config-boot system-config-date system-config-display system-config-httpd system-config-keyboard system-config-language system-config-lvm system-config-mouse system-config-netboot system-config-network system-config-network-cmd system-config-network-druid system-config-nfs system-config-packages system-config-printer system-config-printer-gui system-config-printer-tui system-config-rootpassword system-config-samba system-config-securitylevel system-config-securitylevel-tui system-config-services system-config-soundcard system-config-time system-config-users system-control-network system-install-packages system-logviewer system-switch-im system-switch-mail system-switch-mail-nox
VNC Virtual Network Computing (VNC) is free software that enables you to view and interact with another computer, which might or might not have the same operating system. It gives you a remote desktop view of the other system. VNC or its equivalent is shipped with most Linux distributions. However, the default mode in VNC on Linux provides the connecting party with a new desktop screen, not the console screen as under Microsoft Windows.
1.4.3 Standards
Much like the Solaris OS, there are specifications that cover operations in the Linux space as well. The Linux Standard Base (LSB, http://www.linuxbase.org/) covers the implementation of a conforming Linux environment in much the same way that the Single UNIX Specification (SUS, Open Group) covers the UNIX environment. It covers application programming interfaces (APIs), utilities, software packaging, and installation, and additionally
Chapter 1. Introduction
specifies ABIs for the most common Linux platforms. We recommend that you investigate LSB support when choosing a Linux distribution for use. Linux offers IEEE POSIX compliance where possible in both the API and utilities sets. There is also significant overlap in conformance with the Single UNIX Specification, though Linux cannot be called UNIX.
1.4.4 Support
Because the distributions themselves are made up of free software, the business model of Enterprise Linux distribution vendors typically emphasizes the selling of support and services related to their offerings. These services range from self-help advice forums (for the lower-end or desktop systems) to full 24x7x365 enterprise-level maintenance with support level contracts. Additionally, third parties (including IBM) offer support services related to Linux. Consider support and updates when choosing a distribution. Some of the larger distributors also offer Linux system administration courses.
Open source licenses and how they work: The Free Software Foundation:
http://www.fsf.org/
Application development: Linux Standard Base Team, Building Applications with the Linux Standard Base, IBM Press, 2004, ISBN 0131456954
10
Chapter 2.
11
A communications plan coupled with proper training on the new system should minimize the number of users that fall into the rejection/opposition mode, cause
12
users to start out with acceptance instead of dissatisfaction as the initial response, and lead to a quick transition into exploration and productive use. Regarding the IT support team, these same issues have even more importance. A strategic decision to switch the OS can cause the impression of disapproval of the work they have done so far. It might give staff the impression that their current skills are being devalued. It probably will not be easy to convince an administrator of Solaris systems that migrating to Linux is a good strategy unless you can also convince them that the organization is prepared to make a significant investment in upgrading their skills as well.
13
14
E-mail
Linux offers full sendmail, IMAP, and POP3 support, but at least one major Linux distributor (Novell SUSE Linux Enterprise Server) now offers the new postfix MTA as the default package (while still offering sendmail as an option). The IMAP and POP daemons (and clients) will each have a learning curve for configuration and use. End-user clients should not see a difference between the Solaris and Linux mail service.
Database serving
This type of migration will not only involve an operating system change, but will also involve moving a major application and its data. Both IBM DB2 and Oracle have Linux offerings, in addition to the open-source MySQL and PostgreSQL packages. The IBM Redbook Up and Running with DB2 for Linux, SG24-6899, might be helpful for information about this topic.
Messaging
Messaging systems incorporate some elements of high availability systems and introduce scalability and networking factors as well. Research will be needed to properly specify your Linux equivalent system requirements. IBM offers an entire suite of messaging middleware (our WebSphere and WebSphere MQ lines) for Linux.
15
Business Intelligence
These systems incorporate several types of software (such as data mining and decision support applications) and use data from several different sources. In addition to the software research involved, the system administrator will need to plan for system communication and workload management issues.
2.3.4 Databases
Consider whether you want to move the database and the application, or just one or the other. Database administration is a different but related skill to system administration. These skills are as equally transferable to Linux due to the similarity to UNIX-based systems and the fact that the most popular database offerings on the market are also available for Linux now.
16
Hardware-specific skills
Although almost all of the skills related to managing a Linux system are the same regardless of platform, some of the activities related to the interaction of Linux with the underlying hardware and maintenance of the hardware itself are different
17
based upon the hardware type. This is especially true for larger systems, including IBM Eserver POWER and zSeries platforms. Administrator education might be required for these systems.
The following description from Knoppix further explains what a live CD provides: KNOPPIX is a bootable CD with a collection off GNU/Linux software, automatic hardware detection, and support for many graphics cards, sound cards, SCSI and USB devices and other peripherals. KNOPPIX can be used as a Linux demo, educational CD, rescue system, or adapted and used as a platform for commercial software product demos. It is not necessary to install anything on a hard disk. Due to on-the-fly decompression, the CD can have up to 2 GB of executable software installed on it. A live CD can be used to provide users with the ability to run a bootable Linux system on their desktop. They can use it to test and evaluate the UI, applications, and other facets of the Linux client, before an actual client migration occurs. And this can be done without harming the host operating system installation on the local hard disk. Another benefit of using a live CD as part of a migration plan is for detection of hardware and device problems. The live CD helps validate proper hardware detection and device support and identifies any issues prior to actual client migration.
18
Build in requirements
Consider the following areas: Resources What hardware will be required? Software? Identify what housing issues are required (are the electrical and cooling inputs equal?). What staff will be required to help with the crossover? Education Does the staff have adequate Linux education? Are there special skills required for the hardware or Linux/hardware combination? Service level agreements While the installation, configuration, and testing of the change is taking place, what are the support mechanisms (both yours and those of any vendors)? What are your commitments to current stakeholders while you are performing the migration? Related aspects to project Be sure to set out what other things are happening in addition to the basic system changeover. Identify skills-related requirements
19
20
Part 2
Part
21
These chapters are not a substitute for the Linux documentation, but rather a cross-reference work for an administrator trying to find out what tools are available on Linux to perform a given job. In this part, we focus on the aspects of system administration in Linux that are hardware-neutral. Part 3, IBM eServer platforms on page 235 covers areas of administration that are unique to a given IBM Eserver platform (POWER technology-based, xSeries, and zSeries systems). Throughout this section, we make references to two of the leading Linux enterprise server products, Red Hat Enterprise Linux (RHEL) and SUSE Linux Enterprise Server (SLES). Note: We assume that the reader is an experienced Solaris system administrator who is undertaking (or considering) a migration to Linux. The content in this part of the book should not be used as a substitute for detailed Linux system administration documentation, but rather as a cross-reference work for an administrator trying to find out what tools are available on Linux to perform a given job. The differences guide portion of this book covers the following functional areas: Chapter 3, Operating system installation on page 23 Chapter 4, Disks and file systems on page 51 Chapter 5, Software management on page 75 Chapter 6, Device management on page 85 Chapter 7, Network services on page 107 Chapter 8, Boot and system initialization on page 125 Chapter 9, Managing system resources on page 139 Chapter 10, Printing services on page 151 Chapter 11, Users and groups on page 159 Chapter 12, Monitoring and performance on page 173 Chapter 13, Backup and restore on page 181 Chapter 14, Security and hardening on page 187 Chapter 15, Linux high availability overview on page 205 Chapter 16, Shell scripting on page 211 Chapter 17, Troubleshooting on page 215
22
Chapter 3.
23
24
After you selected these options, the installation continues by itself to complete setting up the partitions, building the file systems, and then installing the software packages. As the installation process continues, and depending on what software packages have been selected, it might prompt for other CDs or DVDs to be inserted when required.
25
In Linux, you have the following additional choices: Another local hard drive partition (can be USB) NFS server FTP server HTTP server SMB or TFTP servers (only for SUSE) A customized Kickstart or AutoYaST installation from any of the available sources of installation For specific information about how to accomplish each of these methods, refer to the detailed installation documentation provided by the vendors.
26
Table 3-1 Logical groupings of software clusters provided by installation Solaris Core: Required operating system files End-user system support: Core plus window environment Developer system support: End user plus the development environment Entire Distribution: Developer system plus enhanced features Entire Distribution Plus OEM: Entire distribution plus third-party hardware drivers (on SPARC only) Red Hat Workstation install (stand-alone client) Developer install (workstation install, plus developer tools, compiler) Server install (server services and software) Full Install (all software/services) Minimal Install (minimum packages for a Linux system) Custom (choose packages manually) SUSE Workstation install (stand-alone client) Developer install (includes developer tools, compiler) Server install (server services and software) Full Install (all software/services) Custom (choose packages manually)
27
If you need to reconfigure or disable the SELinux or the firewall, you can use the system-config-securitylevel command. This opens a UI tool that can be used to set up security options. Another way to disable SELinux without using the UI tool is to edit the /etc/sysconfig/selinux file and change the line from SELINUX=enforcing to SELINUX=disabled. This permanently disables SELinux at the next reboot. For the firewall, you can use the chkconfig command on the iptables service.
28
29
In this example, you might need to adjust the serial parameters to match your actual hardware setup. If you have a VT100 compatible terminal, you can remove the --dumb option from the terminal line. For more information about those parameters, consult the GRUB documentation. Important: If you do not comment out or erase the splashmenu or gfxmenu options from the GRUBs /boot/grub/menu.lst configuration file, it initializes the graphical mode and does not work on your serial as expected. For setting up the serial console for the rest of the Linux system, you have two options: For a temporary solution, at the GRUB boot prompt, edit the boot command line to have console=ttyS0,9600 for the first serial interface at speed of 9600 bps.
1
30
For permanent solution, edit the /boot/grub/menu.lst file and add the previous option to the kernel command line. If you want the console messages to be shown on both the graphical console and on the serial line, you can add the console=ttyS0 console=tty0option. And if you need a login prompt on that serial device, you need to add to the /etc/inittab a line similar to the one shown in Example 3-2.
Example 3-2 Enabling a login prompt on the serial line S0:2345:respawn:/bin/agetty -L 9600 ttyS0 vt100
Direct root login can be enabled on this serial interface by adding a ttyS0 to the end of the /etc/securetty file. For more information about configuring console logins over serial ports, refer to 6.3, Terminals and modems on page 101. Some enterprise-level IA32 platforms come with the serial console activated from the POST. Refer to Part 3, IBM eServer platforms on page 235 for more information.
31
See Additional SLES install boot options on page 282 for more SLES installation options.
32
The following list describes the basic actions Kickstart: It uses a configuration file for a specific server or a group of servers. See Example 3-3 on page 34 and Example 3-4 on page 35 for sample Kickstart files. This configuration file can be supplied in a bootable CD-ROM, bootable diskette, on a network through NFS, FTP, and HTTP, or from a USB flash drive. If you want to install from the network, you can either boot from the network if you have a PXE-enabled system and a network boot server configured, or you can boot from local media such CD, DVD, or USB flash and install the rest of the software from the network. You can use Kickstart for initial installs and upgrades. You can specify the Kickstart file location at the install GRUB prompt with the ks=URL option, or you can use DHCP to supply a Kickstart URL for your client with the ks option. The following sample command line invokes the installation using Kickstart from an NFS server. This line is entered at the GRUB prompt:
linux ks=nfs:/IP_ADDRESS_OF_NFS_SERVER/NFS_PATH/sample-ks.cfg
IP_ADDRESS_OF_NFS_SERVER is the IP address of the server that has the /NFS_PATH directory exported through NFS. That subdirectory contains the sample-ks.cfg file. There are additional steps required to make the network installation work (for example, copying the contents of the CDs or the ISO CD image files to source hard drive). For these instructions, see Red Hat Enterprise Linux 4 Installation Guide for x86, Itaniumtm, AMD64, and Intel@ Extended Memory 64 Technology (Intel@ EM64T) in the chapters Installing Red Hat Enterprise Linux and Performing a Network Installation. The Kickstart configuration file has many options. If used properly, you can do a fully automated, hands-free installation. If you happen to miss an item that the installation needs, it stops the installation at that portion and prompts you to enter what it needs. Items such as disk partitioning, LVM and RAID, software selection, and others can all be defined in the configuration file. You can generate a Kickstart file by using the Kickstart Configurator command system-config-kickstart. This is the graphical-based front end. Or, you can have it automatically generate a Kickstart file for you based on an existing server by issuing the following command:
# system-config-kickstart --generate <output-file-name>
33
When you use the Kickstart Configurator, you set up the following sections: Basic configuration information: Language support, keyboard, mouse, time zone, assign a root password, and so on. Installation method: New installation or upgrade, media source (CD, NFS, FTP, HTTP, or hard drive). Boot loader options: Install a new boot loader or not, set up the GRUB password, install MBR, and assign kernel parameters. Partition information: Set up disk partitioning information, use RAID, LVM, or both. Network configuration: Set up network device, use DHCP, static IP, or BOOTP. Authentication: Set up what method to use for user authentication, shadow file, NIS, LDAP, Kerberos 5, and so on. Firewall configuration: Enable or disable the firewall, set up trusted devices and services. Display configuration: Configure X Window System, set up the video card and monitor, set up the display resolution. Package selection: Select the groups of packages to install (can only select from groups and not individual packages). Preinstallation and post-installation script: Set up customized scripts to run before or after the installation process. There are differences between doing a manual Kickstart selection and a system-generated Kickstart file. See the two sample files in Example 3-3 and Example 3-4 on page 35.
Example 3-3 Sample manual Kickstart configuration file #Generated by Kickstart Configurator #platform=x86, AMD64, or Intel EM64T #System language lang en_US #Language modules to install langsupport en_US #System keyboard keyboard us #System mouse mouse #Sytem timezone timezone America/Edmonton #Root password rootpw --iscrypted $1$IRIk0Ucb$gYVbwzLZ62TsYX8IYEN.60
34
#Reboot after installation reboot #Use text mode install text #Use interactive kickstart installation method interactive #Install OS instead of upgrade install #Use NFS installation Media nfs --server=9.3.5.11 --dir=/vm/rhel #System bootloader configuration bootloader --location=mbr #Clear the Master Boot Record zerombr yes #Partition clearing information clearpart --all --initlabel #Disk partitioning information part / --fstype ext3 --size 3000 part swap --size 512 #System authorization infomation auth --useshadow --enablemd5 #Network information network --bootproto=dhcp --device=eth0 #Firewall configuration firewall --disabled #XWindows configuration information xconfig --depth=8 --resolution=1024x768 --defaultdesktop=GNOME #Package install information %packages --resolvedeps #@ base-x #@ kde-desktop #@ editors #@ graphical-internet #@ server-cfg #@ admin-tools #@ system-tools #@ printing #@ compat-arch-support
Example 3-4 Sample system-generated Kickstart file from an existing server #Generated by Kickstart Configurator #platform=x86, AMD64, or Intel EM64T #System language lang en_US #Language modules to install langsupport en_US en --default=en_US
35
#System keyboard keyboard us #System mouse mouse #Sytem timezone timezone America/North_Dakota/Center #Root password rootpw --iscrypted $1$74WxlsHg$WHkNT3cVQjiNQA2u1.HrG. #Install OS instead of upgrade install #Use CDROM installation media cdrom #Clear the Master Boot Record zerombr yes #Partition clearing information clearpart --linux #Package install information %packages resolvedeps 4Suite Canna Canna-devel Canna-libs ElectricFence FreeWnn FreeWnn-devel FreeWnn-libs GConf2 GConf2-devel . . .(long list of packages cutout here) . . xorg-x11-xfs xpdf xrestop xsane xsane-gimp xscreensaver xsri xterm yelp yp-tools ypbind ypserv zip zisofs-tools zlib zlib-devel
36
zsh zsh-html
A manually generated file enables you to customize the information. As for a system-generated one, it picks up only a few of the components. The following components are not gathered by the system-generated Kickstart file. The installation is defaulted to CD-ROM. You might want to change this if doing a network installation. Disk partitioning layout Boot loader setting Authentication method setting Network settings Firewall settings X Window System settings, if required Depending on what you want to achieve, you can combine the two methods to generate a more complete Kickstart file. If your target server will have the same basic software and package configuration as the current server, you can have the system generate a configuration file and have Kickstart open that file and you can customize all the missing components mentioned earlier. Refer to the Red Hat System Administration Guide for more information about the Kickstart installation.
37
A sample command line to invoke the installation using AutoYaST from an NFS server follows. Enter this line at the GRUB prompt:
install=nfs://IP_ADDRESS_OF_NFS_SERVER/NFS_PATH/ autoyast=nfs://IP_ADDRESS_OF_NFS_SERVER/NFS_PATH/sample-autoyast.xml
Enter these two lines as one line. The IP_ADDRESS_OF_NFS_SERVER is the IP address of the server that has exported through NFS the /NFS_PATH directory. That subdirectory contains also the sample-autoyast.xml file. There are additional steps required to for the network installation, such as copying the contents of the CDs to the hard drive. You can use the yast2 instserver program to copy the install media to the server and configure the relevant services such as SLP, NFS, HTTP, and FTP. Refer to the SUSE Linux AutoYaST Automatic Linux Installation documentation for more information. The AutoYaST control file enables very granular control of the installation process. If used properly, you can do a fully automated, hands-free installation. If you happen to miss an item that the installation needs, it stops the installation at that portion and prompts you to enter what it needs. Items, such as disk partitioning, LVM and RAID, software selection, and others, can all be defined in the control file. You can generate an AutoYaST control file by using the YaST command yast2 autoyast (graphical-based) or yast autoyast (text-based). Unlike Red Hat Kickstart, AutoYaST does not provide a way to automatically generate a control file based on a currently running server. The control file enables you to have much more granular control of system options, that is, up to the /etc/sysconfig settings, as well as the settings for the installation itself. The following list of options are available to you: Software setup: Online update (if enabled): What time of day If download patches only or whole packages
Software packages: Which group of packages to install. After you have selected your choice from the following list, you also have the option to do a detailed selection of packages: Minimum system Minimum graphical system (without KDE) Full installation Default system
Hardware setup: Partitioning for hard drives, use RAID, LVM, or both.
38
Printer configuration: Use direct connects, CUPS, LPD-style, and so on. Sound card configuration. Graphics card and monitor configuration: Enable X Window System, 3D support, color depth, display resolution, and so on. System setup: Boot loader configuration: Set up GRUB, location, and sections. General options: Language support, time zone, hardware clock, keyboard, mouse, and so on. Report and logging options: Enable or disable logging of messages, warnings, and errors. Restore module: Restore files from an archive device or location as part of the installation process. Runlevel editor: Configure the default run level and what services to enable or disable for each run level. /etc/sysconfig editor: Preconfigure kernel values. Network device setup: Set up the type of network device and whether to use DHCP or static IP, set up host name and name server, routing information, and others. Network service setup: Configure DHCP server, DNS server, host names, HTTP server, LDAP server/client, NFS server/client, NIS server/client, Samba server/client, and others. Security and users setup: Configure CAs, certificates, firewalls, VPN, security settings, and create and edit users. Miscellaneous setup: Configure or preload customized application configuration files, set up custom preinstallation and post-installation scripts. When doing the partitioning, note that the default size it uses when you allocate a size for a partition is in kilobytes (KB). You can also enter mb, MB, gb, or GB to the end of the partition size. Example 3-5 shows a sample AutoYaST file.
Example 3-5 Sample AutoYaST file <?xml version="1.0"?> <!DOCTYPE profile SYSTEM "/usr/share/autoinstall/dtd/profile.dtd"> <profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.c om/1.0/configns"> <configure> <networking>
39
<dns> <dhcp_hostname config:type="boolean">false</dhcp_hostname> <dhcp_resolv config:type="boolean">false</dhcp_resolv> <domain>labtest.com</domain> <hostname>sles9serv</hostname> <nameservers config:type="list"> <nameserver>9.3.5.2</nameserver> <nameserver>9.3.5.254</nameserver> </nameservers> <searchlist config:type="list"> <search>labtest.com</search> </searchlist> </dns> <interfaces config:type="list"> <interface> <bootproto>static</bootproto> <broadcast>9.3.5.255</broadcast> <device>eth0</device> <ipaddr>9.3.5.7</ipaddr> <netmask>255.255.255.0</netmask> <network>9.3.5.0</network> <startmode>onboot</startmode> </interface> </interfaces> <modules config:type="list"> <module_entry> <device>static-0</device> <module></module> <options></options> </module_entry> </modules> <routing> <ip_forward config:type="boolean">false</ip_forward> <routes config:type="list"> <route> <destination>default</destination> <device>-</device> <gateway>9.3.5.1</gateway> <netmask>-</netmask> </route> </routes> </routing> </networking> <printer> <cups_installation config:type="symbol">server</cups_installation> <default>local_lp0</default> <printcap config:type="list"> <printcap_entry> <ff config:type="boolean">false</ff>
40
<info>Local parallel printer</info> <location>Local direct connection to LPT1</location> <manufacturer>HP</manufacturer> <model>HP LaserJet 5</model> <name>local_lp0</name> <nick>HP LaserJet 5 Foomatic/hpijs (recommended)</nick> <options config:type="list"/> <ppd_options config:type="list"> <ppd_option> <key>Copies</key> <value>1</value> </ppd_option> <ppd_option> <key>Duplex</key> <value>None</value> </ppd_option> <ppd_option> <key>Economode</key> <value>Off</value> </ppd_option> <ppd_option> <key>InputSlot</key> <value>Default</value> </ppd_option> <ppd_option> <key>MPTray</key> <value>First</value> </ppd_option> <ppd_option> <key>PageSize</key> <value>A4</value> </ppd_option> <ppd_option> <key>PrintoutMode</key> <value>Normal</value> </ppd_option> <ppd_option> <key>Quality</key> <value>FromPrintoutMode</value> </ppd_option> <ppd_option> <key>REt</key> <value>Medium</value> </ppd_option> <ppd_option> <key>TonerDensity</key> <value>5</value> </ppd_option> </ppd_options>
41
<raw config:type="boolean">false</raw> <uri>parallel:/dev/lp0</uri> </printcap_entry> </printcap> <server_hostname></server_hostname> <spooler>cups</spooler> </printer> <security> <console_shutdown>reboot</console_shutdown> <cracklib_dict_path>/usr/lib/cracklib_dict</cracklib_dict_path> <cwd_in_root_path>yes</cwd_in_root_path> <cwd_in_user_path>yes</cwd_in_user_path> <displaymanager_remote_access>no</displaymanager_remote_access> <enable_sysrq>no</enable_sysrq> <fail_delay>3</fail_delay> <faillog_enab>yes</faillog_enab> <gid_max>60000</gid_max> <gid_min>1000</gid_min> <kdm_shutdown>all</kdm_shutdown> <lastlog_enab>yes</lastlog_enab> <obscure_checks_enab>yes</obscure_checks_enab> <pass_max_days>99999</pass_max_days> <pass_max_len>7</pass_max_len> <pass_min_days>0</pass_min_days> <pass_min_len>5</pass_min_len> <pass_warn_age>7</pass_warn_age> <passwd_encryption>des</passwd_encryption> <passwd_use_cracklib>yes</passwd_use_cracklib> <permission_security>secure</permission_security> <run_updatedb_as>nobody</run_updatedb_as> <system_gid_max>499</system_gid_max> <system_gid_min>100</system_gid_min> <system_uid_max>499</system_uid_max> <system_uid_min>100</system_uid_min> <uid_max>60000</uid_max> <uid_min>500</uid_min> <useradd_cmd>/usr/sbin/useradd.local</useradd_cmd> <userdel_postcmd>/usr/sbin/userdel-post.local</userdel_postcmd> <userdel_precmd>/usr/sbin/userdel-pre.local</userdel_precmd> </security> <x11> <color_depth config:type="integer">16</color_depth> <configure_x11 config:type="boolean">true</configure_x11> <display_manager>kdm</display_manager> <enable_3d config:type="boolean">false</enable_3d> <monitor> <display> <frequency config:type="integer">60</frequency> <height config:type="integer">768</height>
42
<width config:type="integer">1024</width> </display> <monitor_device>1024X768@60HZ</monitor_device> <monitor_vendor> LCD</monitor_vendor> </monitor> <resolution>1024x768</resolution> <window_manager>kde</window_manager> </x11> </configure> <install> <bootloader> <activate config:type="boolean">true</activate> <global config:type="list"> <global_entry> <key>color</key> <value>white/blue black/light-gray</value> </global_entry> <global_entry> <key>default</key> <value config:type="integer">0</value> </global_entry> <global_entry> <key>timeout</key> <value config:type="integer">8</value> </global_entry> <global_entry> <key>gfxmenu</key> <value>/boot/message</value> </global_entry> </global> <loader_device>/dev/sda</loader_device> <loader_type>grub</loader_type> <location>mbr</location> <repl_mbr config:type="boolean">false</repl_mbr> <sections config:type="list"> <section config:type="list"> <section_entry> <key>title</key> <value>Linux</value> </section_entry> <section_entry> <key>kernel</key> <value>/boot/vmlinuz root= vga=0x314 selinux=0 splash=silent resume= showopts elevator=cfq</value> </section_entry> <section_entry> <key>initrd</key> <value>/boot/initrd</value>
43
</section_entry> </section> <section config:type="list"> <section_entry> <key>title</key> <value>Hard Disk</value> </section_entry> <section_entry> <key>root</key> <value>(hd0)</value> </section_entry> <section_entry> <key>chainloader</key> <value>+1</value> </section_entry> </section> <section config:type="list"> <section_entry> <key>title</key> <value>Failsafe</value> </section_entry> <section_entry> <key>kernel</key> <value>/boot/vmlinuz root= showopts ide=nodma apm=off acpi=off vga=n ormal noresume selinux=0 barrier=off nosmp noapic maxcpus=0 </section_entry> <section_entry> <key>initrd</key> <value>/boot/initrd</value> </section_entry> </section> </sections> </bootloader> <general> <clock> <hwclock>localtime</hwclock> <timezone>US/Central</timezone> </clock> <keyboard> <keymap>english-us</keymap> </keyboard> <language>en_US</language> <mode> <confirm config:type="boolean">true</confirm> <forceboot config:type="boolean">true</forceboot> </mode> <mouse> <id>probe</id> 3</value>
44
</mouse> </general> <partitioning config:type="list"> <drive> <device>/dev/hda</device> <initialize config:type="boolean">false</initialize> <partitions config:type="list"> <partition> <crypt>twofish256</crypt> <filesystem config:type="symbol">reiser</filesystem> <format config:type="boolean">true</format> <loop_fs config:type="boolean">false</loop_fs> <mount>/</mount> <partition_id config:type="integer">131</partition_id> <size>4000</size> </partition> <partition> <crypt>twofish256</crypt> <format config:type="boolean">false</format> <loop_fs config:type="boolean">false</loop_fs> <mount></mount> <partition_id config:type="integer">130</partition_id> <size>512</size> </partition> </partitions> <use>free</use> </drive> <drive> <device>/dev/hdb</device> <initialize config:type="boolean">false</initialize> <partitions config:type="list"> <partition> <crypt>twofish256</crypt> <format config:type="boolean">false</format> <loop_fs config:type="boolean">false</loop_fs> <mount>/var</mount> <partition_id config:type="integer">142</partition_id> <size>2048</size> </partition> <partition> <crypt>twofish256</crypt> <format config:type="boolean">false</format> <loop_fs config:type="boolean">false</loop_fs> <mount>/usr</mount> <partition_id config:type="integer">142</partition_id> <size>2048</size> </partition> <partition> <crypt>twofish256</crypt>
45
<format config:type="boolean">false</format> <loop_fs config:type="boolean">false</loop_fs> <mount>/home</mount> <partition_id config:type="integer">142</partition_id> <size>3000</size> </partition> </partitions> <use>free</use> </drive> </partitioning> <software> <addons config:type="list"> <addon>Base-System</addon> <addon>Basis-Devel</addon> <addon>Basis-Sound</addon> <addon>File-Server</addon> <addon>Gnome</addon> <addon>HA</addon> <addon>Kde-Desktop</addon> <addon>LAMP</addon> <addon>LSB</addon> <addon>Linux-Tools</addon> <addon>Mail_News-Server</addon> <addon>Print-Server</addon> <addon>SuSE-Documentation</addon> <addon>Various-Tools</addon> <addon>WBEM</addon> <addon>X11</addon> <addon>YaST2</addon> <addon>analyze</addon> <addon>auth</addon> <addon>dhcp_DNS-Server</addon> </addons> <base>Full-Installation</base> </software> </install> </profile>
For more information about how to use AutoYaST, refer to the Special Installation Procedure section in the Novel SUSE Administration Guide and AutoYaST Automatic Linux Installation and Configuration with YaST2. To access the SUSE documentation, refer to:
http://www.novell.com/documentation/sles9/
46
47
place it in the TFTP share directory of the Solaris system, which by default is /tftpboot. This file is an IA32 PXE Linux loader that is needed for the network boot process. 2. Copy the vmlinuz and initrd.img files from the /isolinux directory found in the CD1 of RHEL to the same /tftpboot folder on the Solaris server. 3. Create the pxelinux.cfg configuration directory in the same place you put the pxelinux.0 file, and create a default file for the PXELINUX configuration. (See Example 3-6.)
Example 3-6 Sample default PXE configuration file default linux label linux kernel vmlinuz append initrd=initrd.img ramdisk_size=65536 ks=KS_URL
For more information about syntax, check the PXELINUX documentation, and look at the isolinux.cfg file from the same /isolinux directory on the CD1. 4. Edit /etc/inetd.conf file to enable the tftpd daemon if not already active, and send a HUP signal to inetd to reload the configuration if you modified it. 5. Configure and start the DHCP daemon in the normal way, and add the following standard DHCP options:
BootFile=pxelinux.0 BootSrvA=IP_address_of_your_Solaris_server
6. Copy the RHEL CD images into a local directory and share that directory through NFS. 7. Optionally, create a Kickstart file for the clients and place it in the NFS shared directory and reference it in the default configuration file of the pxelinux, for example:
ks=nfs:IP_OF_NFS_SERVER:/SHARE/ks.cfg
Now, you are ready to boot and install your Linux RHEL clients from this Solaris server. This example is for installing a similar configuration on all clients, but you can make a custom configuration for each separate client by adding a specific MAC-based or IP-based PXE configuration file for each client and then customize it by specifying the right Kickstart file for the installation configuration. For platforms other than IA32, the process is similar, but you will need to use another boot loader instead of pxelinux.0.
48
For more information about its syntax, check the PXELINUX documentation, and look at the isolinux.cfg file from the same /boot/loader directory on the CD1. 4. Edit /etc/inetd.conf to enable the tftpd daemon if not already active, and send a HUP signal to inetd to reload the configuration if you modified it. 5. Configure and start the DHCP daemon in the normal way, and add the following standard DHCP options:
BootFile=pxelinux.0 BootSrvA=IP_address_of_your_Solaris_server
6. Copy the CDs or DVD contents of the SLES distribution in a local directory, share that directory through NFS, and point the installation option to the right location, for example:
install=nfs://IP_OF_NFS_SERVER/NFS_SHARE/
7. Optionally, create a AutoYaST file for the clients and place it in a NFS shared directory and reference it in the default configuration file of the pxelinux, for example:
autoyast=nfs://IP_OF_NFS_SERVER/AUTOYAST_SHARE/autoyast.cfg
Now, you are ready to boot and install your Linux SLES clients from this Solaris server.
49
This example is for installing the same configuration on all clients, but you can make a custom configuration for each separate client by adding a specific MAC-based or IP-based PXE configuration file for each client and then customize it by specifying the right AutoYaST file for the installation configuration.
50
Chapter 4.
51
4.1.1 Disks
There is no distinction made in this section as to the type of attachment (that is, direct, SAN, or other), as long as the operating system can recognize that it is attached to the server.
Task table
Table 4-1 illustrates device creation commands.
Table 4-1 Device creation commands Device creation task Create device files for new device Solaris devfsadm Linux udev
52
Multipath
Both Red Hat and SUSE began supporting multipathing in their latest releases of RHEL and SLES. Refer to the vendor documentation and support channels for the latest updates about how to set up and use multipathing. SUSE has an online support page describing the setup tasks for SLES9, available at:
http://portal.suse.com/sdb/en/2005/04/sles_multipathing.html
See the following link for information about multipath support in RHEL4 Update 2:
https://rhn.redhat.com/errata/RHEA-2005-280.html
Task table
Table 4-2 illustrates disk partitioning commands.
Table 4-2 Disk partitioning commands Disk partitoning task Create partitions on the disk Display partition table Maximum usable partitions Solaris format or fmthard prtvtoc 7 Linux fdisk or parted fdisk or parted 15 for SCSI 63 for IDE
Solaris
Use the format or fmthard commands to create the appropriate slice sizes in the disk. To display the partition table, use the prtvtoc command.
Linux
You can use the fdisk or parted commands to create the appropriate partition sizes in the disk. To display the partition table, use the fdisk -l command. Refer to the man pages for the fdisk and parted commands for more information.
Other considerations
In Solaris, you can create and use a maximum of seven slices per disk excluding the WholeDisk slice number 2.
53
In Linux, we have primary partitions and logical partitions contained in (primary) extended partitions. Primary partitions and extended partitions can be created only in the Master Boot Record (MBR) of the disk and there is room for only four such partitions in MBR. Logical partitions are partitions created in extended partitions on the disk. The extended partition cannot be used directly, but only by means of the logical partitions created in it. To summarize, we can have up to four primary partitions, or one extended partition and up to three primary partitions defined in the MBR. Using either the fdisk or parted command, you only need to create primary and logical partitions, and they then make the extended partitions automatically. Another thing to note is that, in Linux, each partition has a partition type, which describes its intended usage. This type can be Linux, Linux LVM, Linux RAID, and so on. When creating a Linux partition, you decide what partition type to use. This depends on for what you intend to use the partition. If it is for data file system data storage, you will have to select ext2, ext3, Reiserfs, LVM, or one of the other options available. Refer to the man pages for the fdisk and parted commands for more information. The interactive fdisk command displays the available partitions types when you use the l subcommand. See Example 4-1 and Example 4-2 on page 55.
Example 4-1 Sample prtvtoc output # * * * * * * * * * * * * * * * * prtvtoc /dev/rdsk/c0t1d0s2 /dev/rdsk/c0t1d0s2 partition map Dimensions: 512 bytes/sector 424 sectors/track 24 tracks/cylinder 10176 sectors/cylinder 14089 cylinders 14087 accessible cylinders Flags: 1: unmountable 10: read-only First Sector Last Flags Sector Count Sector Mount Directory 00 1058304 20972736 22031039 / 01 0 1058304 1058303 01 0 143349312 143349311 00 22031040 121308096 143339135 /space 00 143339136 10176 143349311
Partition 0 1 2 3 7
Tag 2 3 5 8 0
54
Example 4-2 Sample fdisk -l output # fdisk -l Disk /dev/sda: 9100 MB, 9100369920 bytes 255 heads, 63 sectors/track, 1106 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot /dev/sda1 /dev/sda2 * Start 1 65 End 64 1106 Blocks 514048+ 8369865 Id 82 83 System Linux swap Linux
Task table
Table 4-3 illustrates file system management commands.
Table 4-3 File system management commands File system management task To create a file system on disk Solaris newfs or mkfs Linux mkfs, mkfs.ext3, mk2fs -j, parted, or mkfs.reiserfs (SUSE only) fsck, fsck.ext3, e2fsck
fsck
Overview of Solaris
Solaris natively only supports the UFS file system for hard disks. Use the newfs or the mkfs command to create the file system and the fsck command to check and fix the file system for consistency. The other types of disk-based file systems are HSFS (for CD-ROM), PCFS (for diskettes), and UDF (for DVD). Bad block management uses the command addbadsec to map out the bad sector.
Linux
In Linux, there are several disk file systems from which to choose. Depending on its intended use, one file system might be better than another. If you do not know which to choose, a safe guideline is to use the default file system of that distribution. On Red Hat, the default disk file system is ext3, and on SUSE, it is reiserfs, and both file systems are journaled.
55
For creating a file system we have the following commands: mkfs.ext3 or mke2fs -j for creating ext3 file systems mkfs.reiserfs or mkreiserfs for creating reiserfs file systems (SUSE only) You can also still use the mkfs command, but you need to specify the file system type option with -t fstype. For checking the file system consistency, we have the following commands: fsck.ext3 or e2fsck for ext3 file systems fsck.reiserfs or reiserfsck for reiserfs file systems You can also still use the fsck -t fstype command. If you do not use the -t fstype option, the default file system will be used, ext3 for Red Hat and reiserfs for SUSE. Linux can also access UFS partitions, if needed for migration purposes. Table 4-4 shows the different disk file systems in Solaris and Linux.
Table 4-4 File system types File system type UNIX file system Solaris ufs Red Hat Source available but not compiled SUSE ufs (Refer to the mount commands man page for support statements.) reiserfs ext3 iso9660 udf msdos vfat
Reiser file system Ext3 file system CD-ROM file system DVD file system MS-DOS file system Windows 95 and later file system
Source available but not compiled ext3 iso9660 udf msdos vfat
56
to store information. Anything that gets stored in here will not be persistent across a reboot.
Overview of Solaris
There are several different types and uses for virtual file systems in Solaris: /tmp Based on the TMPFS file system. This file system is used for storing temporary files generated by the operating system and applications. When this space is fills up to a certain portion, the physical swap is used as the backing store in which to move these files. This space is also used as a buffer space for file system reads and writes in order to increase access time. A place to store temporary system files that are currently in use, but that are not required across a reboot. This space also provides access to special kernel information and facilities. Used for caching slow devices on local harddrive, such as simple or double-speed CD-ROMs or NFS over slow networks. A way for you to create a virtual file system by using a different path to access the files within that file system. /proc This file system contains all the active processes in the system by process number.
/var/run
CacheFS
Linux
There are many options for virtual file system types in Linux. We only discuss a few of them that have a Solaris equivalent: /proc In Linux, this contains all the information about each process, information about the running kernel, devices, networking stack, and so on. See /proc on page 89 for more information. An equivalent in Linux does not exist. But for similar functionality, you can investigate the mount command with the --bind, --rbind, and --move options.
57
/tmp
Unlike Solaris, in Linux /tmp is a disk file system and is persistent across reboots. There is no /var/run equivalent. If you need a fast file system that will not be required to be persistent across a reboot, you can create a tmpfs or a ramfs. An equivalent to the Solaris CacheFS is not available in Linux.
CacheFS
Task table
Table 4-4 on page 56 illustrates swap commands.
Table 4-5 Swap commands Swap task Create a swap space Enable a swap space Enable all swap spaces Disable a swap space Disable all swap spaces Delete a swap space Display the swap space usage Display the swap space status Set swap priority level Solaris swap -a swap -a N/A N/A N/A swap -d swap -s swap -l N/A Linux mkswap swapon swapon -a swapoff swapoff -a N/A swapon -s N/A swapon -p
58
Overview of Solaris
swap is the only swap configuration command on Solaris. You can add, remove, and list the available swaps. Swap can be defined in dedicated disk slices, which is the preferred way, or as files within file systems, which is usually done for emergency and temporary purposes.
Linux
In Linux, we can also have swap defined in dedicated disk partitions, which is the preferred way, or as files within file systems, which is usually done for emergency and temporary purposes. In Linux, there are several commands for managing swap space: mkswap to format the swap space in order to be used by the system swapon to activate a swap space after it was formatted with mkswap swapoff to deactivate a swap space that is in use In addition, you can use the free command to see how much swap is used by the system.
Linux task
The Linux default file systems for both RHEL and SLES have logging capabilities as well. You do not need any extra steps to activate the logging with the ext3 and reiserfs file systems. Both file systems use internal journaling for storing the
59
transaction logs by default. It is possible to use an external device for journaling if needed. For journal mode information for the reiserfs and ext3 file systems, see the following IBM publications: Tuning Red Hat Enterprise Linux on IBM Eserver xSeries Servers, REDP-3861 Tuning SUSE LINUX Enterprise Server on IBM Eserver xSeries Servers, REDP-3862 The Linux ext3 default for journal mode is ordered. Meaning, all data is being forced to be written to the file system before the metadata has been committed to the journal. There are two other modes that ext3 supports, journal and writeback: Journal mode Writeback mode Commits the metadata into the journal before any the file system is written. This is the safest mode. Data ordering is not preserved. The data can be written to the file system after the metadata has been committed to the journal. This is considered to provide better performance than the previous two modes, and still provides high system integrity, but there is a tendency for older data in files to appear after the server has crashed and journal recovered.
Novell SUSE has two additional modes, user_xattr and acl: user_xattr acl Enables extended user attributes. Refer to the attr(5) man page for more information. Enables POSIX access control lists. Refer to the acl(5) man page for more information.
SUSE Linux also provides ReiserFS. ReiserFS is designed to provide improved features for disk space utilization, access performance, and crash recovery. For more information about ReiserFS, see SUSE Linux Enterprise Server 9 Administration and Installation Guide.
60
/boot /dev /etc /etc/opt /etc/X11 /home /lib /media /mnt /opt /proc /root /sbin /srv /tmp /usr /usr/bin /usr/include /usr/lib /usr/local /usr/sbin /usr/share /usr/X11R6 /var /var/account /var/cache /var/crash /var/lib /var/local /var/lock /var/log /var/opt
Static files of the boot loader Device files Host-specific system configuration Configuration files for add-on packages Configuration for X User home directories Essential shared libraries and kernel modules Mount point for removable media Mount point for mounting a file system temporarily Add-on application software packages Kernel and process information Roots home directory Essential system binaries Data for services provided by this system Temporary files Secondary hierarchy Most user commands Header files included by C programs Libraries Local hierarchy (empty after main installation) Non-vital system binaries Architecture-independent data X files Variable data Process accounting logs (optional) Application cache data System crash dumps (optional) Variable state information Variable data for /usr/local Lock files Log files and directories Variable data for /opt
61
User mailbox files (optional) Data relevant to running processes Application spool data Temporary files preserved between system reboots Network Information Service (NIS) database files (optional)
4.8 AutoFSCK
In Linux, the ext2 and ext3 file system types have an option to force the checking of the consistency even if the file system was cleanly unmounted and is not marked as dirty. This is useful when you have an ext3 journaled file system that will never be dirty, but you want to check it from time to time just to make sure that there are no inconsistencies on it. You have two variables, one that counts the number of mounts, and other that is time based. Both of them can be manipulated with the tune2fs program. To disable this feature, you need to set both of these variables to 0. There is no equivalent functionality for this task in Solaris.
4.9 AutoFS
Also known as automount or automountd, this is a way to automatically mount a Network File System (NFS) when a specific directory path is being accessed by the user. When there is no activity on these subdirectories after a certain period of time, the automountd daemon unmounts the file system.
Task table
Table 4-6 illustrates the AutoFS information.
Table 4-6 AutoFS files AutoFS task Auto mounter daemon Master configuration file Other common configuration file Solaris automountd /etc/auto_master /etc/auto_home Linux automount /etc/auto.master /etc/auto.misc
62
Solaris
The automount is configured in the /etc/auto_master (and its other corresponding) file and is activated by the startup script /etc/rc2.d/S74autofs, which runs during the server boot to run level 2 or 3. After automountd is running as a daemon, all NFS mounting and unmounting is automatically handled.
Linux
In Linux, the automount is configured in the /etc/auto.master file, as opposed to Solaris /etc/auto_master file, and is activated by the startup script /etc/init.d/autofs. After automountd is running as a daemon, all NFS mounting and unmounting is automatically handled.
-nosuid,nobrowse -nobrowse
Example 4-4 Solaris /etc/auto_home # Home directory map for automounter # +auto_home
Example 4-5 Linux /etc/auto.master # # $Id: auto.master,v 1.3 2003/09/29 08:22:35 raven Exp $ # # Sample auto.master file # This is an automounter map and it has the following format # key [ -mount-options-separated-by-comma ] location # For details of the format look at autofs(5). #/misc /etc/auto.misc --timeout=60 #/misc /etc/auto.misc #/net /etc/auto.net
63
Example 4-6 Linux /etc/auto.misc # # # # # # cd # the following #linux #boot #floppy #floppy #e2floppy #jaz #removable
$Id: auto.misc,v 1.2 2003/09/29 08:22:35 raven Exp $ This is an automounter map and it has the following format key [ -mount-options-separated-by-comma ] location Details may be found in the autofs(5) manpage -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom entries are samples to pique your imagination -ro,soft,intr ftp.example.org:/pub/linux -fstype=ext2 :/dev/hda1 -fstype=auto :/dev/fd0 -fstype=ext2 :/dev/fd0 -fstype=ext2 :/dev/fd0 -fstype=ext2 :/dev/sdc1 -fstype=ext2 :/dev/hdd
Example 4-7 Linux /etc/auto.net #!/bin/sh # $Id: auto.net,v 1.5 2003/09/29 08:22:35 raven Exp $ # Look at what a host is exporting to determine what we can mount. # This is very simple, but it appears to work surprisingly well key="$1" # add "nosymlink" here if you want to suppress symlinking local filesystems # add "nonstrict" to make it OK for some filesystems to not mount opts="-fstype=nfs,hard,intr,nodev,nosuid" # Showmount comes in a number of names and varieties. "showmount" is # typically an older version which accepts the '--no-headers' flag # but ignores it. "kshowmount" is the newer version installed with knfsd, # which both accepts and acts on the '--no-headers' flag. #SHOWMOUNT="kshowmount --no-headers -e $key" #SHOWMOUNT="showmount -e $key | tail +2" # Newer distributions get this right SHOWMOUNT="/usr/sbin/showmount --no-headers -e $key" $SHOWMOUNT | sort +0 | \ awk -v key="$key" -v opts="$opts" -- ' BEGIN { ORS=""; first=1 }
64
{ if (first) { print opts; first=0 }; print " \\\n\t" $1, key ":" $1 } END ' { if (!first) print "\n"; else exit 1 }
Task table
Table 4-7 illustrates volume management commands.
Table 4-7 Volume management commands Volume management task Initialize a disk for VM Solaris Create partition area/size metainit metainit volumename raidtype devices... N/A Linux Create partition area/size pvcreate mkraid, mdadm lvcreate LVname vgcreate VGname devicename mkraid, mdadm lvchange -a y LVname vgchange -a y VGname raidstart lvchange -a n LVname vgchange -a n VGname raidstop, mdadm lvremove LVname vgremove VGname lvextend LVname vgextend VGname newdevname lvreduce LVname vgreduce VGname devicename raidreconf
Create a volume or volume group (VG) Enable the volume or volume group Disable the volume or volume group Delete the volume or volume group Add a device to the volume or volume group Delete a device from the volume or volume group
N/A
65
Volume management task Create a soft partition or logical volume (no RAID) Create a soft partition or logical volume (RAID 0) Create a soft partition or logical volume on a specific device
Solaris metainit -p metainit with RAID 0 on devices first, then metainit -p to create the soft partition volume Same as above, but the second metainit -p has the device name at the end of the command line metaclear metattach volume (size or device name) growfs
Linux lvcreate -Lsize -nLVname VGname lvcreate -iNumOfStripes -IStripeSize -nLVname VGname mdadm, mkraid Same as above, but add the device name to the end of the command line lvremove /dev/VGname/LVname raidreconf lvextend -Lsize /dev/VGname/LVname raidreconf Red Hat ext2/ext3: resize2fs SUSE ext2: resize2fs Red Hat reiser: resize_reiserfs Note: View the man pages for unmount requirement, and check if online version is available.
Delete a soft partition or logical volume Extend a volume or logical volume Extend a file system after volume has been grown
The RAID and LVM2 commands installed on your system will be in either the /sbin or /usr/sbin directory. The packages that provide logical volume management are mdadm*, raidtools*, and lvm2*. Table 4-8 on page 67 presents a quick review of the equivalent commands.
66
Table 4-8 Equivalent volume management commands Volume management task Set up or display metadb Display metadevice status Initialize raw devices to metadevices Attach metadevices Detach metadevices Clear and remove metadevices Replace a metadevice Rename a volume Check metadevice ID configuration Manage hot spares Set submirrors offline Set submirrors online Change volume parameters Back up volume group metadata Recover soft partition configuration information Set up root file system for mirroring Administer disk sets for sharing Resynchronize volume during reboot Expand a file system size Has entries that starts up the kernel metadevice modules Sets the default number of available volumes metarecover metaroot metaset metasync growfs /etc/system /kernel/drv/md.conf Solaris metadb metastat metainit metattach metadetach metaclear metareplace metarename metadevadm metahs metaoffline metaonline metaparam Linux vgdisplay, lvdisplay, lsraid vgdisplay, lvdisplay cat /proc/mdstat pvcreate vgchange, lvchange vgchange, lvchange vgremove, lvremove raidreconf raidreconf mdadm mdadm, raidhotadd, raidhotremove mdadm mdadm vgchange, lvchange vgcfgbackup vgcfgrestore N/A N/A N/A vgextend, lvextend, resize2fs, resize_reiserfs, raidreconf N/A /etc/sysconfig/lvm /etc/raidtab
67
Solaris
SVM uses the state database to store a copy of the configuration. It requires a minimum of half + 1 copies, called a quorum, to be in good state in order to boot up the operating system. Prior to soft partitions, Solaris created a new file system the same size as the metadevice. So, if an SVM volume is a concatenation of two disks or a RAID 5 structure of four disks, the file system will be created to the maximum space allowed by it. With soft partitions, you can partition the whole SVM volume into smaller partitions as you see fit, and the file system that created on these soft partitions will be the size that you create. The creation and management of the SVM volumes uses some of the subcommands such as metainit, metattach, metastat, and metarename. Refer to the task table in Table 4-8 on page 67.
Linux
In Linux, the equivalent of SVM is LVM2, which is present in both Red Hat and SUSE. The basic concepts behind LVM for Linux are the same as in SVM. The sequence of operations are simplified: 1. Partition the disk. 2. Initialize partitions. 3. The disk can be used to create a new volume or volume group (VG), or added into an existing volume or volume group. 4. Logical volumes (LV) can be created or extended on this new disk. 5. The file system can be extended to this new disk. Note: The task table in Table 4-8 on page 67 lists the commands required to do the previous sequence. Refer to the man pages for each command for detailed information about other options available. For a good guide about LVM configuration and its use on Linux, see:
http://www.tldp.org/HOWTO/html_single/LVM-HOWTO/
68
Report physical volume information Scan all supported logical volume block devices for physical disk Perform consistency check on the volume group Scan all disks for volume group data and rebuild caches Import a volume group to this server Export a volume group out of this server
LVM, by default, does not log errors and debug messages to a file. You can change this by editing the /etc/lvm/lvm.conf file under the log section.
Example 4-9 shows vgdisplay output, without any parameters passed to it, for the volume group (VG). If you have multiple VGs, this command will include each one of them in the list output. To display only a specific VG, provide the VG name as a parameter to the command.
Example 4-9 Sample default output of vgdisplay with no options # vgdisplay --- Volume group --VG Name System ID Format Metadata Areas Metadata Sequence No VG Access VG Status MAX LV
69
Cur LV Open LV Max PV Cur PV Act PV VG Size PE Size Total PE Alloc PE / Size Free PE / Size VG UUID
Example 4-10 shows the output of the vgdisplay command in abbreviated format (using the -s option).
Example 4-10 Sample output of vgdisplay -s # vgdisplay -s "DataVG" 101.62 GB [101.50 GB used / 128.00 MB free]
Example 4-11 shows what a verbose display looks like. It also shows the information about the logical volumes (LVs) defined within the VG and the corresponding physical volumes (PVs) that are used for this VG.
Example 4-11 Sample output of vgdisplay -v # vgdisplay -v Finding all volume groups Finding volume group "DataVG" --- Volume group --VG Name DataVG System ID Format lvm2 Metadata Areas 4 Metadata Sequence No 2 VG Access read/write VG Status resizable MAX LV 0 Cur LV 1 Open LV 1 Max PV 0 Cur PV 4 Act PV 4 VG Size 101.62 GB PE Size 32.00 MB Total PE 3252 Alloc PE / Size 3248 / 101.50 GB
70
4 / 128.00 MB egqMUy-dNyj-DSKG-zupE-V22E-cPHn-2cLLrn
--- Logical volume --LV Name /dev/DataVG/LogVol00 VG Name DataVG LV UUID pmIJYM-OwVm-ZpqN-Z4dR-9TQl-Gtg0-xCU5kS LV Write Access read/write LV Status available # open 1 LV Size 101.50 GB Current LE 3248 Segments 4 Allocation inherit Read ahead sectors 0 Block device 253:0 --- Physical volumes PV Name PV UUID PV Status Total PE / Free PE PV Name PV UUID PV Status Total PE / Free PE PV Name PV UUID PV Status Total PE / Free PE PV Name PV UUID PV Status Total PE / Free PE --/dev/sdb1 6j6Ld4-tyMR-Swe5-oCpM-N38w-yTYZ-HTubDo allocatable 1084 / 0 /dev/sdc1 NU5VjA-N7LU-SagN-u91f-xAmI-ysbY-5AbvK7 allocatable 1084 / 0 /dev/sdd1 CtXfvq-yrmD-SVHb-l7x3-fKUh-pm5m-GysOF7 allocatable 542 / 0 /dev/sde1 2WJB4T-YTQX-ibjC-rOe5-HcBC-8QoE-ywFCiJ allocatable 542 / 4
Example 4-12 shows the information provided by the pvdisplay command for a specific physical disk partition. It gives a little bit more information than the previous output.
Example 4-12 Sample output of pvdisplay # pvdisplay /dev/sdc1 --- Physical volume --PV Name /dev/sdc1 VG Name DataVG
71
33.88 GB / not usable 0 yes (but full) 32768 1084 0 1084 NU5VjA-N7LU-SagN-u91f-xAmI-ysbY-5AbvK7
Example 4-13 shows the information provided by the lvdisplay command for a logical volume.
Example 4-13 Sample default output of lvdisplay # lvdisplay /dev/DataVG/LogVol00 --- Logical volume --LV Name /dev/DataVG/LogVol00 VG Name DataVG LV UUID pmIJYM-OwVm-ZpqN-Z4dR-9TQl-Gtg0-xCU5kS LV Write Access read/write LV Status available # open 1 LV Size 101.50 GB Current LE 3248 Segments 4 Allocation inherit Read ahead sectors 0 Block device 253:0
Example 4-14 shows a lot more information for an LV, including which physical disk device partitions the LV resides in and how it is laid out. The sample LV shows that it uses a linear structure across the four PVs. Note that the logical extents numbering from the first PV to the last PV are in sequence. This is equivalent to the concatenation model for SVM. This shows the mapping of logical extents to physical volumes and physical extents.
Example 4-14 Sample output of lvdisplay --maps # lvdisplay --maps /dev/DataVG/LogVol00 --- Logical volume --LV Name /dev/DataVG/LogVol00 VG Name DataVG LV UUID pmIJYM-OwVm-ZpqN-Z4dR-9TQl-Gtg0-xCU5kS LV Write Access read/write LV Status available # open 1 LV Size 101.50 GB Current LE 3248
72
4 inherit 0 253:0
--- Segments --Logical extent 0 to 1083: Type linear Physical volume /dev/sdb1 Physical extents 0 to 1083 Logical extent 1084 to 2167: Type linear Physical volume /dev/sdc1 Physical extents 0 to 1083 Logical extent 2168 to 2709: Type linear Physical volume /dev/sdd1 Physical extents 0 to 541 Logical extent 2710 to 3247: Type linear Physical volume /dev/sde1 Physical extents 0 to 537
73
74
Chapter 5.
Software management
This chapter describes how to manage software packages and patches in Linux. Software management, in this context, includes the operating system and any software that runs on the operating system. This chapter discusses the following topics: Packages Patching Dependencies Package distribution methods Automated software management Activating fixes after updating Compiling patches in Linux
75
5.1 Packages
A package is a collection or group of program files and subdirectories that make up a software product. A package can be part of the operating system or an add-on software for specific functionality.
Task table
Table 5-1 illustrates package management commands.
Table 5-1 Package management commands Package management task Install packages Display installed packages Remove software package Upgrade/install a package Verify correct installation List the contents of an installed package Check which file to which a package belongs Check package information Solaris pkgadd pkginfo or pkgparam pkgrm pkgadd pkgchk Look in /var/sadm/install/contents Look in /var/sadm/install/contents Look in /var/sadm/pkg/PKGNAME/pkginfo Linux rpm -i rpm -qa rpm -e rpm -U rpm -V rpm -ql rpm -qf rpm -qi
76
Refer to the following Web sites for distribution-related information: Red Hat: Chapter 15, Package Management with RPM, in Red Hat Enterprise Linux 4: Reference Guide, available at:
http://www.redhat.com/docs/manuals/enterprise/
Novell SUSE: The RPM --- the Package Manager section in the Installation chapter of SUSE LINUX Enterprise Server 9 Administration Guide for OES, available at:
http://www.novell.com/documentation/sles9/
Example 5-1, Example 5-2, and Example 5-3 on page 78 provide sample output from using the rpm command.
Example 5-1 Sample output: List all packages in server # rpm -aq filesystem-2.3.0-1 bzip2-libs-1.0.2-13 gdbm-1.8.0-24 libsepol-1.1.1-2 bash-3.0-19.2 popt-1.9.1-9_nonptl vim-minimal-6.3.046-0.40E.4 gawk-3.1.3-10.1 openssl-0.9.7a-43.1 shadow-utils-4.0.3-41.1 cracklib-dicts-2.7-29 .... mozilla-nspr-1.7.7-1.4.2 intltool-0.31.2-1 libcroco-0.6.0-4 vim-enhanced-6.3.046-0.40E.4 gail-1.8.0-2 metacity-2.8.6-2.1
Example 5-2 Sample output: List files in a particular package # rpm -ql GConf2-2.8.1-1 /etc/gconf/2 /etc/gconf/2/path /etc/gconf/gconf.xml.defaults /etc/gconf/gconf.xml.mandatory /usr/bin/gconf-merge-tree /usr/bin/gconftool-2 /usr/lib/GConf /usr/lib/GConf/2 /usr/lib/GConf/2/libgconfbackend-oldxml.so
77
Example 5-3 Sample output: Package information # rpm -qi GConf2-2.8.1-1 Name : GConf2 Relocations: (not relocatable) Version : 2.8.1 Vendor: Red Hat, Inc. Release : 1 Build Date: Tue 12 Oct 2004 12:16:24 PM CDT Install Date: Thu 13 Oct 2005 03:15:55 PM CDT Build Host: tweety.build.redhat.com Group : System Environment/Base Source RPM: GConf2-2.8.1-1.src.rpm Size : 4050741 License: LGPL Signature : DSA/SHA1, Wed 05 Jan 2005 03:47:04 PM CST, Key ID 219180cddb42a60e Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> URL : http://www.gnome.org Summary : A process-transparent configuration system Description : GConf is a process-transparent configuration database API used to store user preferences. It has pluggable backends and features to support workgroup administration.
5.2 Patching
A patch is a subset of a package that adds new functionality to a package or fixes a problem with the installed package.
78
Task table
Table 5-2 illustrates patch management commands.
Table 5-2 Patch management commands Patch management task Install a patch Remove a patch Display installed patches Solaris patchadd patchrm showrev -p Linux rpm -F (upgrades only if already present) N/A N/A
5.3 Dependencies
In certain situations, a package or patch will have a dependency on one or more packages or patches before it can be installed.
79
Novell SUSE: The SUSE Linux portal provides package updates and fixes (requires registration):
https://portal.suse.com
80
Red Hat
The default tool for automated dependency and update management is up2date. This tool connects to the Red Hat Network and checks for available updates for your system. After up2date gathers a list of updates, it presents you with the option to select which packages to download and update. After the selections step, the tool completes the remaining installation and update steps. For more information, refer to the Red Hat Network 4.0 Reference Guide, available at:
http://www.redhat.com/docs/manuals/RHNetwork/
Novell SUSE
The default tool for automated dependency and update management is you (YaST online update), a YaST2 module that has a similar functionality to the Red Hat up2date tool. For more information, see the YaST Online Update section in
81
the Installation chapter of SUSE LINUX Enterprise Server 9 Administration Guide for OES, available at:
http://www.novell.com/documentation/sles9/
82
come with instructions about how to compile and install. If you still need more help, you can contact the provider of the source or third-party application to guide you through this process. The following tutorials are available in the open source section of the IBM developerWorks Web site:
http://www.ibm.com/developerworks/opensource
83
84
Chapter 6.
Device management
This chapter provides a description of common tasks for managing devices in Linux for the Solaris system administrator. This chapter includes the following topics: Device access and configuration Removable media devices Terminals and modems Distribution-based device management tools
85
Task table
Table 6-1 illustrates device management commands.
Table 6-1 Solaris versus Linux device management commands Device management task Run multiple tasks in a GUI environment Solaris admintool Red Hat system-config-* (keyboard, mouse, printer, network, soundcard, and so on) /dev/MAKEDEV kudzu mknod kudzu /dev/MAKEDEV ls /sys/devices cat /proc/devices insmod lsmod rmmod SUSE yast2
Configure a device Define a device Remove a device List devices Install a device driver kernel module List installed device driver kernel modules Remove a device driver kernel module
/dev/MAKEDEV hwinfo mknod hwinfo /dev/MAKEDEV ls /sys/devices cat /proc/devices insmod lsmod rmmod
86
Table 6-2 Solaris versus Linux device file location Solaris /dev /devices devfsadm Linux /dev /sys/devices udev Description Contains logical device files Contains physical device files Command that creates and manages the physical device files and the associated logical device files
Solaris and Linux both use the logical device names in the /dev file system for many of the disk-related system administration tasks. However, the file and directory naming convention differs between the two operating systems.
Where: 1: Logical controller number 2: Physical bus target number 3: Driver number 4: Slice or partition number
87
The output in Figure 6-1 is an example of what a Linux system administrator might see when performing an ls -l command on /dev/hda1.
The previous listing represents the first partition of the first drive on the first IDE controller. Linux defines device files with either type c for character devices, or type b for block devices. All disks, such as the previous one, are represented as block devices in Linux. For an example of a character device, refer to 6.3.3, Serial port management on page 103. This next output is an example of what a Linux system administrator might see when performing an ls -l command on /dev/sda1, as shown in Figure 6-2.
For more information about device names and numbers, the Linux Assigned Names And Numbers Authority (LANANA) maintains the Linux Device List. This is the official listing of device numbers and /dev directory nodes for Linux, available at:
http://www.lanana.org/
88
Accessing devices
In Solaris, there is the concept of having a raw device logical interface name (rdsk) and a block device logical interface name (dsk) for the same device. The name a system administrator uses depends on the task. In Linux, there is only one type of logical device name scheme used. Table 6-3 lists a few Solaris versus Linux commonly used commands for accessing devices.
Table 6-3 Commonly used logical device access commands in Solaris and Linux Solaris example df /dev/dsk/c1t0d0s0 fsck -p /dev/rdsk/c1t3d0s4 mount /dev/dsk/c1t1d0s0 /mnt/1 newfs /dev/rdsk/c0t0d1s1 prtvtoc /dev/dsk/c1t1d0s0 Linux example df /dev/sda1 fsck -y /dev/sda2 mount /dev/hda2 /data mkfs /dev/sdc1 fdisk -l /dev/hdc
Refer to the man pages for these commands for more information.
/proc
The Linux /proc virtual file system differs from the Solaris implementation in that besides having information about running processes, it also contains runtime system information about areas such as devices mounted, system memory, and hardware configuration. Table 6-4 on page 90 outlines some of the files and directories that contain device-related information.
89
Table 6-4 Device-related information in the /proc file system Location /proc/bus/ /proc/devices /proc/ide /proc/scsi Description Directory containing bus-specific information File that lists block and character device drivers configured into the current running kernel Directory containing information about all IDE devices known to the kernel Directory containing information about all SCSI devices known to the kernel
Red Hat and Novell SUSE also provide additional information about the /proc file system: In Red Hat, refer to Chapter 5, The /proc File System, in Red Hat Enterprise Linux 4: Reference Guide, available at:
http://www.redhat.com/docs/manuals/enterprise/
In Novell SUSE, refer to the The /proc File System, section of the Administration chapter of SUSE LINUX Enterprise Server 9 Administration Guide for OES, available at:
http://www.novell.com/documentation/sles9/
Important: Although some device driver information can be found in /proc, using it for this purpose is deprecated in recent Linux distributions, and the sysfs virtual file system (mounted under /sys) should be used instead.
/sys
The sysfs virtual file system provides a hierarchical view in the user space of kernel data structures, their attributes, and the links between them. The hotplug command notifies user space when a device is added or removed, keeping the file system dynamic. Features include: sysfs is linked to the kobject infrastructure. Objects in the kernel are represented in a directory tree. Each kernel object is represented as a subdirectory in the tree. sysfs forwards file I/O operations to methods defined for the attributes, providing a means to read and write kernel attributes. sysfs enables a user to determine which device has been assigned to which device file by the kernel. Previously, this information was not easily obtainable. sysfs can be mounted just like other virtual file systems. Only cat(1) and echo(1) are needed, but tree(1) is also good to have for viewing the overall structure.
90
Table 6-5 outlines some of the directories that contain device-related information.
Table 6-5 Device-related information in the /sys file system Location /sys/block/ /sys/bus/ /sys/class/ Description Has subdirectory for each block device discovered in the system. Has subdirectories for each supported physical bus type. Every device class that is registered with the kernel is represented here. An example of a class is sound or printer. A hierarchical structure that has every physical device discovered by the bus types seen by the system.
/sys/device/
For an in-depth look at sysfs, refer to The sysfs file system, by Patrick Mochel, presented in volume 1 of the 2005 Ottawa Linux Symposium proceedings, available at:
http://www.linuxsymposium.org/2005/
91
hwbrowser: This command invokes an X Window System graphical user interface that enables you to browse the hardware configurations. For more information, refer to Section 4 in Chapter 40, Gathering System Information, in Red Hat Enterprise Linux 4: System Administration Guide, available at:
http://www.redhat.com/docs/manuals/enterprise/
Novell SUSE: hwinfo: This command probes for the hardware present in the system and can generate a system overview log. Refer to the man page and the readme file located under /usr/share/doc/packages/hwinfo for more information about this command.
92
Table 6-6 Additional module-related commands Module-related task Add and remove modules based on the system configuration Display information about a kernel module Command modprobe modinfo
Novell SUSE: Refer to the The Hotplug System section in SUSE LINUX Enterprise Server 9 Administration Guide for OES, available at:
http://www.novell.com/documentation/sles9/
Background information
For general information about Linux hot-plugging, refer to the project Web site at:
http://linux-hotplug.sourceforge.net/
Also refer to the following Ottawa Linux Symposium (OLS) presentations by Greg Kroah-Hartman: OLS 2001: Hotpluggable devices and the Linux Kernel OLS 2003: udev A Userspace Implementation of devfs The presentations are available at:
http://www.kroah.com/linux/
93
For questions about Linux support for a specific device, contact the Linux distributor or the device manufacturer.
94
you optionally choose to run on top of the operating system, the types of device management and access tools available in those session managers vary as well.
Solaris
Solaris uses the volume manager (vold) to actively manage removable media devices. The volume manager simplifies the process for using removable media by automatically performing many of the tasks required to mount and access removable media (on earlier versions of Solaris).
Red Hat
Red Hat Enterprise Linux semi-automatically manages removable media devices. Most removable devices are auto-detected for Nautilus File Manager users, who will see a desktop link to the device upon startup. Shell console users will have to manually mount and unmount removable devices. For more information about accessing removable devices, refer to Chapter 13, Diskettes and CD, in Red Hat Enterprise Linux 4: Red Hat Enterprise Linux Step By Step Guide, available at:
http://www.redhat.com/docs/manuals/enterprise/
Novell SUSE
Novell SUSE Linux Enterprise System operating system automatically manages removable media devices using the submount file system (subfs). The submount program automatically mounts removable media devices when the mount point is accessed, and subsequently unmounts them when they are no longer in use. Issuing the cd /media/<device> command initiates the automatic mounting process. Note: Media cannot be ejected as long as it is being accessed by a program. For more information about submount, consult the man pages or the project Web site at:
http://submount.sourceforge.net/
Access
System administrators access files on mounted removable media devices using the same commands as they do when accessing other file systems. Commands such as ls, cp, rm, and mv behave the same way on removable media, with CD/DVD and tape media being the exception (see 6.2.4, CDs and DVDs on page 96 and 6.2.5, Tape drives on page 98).
95
Remote systems
The process of allowing remote systems to access removable media file systems is no different than it is for standard file systems. You can export the removable media file system mount points using Network File System (NFS), Samba, or any other supported networked file system protocols. In addition, accessing a remote removable media file system is the same process as it is for standard remote file systems.
Accessing
When mounted, both CD and DVD media can be accessed using standard file system commands, with the exception of commands that involve the writing and erasing of data, that is, rm, cp, and mv.
96
Writing
Both Red Hat and SUSE provide graphical tools for creating audio and data CDs through their desktop applications: Red Hat The Nautilus File Manager has an integrated tool called the CD/DVD Creator. Novell SUSE The K3b application is provided for CD burning. For more information about this application, go to:
http://k3b.sourceforge.net/
The YaST tool provides a CD creator module. For more information about this application, run the yast2 cd-creator command as root. If you do not want to use one of the previous tools, important command line tools for managing this process include: cdrecord: This command is similar to cdrw on Solaris and is for writing CD file systems. Linux and cdrecord support the ISO 9660 format with Rock Ridge or Joliet extensions. For more information about other supported formats and instructions for using cdrecord, refer to the man page or the project Web site at:
http://freshmeat.net/projects/cdrecord/
mkisofs: This command is the same for both Solaris and Linux. Refer to the man page for more information about its use. dvd+rw-tools: Red Hat and Novell SUSE ship with this package, which provides the following commands for manipulating +RW/+R and -R[W] DVD media: dvd+rw-booktype dvd+rw-format dvd+rw-mediainfo dvd-ram-control growisofs For more information about this package, refer to the growisofs man page and the following system documentation: Red Hat: /usr/share/doc/dvd+rw-tools-<version> Novell SUSE: /usr/share/doc/packages/dvd+rw-tools
97
dvdrecord: Red Hat provides this additional command, which is a stub for the cdrecord command. The man page documentation recommends using the growisofs command from the dvd+rw-tools package instead of this command. The previously mentioned CD/DVD Creator (Red Hat) and K3b (Novell SUSE) applications also provide DVD burning capabilities.
Erasing
The cdrecord command is capable of erasing CD-RW media. The dvd+rw-tools package provides the ability to format and erase DVD media.
Note: Although Sun recommends xmcd, Solaris does not include the tool. Red Hat and Novell SUSE do not provide tools for video extraction or playback. However, the following Web site provides software and information resources related to using DVDs with Linux:
http://dvd.sourceforge.net/
Supported formats
The following list outlines the tape formats supported in Linux: Travan
98
Digital Audio Tape (DAT) Digital Linear Tape (DLT) Super Digital Linear Tape (Super DLT) 8 mm Advanced Intelligent Tape (AIT)
Where: 1: Drive number 2: Optional density flag: [l]ow, [m]edium, [h]igh, [u]ltra, or [c]ompressed 3: Berkeley compatibility flag: [b] 4: No rewind option: [n] Linux has a different scheme for naming physical tape devices depending on the tape device type. Due to this variance on names, the /dev/tape device name is used for simplicity and links to the first tape device. Following sections highlight a few examples of supported tape device types and their naming scheme. For a compete list, see the device list maintained by the Linux Assigned Names And Numbers Authority (LANANA), available at:
http://www.lanana.org
99
100
The mt command
Both Solaris and Linux have the mt command for controlling magnetic tapes. The Linux version contains all the options of the Solaris version and more. Refer to the man page for more information about this command.
101
Often, a Solaris system administrator needs to configure a terminal to run across a serial port. Sun recommends using Solaris Management Consoles (smc) Serial Ports Tool for setting up terminals in Solaris. The Linux operating system represents serial port devices under the /dev file system as ttyS#, where # represents the serial port number. Unfortunately, neither Red Hat nor Novell SUSE provide a tool for configuring serial port terminals; however, the process to accomplish this setup is simple. The following sections provide the steps required to enable this feature in Linux.
Red Hat
Perform the following steps: 1. Open the /etc/inittab file. 2. Locate the following section:
# Run gettys in standard runlevels 1:2345:respawn:/sbin/mingetty tty1 2:2345:respawn:/sbin/mingetty tty2 3:2345:respawn:/sbin/mingetty tty3 4:2345:respawn:/sbin/mingetty tty4 5:2345:respawn:/sbin/mingetty tty5 6:2345:respawn:/sbin/mingetty tty6
Where: <baud> = baud rate of connection, for example, 38400 <serial device> = serial port device to which to attach terminal, for example, ttyS0 <TERM> = terminal type to run over connection, for example, xterm
102
4. Run the telinit q command, which tells the init program to check, or query, the /etc/inittab file and make changes as needed.
Novell SUSE
Perform the following steps: 1. Open the /etc/inittab file. 2. Locate the following section:
# #S0:12345:respawn:/sbin/agetty -L 9600 ttyS0 vt102
3. Remove the # and set the baud rate, serial device, and terminal type as needed. 4. Run the telinit q command, which tells the init program to check, or query, the /etc/inittab file and make changes as needed.
Novell SUSE
yast modem
103
baud_base: Configures the speed of the serial port Refer to the man page for further information about, as well as options for, the setserial command.
Port initialization
To initialize a specific serial port, such as ttyS0, run the following command:
setserial /dev/ttyS0 autoconfig
Novell SUSE provides an additional method for configuring serial ports. Initialization can be accomplished using the setserial script, located in /etc/init.d. Red Hat Enterprise Linux also provides a setserial command for managing initialization and settings. Refer the man page for setserial for more information.
This option can be issued at the boot prompt or appended into the bootloader configuration file. For information about booting, refer to 8.1, Booting a system on page 126 and 8.3, Boot configuration files on page 132.
mgetty mingetty
Novell SUSE
Novell SUSE also provides the original getty program for monitoring ports.
104
Services administration
Solaris provides the pmadm command to enable system administrators to list the services of ports associated with a port monitor, add services, and enable or disable a service. Linux does not have a similar command; however, you can accomplish the same functionality provided by pmadm. Table 6-11 lists the tty service-related tasks in Solaris and how to accomplish them in Linux.
Table 6-11 Solaris versus Linux tty port service commands Port service task Add a TTY port service View status on TTY port service Solaris pmadm -a pmadm -l Linux Add a service line in /etc/inittab. See man page. cat /etc/inittab ps -ef | grep tty ps -ewft cat /proc/tty/drivers Run telinit q after adding the service to the /etc/inittab file. Run telinit q after removing the service from the /etc/inittab file.
pmadm -e pmadm -d
105
106
Chapter 7.
Network services
This chapter discusses the differences in networking and networking services between Solaris and Linux. We do not describe what TCP/IP is and how to plan for your networking services, because this is the same for both operating systems. This chapter includes the following topics: IPv4 IPv6 Mixed IPv4 and IPv6 networks Static and dynamic routing IPSec and IKE Network multipath Network trunking IP network services TCP wrappers IP stateful firewalling
107
7.1 IPv4
IP version 4 is the default networking stack for all recent operating systems, and this is no exception for Solaris and Linux. However, there are a number of small differences between the two operating systems, and in this chapter, we highlight those differences.
IPv4 in Solaris
The installation program of Solaris will usually set the right networking parameters for you, so that after installation, the system is ready to operate in the network. To set or modify the TCP/IP parameters of a Solaris box after installation, you need to edit several files: /etc/hostname.interface /etc/netmasks /etc/nodename /etc/defaultdomain /etc/defaultrouter /etc/inet/hosts /etc/nsswitch.conf /etc/resolv.conf /etc/bootparams /etc/ethers File containing IP address or host name for each network interface you need to use. Contains subnetting information. Contains the host name of the system. Contains the fully qualified domain name of the system. Contains an entry for each router that the server will use. Database contains the local IP address to name mappings. The /etc/hosts is a symlink to this file. Contains configuration of network name services. Contains the DNS client configuration of the system. Contains information for serving network booting services. Contains information about the MAC to IP address mapping used by the rarpd daemon.
There are other files used by IPv4 networking (/etc/inet/services or /etc/inet/protocols), but their default values are fine for most applications and usually do not need any modification. To use dhcpagent, the DHCP client for configuring a network interface, you need to create an empty file /etc/dhcp.interface (such as /etc/dhcp.hme0). You can alter the default dhcpagent behavior by editing the /etc/default/dhcpagent configuration file. In addition, you can use the sys-unconfig command and reconfigure your Solaris box after a reboot.
108
IPv4 in Linux
The installation program of Linux also sets up networking parameters for you, so that after the installation process, the system is ready to operate in the network. To set or modify the TCP/IP parameters after the initial installation, you have the option of editing the configuration files or using a GUI. The GUI program for accomplishing this in RHEL is system-config-network and in SLES is yast2. The most important configuration files used by Linux networking services are: In RHEL: /etc/sysconfig/network-scripts/ifcfg-interface-name This file contains all the information needed for configuring a specific interface, including IP, subnet mask, broadcast, custom MAC address, and gateway, or if the interface is to be configured by DHCP or BOOTP protocol. In addition, you can configure whether the interface should be activated at boot time or later. If you choose to activate it later, you can do so with the ifup command. Other general networking options can be specified in the /etc/sysconfig/network file. For more information about the possible options to configure in these files, refer to the /usr/share/doc/initscripts-version/sysconfig.txt file and RHEL System Administration Guide. In SLES: /etc/sysconfig/network/ifcfg-interface-id-mac-address This file contains all the information needed for configuring that specific interface, including IP, subnet mask, broadcast, custom MAC address, and gateway, or if the interface is to be configured by DHCP or BOOTP protocol. In addition, you can configure whether the interface should be activated at boot time or later. If you choose to activate it later, you can do so with the ifup command. Other general networking options can be specified in the /etc/sysconfig/network/config file. For more information about the possible options to configure in these files, refer to the SLES Administration Guide.
109
/etc/services /etc/protocols
Contains TCP/UDP port numbers to service names mapping. Contains IP protocol numbers to protocol names mapping.
Task table
Table 7-1 illustrates network commands and configuration files in Solaris and their equivalent in Linux.
Table 7-1 Network commands and configuration files Task Configure TCP/IP Solaris Edit the following files: /etc/hostname.* /etc/inet/* /etc/defaultrouter /etc/defaultdomain /etc/nodename /etc/netmasks ifconfig netstat -i ifconfig Linux RHEL: /etc/sysconfig/network and /etc/sysconfig/networking/* SLES: /etc/sysconfig/network/*
Display interface settings Display interface status and statistics Configure interface
110
Task Check various network statistics Change resolver Configure name services Display kernel network parameters Configure kernel network parameters Check for network link Rename a network interface Check routing table Testing for connectivity Check IP path Capturing network packets
Solaris netstat vi /etc/resolv.conf vi /etc/nsswitch.conf ndd /dev/ip \? ndd /dev/tcp \? ndd ndd N/A netstat -r ping traceroute snoop
Linux netstat vi /etc/resolv.conf vi /etc/nsswitch.conf sysctl -a | grep ^net sysctl -w variable=value ethtool mii-tool ip netstat -r route ping traceroute tcpdump tethereal ethereal
Example 7-2 on page 112 shows sample output from ifconfig on Linux. Note the additional information provided. If the -a option is provided, it also lists all the inactive interfaces. Remember that Linux does not have the plumb/unplumb feature to enable and disable a network device.
111
Example 7-2 Sample Linux ifconfig output # ifconfig eth0 Link encap:Ethernet HWaddr 00:02:55:7B:02:B0 inet addr:9.3.5.11 Bcast:9.3.5.255 Mask:255.255.255.0 inet6 addr: fe80::202:55ff:fe7b:2b0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:847931 errors:0 dropped:0 overruns:0 frame:0 TX packets:211207 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:74462901 (71.0 MiB) TX bytes:280066144 (267.0 MiB) Base address:0x2500 Memory:fbfe0000-fc000000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:4944 errors:0 dropped:0 overruns:0 frame:0 TX packets:4944 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:3062806 (2.9 MiB) TX bytes:3062806 (2.9 MiB)
# # ifconfig -a eth0 Link encap:Ethernet HWaddr 00:02:55:7B:02:B0 inet addr:9.3.5.11 Bcast:9.3.5.255 Mask:255.255.255.0 inet6 addr: fe80::202:55ff:fe7b:2b0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:3569066 errors:0 dropped:0 overruns:0 frame:0 TX packets:4008490 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:426383647 (406.6 MiB) TX bytes:1746883088 (1.6 GiB) Base address:0x2500 Memory:fbfe0000-fc000000 eth1 Link encap:Ethernet HWaddr 00:02:55:7B:02:B1 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) Base address:0x2540 Memory:fbfc0000-fbfe0000 Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:5340 errors:0 dropped:0 overruns:0 frame:0 TX packets:5340 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:3194582 (3.0 MiB) TX bytes:3194582 (3.0 MiB)
lo
112
sit0
Link encap:IPv6-in-IPv4 NOARP MTU:1480 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
7.2 IPv6
We discuss IPv6 differences in this section.
IPv6 in Solaris
The installation program of Solaris asks if you want to configure IPv6 on that server and set the right networking parameters for you, so that after install, the system is ready to operate in an IPv6 network. To manually configure IPv6 on a Solaris system, you need to touch the /etc/hostname6.interface file for each IPv6 interface and reboot the system. Optionally, you can add IP to name mappings in the /etc/inet/ipnodes file. You can use most of the tools from IPv4 with special switches for IPv6.
IPv6 in Linux
The IPv6 stack is present by default in both RHEL and SLES, and you will have a link-local address on all your network interfaces. To modify the IPv6 stack configuration, you need to edit the following files: In RHEL: /etc/sysconfig/network-scripts/ifcfg-interface-name The file contains all the information needed for configuring IPv6 on that specific interface. You can also configure whether the interface should be activated at boot time or later. If you choose to activate it later, you can do so with the ifup command. Other general networking options can be specified in the /etc/sysconfig/network file. For more information about the possible options to configure in these files, refer to the /usr/share/doc/initscripts-version/sysconfig.txt file.
113
In SLES: /etc/sysconfig/network/ifcfg-interface-id-mac-address This file contains all the information needed for configuring IPv6 on that specific interface. You can also configure whether the interface should be activated at boot time or later. If you choose to activate it later, you can do so with the ifup command. You can specify other general networking options in the /etc/sysconfig/network/config file.
Solaris tunneling
In Solaris, you can add tunnel interfaces using the ifconfig command or adding options to the /etc/hostname6.interface file.
Linux tunneling
In Linux, you can create tunnels by adding configuration files for them in the /etc/sysconfig/network directory. For more information, see the documentation for your Linux distribution.
Routing in Solaris
To configure a Solaris box to act as a router, you need at least two network interfaces on that box. Then, you create a /etc/hostname.interface file for each network interface installed, specifying the host name or the IP address of that interface. Then, you must enter those host names and IP addresses in the /etc/inet/hosts file for IPv4 and /etc/inet/ipnodes for IPv6. If this Solaris router is part of any subnetted network, we add the subnets in the /etc/inet/netmask file. The startup scripts then determine if they need to start a routing daemon for learning and advertising routes (daemons such as RIP or RDISC) or use static routing.
114
On an end-user Solaris box, we can control the use of a static default route by editing the /etc/defaultrouter file. If the file contains a default gateway, the system uses that default gateway and does not launch a dynamic routing protocol such as RIP or RDISC. If the /etc/defaultrouter file is empty, the system tries to use a dynamic gateway first, using /usr/sbin/in.rdisc if it exists, and if this method fails, it starts the RIP routing protocol in passive, non-advertising mode. A machine with only one network interface can be forced to be a router by creating an empty /etc/gateways file. A machine with more than one network interfaces can be forced to be a multi-homed host instead of a router by creating an empty /etc/notrouter file. For IPv6 routing, you need to use the ndpd and ripngd daemons.
Routing in Linux
On a Linux box, regardless of how many network interfaces you have, the routing functionality can be enabled by the sysctl program. To enable routing, enter the following command in the /etc/sysctl.conf file and then run sysctl -p:
net.ipv4.ip_forward = 1
This configures the kernel to permit IP packet forwarding from one network interface to another one. Also check if the IP firewall service is configured properly for your environment. By default, static routing is used for both network router and end-user configurations. If a DHCP client is used for configuring the network parameters, the default gateway DHCP option is also considered a static route because it is not dynamically modified during the lease period. If dynamic routing is required, we have several daemons available in the quagga package: ripd ripngd ospfd ospf6d bgpd radvd For RIP routing protocol For IPv6 RIP routing protocol For OSPF routing protocol For IPv6 OSPF routing protocol For BPG routing protocol For router advertisement daemon for IPv6
All these routing protocol daemons have their own configuration file in the /etc/ directory.
115
For more details about the configuration of dynamic routing protocols, consult the documentation of the quagga package and the distribution manuals or visit the Web site at:
http://www.quagga.net/
116
Solaris trunking
In Solaris, you need to have a special quad network adapter for creating network trunks. Then, you can use several network interfaces from this adapter to create a trunk interface, which is like a big pipe composed of all the individual interfaces. You assign the IP address only to the trunk interface.
Linux bonding
The Linux bonding driver provides a method for incorporating multiple Ethernet network interfaces into a single bonded interface. You can create configuration files for them in the /etc/sysconfig/network directory. The bonded interfaces can provide either hot standby or load balancing services. In addition, link integrity monitoring can be performed. The ifenslave user-level control program is included in both RHEL and SLES distributions. For more information about configuring a bonded interface, refer to the documentation located in the /Documentation/networking/bonding.txt file of the kernel source tree or visit the official project Web site at:
http://sourceforge.net/projects/bonding
Tip: If you only need more bandwidth, Linux supports 1 Gb and 10 Gb network interfaces.
Linux bridging
In Linux, you can create interface bridges with any Ethernet network interface by using commands from the bridge-utils package. For more information, see the Linux distribution and bridge-utils package documentation, the /Documentation/networking/bridging.txt file of the kernel source tree, and visit the official project Web site at:
http://bridge.sourceforge.net
For an example of using the bridge-utils package, refer to Physical and virtual network bridging on page 296.
117
All services to be run by the inetd daemon are defined in the /etc/inetd.conf configuration file.
The syntax of the xinetd configuration files is also different than inetd. Example 7-3 shows an example of a configuration file for Telnet services.
Example 7-3 Example xinetd service configuration service telnet { socket_type = stream protocol = tcp wait = no user = root server = /usr/sbin/in.telnetd disable =yes }
Note that the default state for an xinetd service is disabled. With xinetd, it is possible to configure specific logging and network access control for each separate service. The network access control feature can be implemented in two
118
ways: with the built-in support of xinetd, or with the standard tcpd program from the tcp-wrappers package. If any of the configuration files are modified while xinetd is running, we need to send a SIGHUP signal to xinetd in order to reread its configuration; otherwise, it will still run with the old configuration. For more information about xinetd, check the man page of xinetd, xinetd.conf, and xinetd.log. Tip: It is not uncommon that services in one system are inetd or xinetd based, and in other systems are stand-alone services. This depends on your distribution and release level.
7.8.2 DHCP
The Dynamic Host Configuration Protocol (DHCP) server from Solaris and Linux have comparable features: Support for previous BOOTP clients Support for local and remote clients by using DHCP relay services Large network support Network booting information for DHCP clients Support for vendor options DDNS updates However, the server itself is very different in terms of management scripts and configuration files.
119
it is to edit the files as needed and restart the daemon with /etc/init.d/dhcpd restart. In SLES, there is a DHCP server configuration module in the YaST2 program. Important: In order to use the DHCP server with IBM Eserver i5 and Eserver p5 OpenPower firmware, you need to run a different DHCP server than the supplied with SLES9. By default, the SLES9 DHCP server uses Berkeley Software Design, Inc. (BSD) type sockets. This DHCP server always sends a broadcast response that the OpenPower firmware does not understand. The Linux Packet Filter (LPF) type sockets send a unicast response, to which the firmware will reply. Because of this caveat, SLES9 ships with two DHCPD binaries, dhcpd and dhcpd.lpf. In order to use the LPF DHCP server, you need to change the DHCPD_BINARY variable in /etc/sysconfig/dhcpd to:
DHCPD_BINARY="/usr/sbin/dhcpd.lpf"
For more information about DHCP, check the man pages for dhcpd and dhcpd.conf and the documentation that came with your distribution.
7.8.3 DNS
Both operating systems use BIND as the Domain Name System (DNS) server. Modern Linux distributions are based on BIND 9, so if you are familiar with BIND 8 or later on Solaris, you will be able to configure BIND 9 on Linux. The main configuration file is the same: /etc/named.conf in both Solaris and Linux.
7.8.4 NTP
Linux supports both a client and server Network Time Server (NTP) daemon service. While the configuration files for this service are in /etc/inetd/* on Solaris, Linux configures this using the /etc/ntp.conf file.
7.8.5 LDAP
Both Solaris and Linux support Lightweight Directory Access Protocol (LDAP) as a client and server. For information about this topic, see 11.3, Directory services on page 163.
120
7.8.7 NFS
The Network File System (NFS) is used on both Solaris and Linux for sharing file systems across a network. Both operating systems can act as servers and as clients, even at the same time.
Consult the man page for exports for information about the options in the /etc/exports file.
121
Both Red Hat (system-config-nfs) and SUSE (yast2) offer GUI-based NFS server configuration.
Mount a resource on a NFS client NFS server general config file NFS logging options config file Share all exported file systems Share a new file system Config file of shared file systems
122
123
124
Chapter 8.
125
boot -a
126
Boot type Recovery boot mode Interactive start of services while booting Emergency boot mode
Linux Boot from a rescue CD-ROM or from the network. Possible, but vendor dependent. Add emergency or the -b option at the end of boot line.
127
128
The kernel starts initializing devices and loads additional device drivers from the initrd image. It then starts the /sbin/init program, which brings up the system based on information in the /etc/inittab file. The GRUB boot loader is also interactive, so you can modify what kernel to boot and its parameters before booting the system. This is equivalent to the interactive booting of Solaris with the boot -a command, but allows more control. At the GRUB prompt, you can change the automatic startup and edit the boot option strings. To edit the current boot entry in GRUB, you need to press e in Red Hat or Esc in SUSE. When in the GRUB interactive prompt, you can change the boot parameters before the kernel is loaded. Example 8-1shows some sample boot strings for RHEL.
Example 8-1 Changing boot parameters in GRUB root (hd0,0) kernel /boot/vmlinuz-2.6.9-11.ELsmp ro root=LABEL=/1 rhgb quiet initrd /boot/initrd-2.6.9-11.ELsmp.img
For example, if you want a verbose boot for the above boot string, remove rhgb quiet. For more information about GRUB, refer to the Linux man pages or the project Web site at:
http://www.gnu.org/software/grub/
Whenever you update the Linux kernel, a new boot entry is created for you in the GRUB configuration file and a new initrd image is created to match the new kernel. If you need to create a custom initrd image, refer to the man pages for the mkinitrd command. All kernel modules that can be used for a specific kernel are in the /lib/modules/uname -r/ directory. Table 8-4 on page 130 shows the major differences between booting in Solaris and Linux.
129
Table 8-4 Booting process Booting information Boot process Solaris Phases: 1. OpenPROM: Displays system information, runs POST, loads bootblk, locates ufsboot. 2. Boot programs: bootblk loads and executes the ufsboot. 3. Kernel initialization: ufsboot loads and executes the core kernel, initializes core kernel data structures, loads other kernel modules based on the /etc/system file, starts /sbin/init program. 4. init: Starts other processes based on the /etc/inittab file. 5. /sbin/rcX runs the corresponding /etc/rcX.d scripts to start up other components. Linux Phases: 1. BIOS: Checks the system and peripheral devices. Locates and runs the Master Boot Record (MBR). 2. MBR loads GRUB (GRand Unified Bootloader). 3. GRUB boots the kernel using information in /boot/grub/menu.lst. 4. Kernel starts initializing devices and loads additional device drivers from initrd image, and then starts init process from /sbin/init. 5. init: Starts other processes based on the /etc/inittab file. 6. /etc/rc.d/rc in RHEL or /etc/init.d/rc in SLES runs the corresponding /etc/rcX.d scripts to start up other components. /boot contains the kernels and initrd images.
/kernel - Contains common components. /platform/platform-name/kernel Contains the platform-specific kernel components. /platform/hardware-class-name/ker nel - Contains kernel components specific to this hardware class. /usr/kernel - Contains kernel components common to all platforms within a particular CPU set.
130
Solaris Each of the subdirectories mentioned in the previous cell might contain the following subdirectories: drv - Contains loadable device drivers. exec - Contains modules that run programs stored in different file formats. fs - Contains file system modules. misc - Contains miscellaneous system-related modules. sched - Contains operating system schedulers. strmod - Contains loadble System V STREAMS modules. sys - Contains loadable system calls. cpu - Contains CPU type-specific modules. tod - Contains time-of-day hardware modules. sparcv9 - Contains 64-bit versions of specific modules.
131
Table 8-5 Run levels Run level S or s Solaris Single user level (boot -s). Only some file systems are mounted, as opposed to run level 1. Shuts down the operating system. Does not attempt to turn off the power. Returns to OpenPROM ok prompt. Administrative single user mode. Can access all available file systems. User logins disabled Multiuser without NFS resources shared. Multiuser with NFS resources shared (default run level for Solaris). The login is text or graphical, depending on the console capabilities. N/A (alternate multiuser). Power-down state. Shuts down the operating system and tries to turn power off if supported by the system. Reboot. N/A. Linux Minimal single user mode on SUSE. In Red Hat, it is the same as init level 1 Power-down state. Shuts down the operating system and tries to turn power off if supported by the system. Equivalent to Solaris run level 5 Single user mode.
2 3
Multiuser without NFS resources shared. Text-only login. Multiuser with NFS resources shared. Text-only login.
4 5
N/A (alternate multiuser). Full multiuser, NFS resources shared, and graphic login with X display manager. Reboot. Same as in Solaris. Ignore the /etc/inittab file and launch the default shell.
6 emergency
In both the Solaris and Linux operating systems, you can check out the current run level with the who -r command, and in Linux, you can additionally use the runlevel command for this task. Note: In Linux, the default run level is 5 (full multiuser with graphic login) unless there is no graphic card available, and then the default run level is 3 (full multiuser with text login).
132
133
../init.d/sendmail script, and depending on the name of this link, the sendmail script will start or stop the service. Also new in Linux is the ability to restart or check the status of most of the services by passing the argument restart or status to the service script in the /etc/init.d directory:
# /etc/init.d/sendmail restart
And:
# /etc/init.d/sendmail status
Running the service script without options lists the supported options for that specific script:
# /etc/init.d/sendmail Usage: /etc/init.d/sendmail {start|stop|restart|condrestart|status} #
Tip: Red Hat provides the service script in /sbin, which enables you to run service scripts without specifying the file path:
# service sendmail status
Novell SUSE links many of the /etc/init.d/ service scripts to /usr/sbin/rc* files, which also removes the file path restriction:
# rcnfsserver Usage: /usr/sbin/rcnfsserver {start|stop|status|try-restart|restart|force-reload|reload}
In Linux, we can use the same method as in Solaris for a temporary change, but the proper way is to use the chkconfig command or GUI programs such as system-config-services in Red Hat, or the System/Runlevel Editor module from yast2 in SUSE. For more information about chkconfig, refer to its man page or the Red Hat and Novell SUSE documentation.
134
This can be done manually by editing the configuration files, or automatically by using the add_install_client script from the installation CD or DVD.
135
Table 8-7 Linux network boot services Service dhcp tftp nfs Description For network boot configuration For serving the kernel and initrd image to boot For sharing file systems
Again, you can execute this task by modifying the configuration files or by using a GUI. The GUI is called system-config-netboot in RHEL, and in SLES, you can use the Network Services module from yast2 to configure dhcp/tftp/nfs services. You might need to manually configure support for network booting. Table 8-8 provides a list of the configuration files for controlling the server processes.
Table 8-8 Linux network boot configuration files File /etc/dhcpd.conf /etc/xinetd.d/tftp /etc/exports Description For DHCP services For TFTP services For NFS services
Then, make sure that the services are restarted and the firewall policy is not blocking any of the needed protocols.
136
Linux Not needed if the initrd image is enough or using other means for network file access.
137
138
Chapter 9.
139
Task table
Table 9-1 illustrates system information commands.
Table 9-1 System information commands System information task List system information List processor information List system memory size List disk space usage List file space usage List physical disks Show the systems host name List systems network configuration List active processes List system configuration List system diagnostic information Solaris uname psrinfo prtconf | grep Memory df du format hostname ifconfig prstat prtconf prtdiag Linux uname cat /proc/cpuinfo cat /proc/meminfo | grep MemTotal df du fdisk -l hostname ifconfig ps -e In Red Hat: lshal In Novell SUSE: hwinfo In Red Hat: lspci and /proc/* files In Novell SUSE: hwinfo
140
availability. If this is a product that you have used on Solaris systems, you might consider using the Class-based Kernel Resource Management framework in Linux, or IBM Tivoli Workload Scheduler.
Linux CKRM
Linux Class-based Kernel Resource Management (CKRM) is a framework for allocating system resources (such as CPU, memory, I/O, and network) based on user-defined classifications of work. CKRM gives a user-level application the ability to allocate hardware resources to applications as defined by the system administrator. CKRM is currently shipped with SUSE SLES9. For more information about how to use CKRM, visit the CKRM project Web site:
http://ckrm.sourceforge.net/
141
SUSE provides a set of soft links to these scripts for managing system resources. The linked files are /usr/sbin/rc*. These files correspond to the scripts in /etc/init.d. You can use either of these commands to check the status of the cron daemon:
/etc/init.d/cron status rccron status (in path from /usr/sbin)
Red Hat provides the service command. You can use either of these commands to check the status of the cron daemon:
/etc/init.d/crond status service crond status
142
xinetd (pid 2319) is running... ypbind is stopped rpc.yppasswdd is stopped ypserv is stopped
Any of the previous services can be started or stopped by issuing the command:
/sbin/service smbd start
Or:
/sbin/service smbd start
Note that the service command is only available for Red Hat. The chkconfig command has the same function as the service command and is available on both Red Hat and SUSE.
off
143
Note the different run levels for which the services are being enabled. Keep in mind that, in Linux, unlike Solaris, the run level is not run from the lowest to the desired run level, but instead, it only runs the startup scripts specified at the desired run level.
Task table
Table 9-2 illustrates system service management commands.
Table 9-2 Summary of system service commands Task Add a service that does not already exist in chkconfig Show existing service links Enable service to start at boot time Solaris Copy start script into the appropriate run level directory, prefixed with S ls run level directory Copy start script into the appropriate run level directory, prefixed with S Rename the service start script to a name that does not start with S (typically lowercase s) Red Hat chkconfig --add service name SUSE chkconfig -a or --add service name
144
The cron command allows for a command to be run at a predefined time, but offers much more flexibility than the at command. Both Solaris and Linux handle the two scheduling methods the same way. The anacron command is unique to Linux. This command is used just like cron, except that it allows for those scheduled commands that were not run due to the system being powered off or in suspended state to be run after the system is up and running normally again, sort of like a catch-up mode. This can be very useful in the case of desktops and notebooks that are sometimes powered off. The cron and anacron services use tables to schedule the jobs to run. For more information about configuring commands to run, refer to the man pages.
Task table
Table 9-3 illustrates scheduling and cron management commands.
Table 9-3 Scheduling and cron service commands Task Run a command at a predefined time Run a command or set of commands periodically Run a command or set of commands periodically, running when possible if system is off at the scheduled time Solaris at cron and crontab N/A Linux at cron and crontab anacron and anacrontab
9.5 Quotas
This section describes the differences in the quota commands. The quota commands are for managing disk usage and limits. The quota commands on Linux are very similar to those on Solaris; however, there are subtle differences in the command line parameters available. Check the man pages for further details about the differences.
Task table
Table 9-4 on page 146 illustrates quota commands.
145
Table 9-4 Quota commands Quota task Display disk usage and limits Edit users quotas Check consistency between a file system and the disk quota file Solaris quota edquota quotacheck Linux quota edquota quotacheck
9.6.1 Solaris
The commands on Solaris are very similar to those available on Linux with the exception of the ac command. There is not an equivalent command with similar functionality.
9.6.2 Linux
On Linux, the commands differ somewhat from the commands on Solaris. The accton and lastcomm commands are very similar to those found on Solaris. Refer to the man pages for any differences in these commands.
Task table
Table 9-5 illustrates package commands.
Table 9-5 Process accounting commands Process accounting task Turn on process accounting List users connection time List commands run previously List users connection time and idle time Solaris accton none exists lastcomm who Linux accton ac lastcomm who
146
Another commonly used remote system management service is the Simple Network Management Protocol (SNMP). SNMP is an Internet Engineering Task Force (IETF) standard and is perhaps the most widely implemented standard for system management. The data model used by an SNMP service is called a Management Information Base (MIB). Different sections of this MIB are supported by different devices and servers depending on the services available on the system. For more information about the SNMP service, refer to the ITEF Web site:
http://www.ietf.org
Solaris
Some of the Solaris commands for the WBEM services include: init.wbem wbemadmin wbemlogviewer Used to start, stop, or retrieve status from the CIM server. Sun WBEM user manager. WBEM log viewer GUI.
147
The CIM server on the Sun Solaris platform is managed with the inet.wbem command. The inet.wbem command is in the /etc/initd directory. The init.wbem command accepts the start, stop, and status parameters.
Red Hat
Starting in RHEL4 Update 2, the OpenPegasus CIM server is available. For more information about the OpenPegasus CIM Server, refer to the OpenPegasus Web site:
http://www.openpegasus.org
Additionally, you can read more about how to set up and use the service by reviewing the documents in the /usr/share/doc/tog-pegasus-* directory. Some of the commands available for the OpenPegasus WBEM services include: cimconfig cimserver cimauth wbemexec cimprovider Provides command line interface to manage CIM server configuration properties. Starts and stops the CIM server. Adds, modifies, removes, or lists CIM user authorizations. Provides command line interface for querying CIM objects. Disables, enables, removes, and lists registered CIM providers or CIM provider modules and module status.
OpenPegasus is started and stopped with the cimserver command in /usr/sbin, or with the tog-pegasus command in /etc/inet.d. These commands can only be executed as a privileged user. The cimserver command starts the service, and using the -s parameter, stops the service. The osinfo command is useful for checking the status of the cimserver process and it also reports the system information. For more information about these and other commands, refer to the man pages. To enable the service to start at run time, run the chkconfig commands:
chkconfig --add tog-pegasus chkconfig tog-pegasus on
Or run the cimserver command. There are a very basic set of providers that are included with the OpenPegasus package. To make the service more useful, a more extensive set of
148
instrumentation for Linux is available through the Standards Based Linux Instrumentation for Manageability (SBLIM) project. For more information about the SBLIM project, refer to the project Web site:
http://sblim.sourceforge.net
Novell SUSE
On SUSE, the OpenPegasus CIM server is also available, but it is on the SDK CD and must be installed separately. The default CIM server for SUSE is the OpenWBEM CIM server. For more information about the OpenWBEM CIM server, refer to the OpenWBEM Web site:
http://www.openwbem.org
In addition, there is documentation about how to configure and use the service in the /usr/share/doc/packages/openwbem directory. Some of the commands available for the OpenWBEM service include: owcimomd rcowcimomd owenumclasses OpenWBEM CIM server. Starts, stops, and queries status of CIM server. Lists CIM classes.
The OpenWBEM service can be started by using the owcimomd command in /usr/sbin. More information about these and other commands can be learned from the man pages. To start the service and to enable it to start at run time, run the chkconfig command:
chkconfig owcimomd on
The more extensive set of instrumentation for Linux referenced earlier, the SBLIM providers, are included in the Novell SUSE release. You can install these providers to greatly expand the amount of management information available.
149
Solaris
The Solaris SNMP service is started at boot time through the startup script /etc/rc3.d/S76snmpdx. To start and stop the service manually, run the script with the start and stop command line parameters:
/etc/rc3.d/S76snmpdx start /etc/rc3.d/S76snmpdx stop
The configuration file, snmpd.conf, is in /etc/snmp subdirectory for Red Hat, and in /etc for Novell SUSE.
Linux
Both Red Hat and Novell SUSE include the Net-SNMP package as their default SNMP service. For more information about the Net-SNMP package, refer to the Net-SNMP project page:
http://www.net-snmp.org/
You can also read more about Net-SNMP in the documents in the /usr/share/doc/packages/net-snmp directory. There are some excellent SNMP tutorials available at:
http://www.simpleweb.org/
Starting the Linux SNMP daemon is done either by running the snmpd command or enabling the service to start at boot time. There are many command line options, but usually, if started from the command line, the service is just simply started with the default command line options by running the snmpd command. For more information about the snmpd command, review the man page. To enable the service to start at run time, run the chkconfig command:
chkconfig snmpd on
To configure the SNMP service, you need to edit the /etc/snmpd.conf file. The file has basic instructions for configuration, but you might want to refer to the man page for snmpd.conf as well. To make the SNMP service secure, you need to configure SNMPv3. A full tutorial about how to set this up is beyond the scope of this book. For more information, refer to the SNMPv3 readme in the /usr/share/doc/packages/net-snmp directory.
150
10
Chapter 10.
Printing services
This chapter discusses commonalities and differences in printer management between Sun Solaris and Linux. In this chapter, we discuss the following topics in detail: Linux CUPS Client and server setup Printer management using the lp commands Printer types and CUPS support
151
10.1 Overview
The printing subsystem on Linux is, on the surface, similar to the one on Solaris, supporting all the familiar BSD and System V UNIX-based lp command line utilities. Underneath, however, is the Common UNIX Printing System (CUPS), which is based on the new Internet Printing Protocol (IPP) standard. IPP has been adopted by many printer and print server makers, and was added by Microsoft into its Microsoft Windows 2000 product. While CUPS also supports the widespread UNIX-based LPD protocol, it is worthwhile to understand the Linux standard mechanism.
152
Network printing
Linux CUPS supports networked printing through IPP, LPD (RFC 1179), SMB (Windows share), or direct socket. Configuration is possible for all through the command line, Web, or GUI. IPP is the preferred method between two CUPS servers or between the CUPS server and client. CUPS also supports printers attached through Novell NetWare technology and HP JetDirect system.
153
While the basic option/flag sets of these commands are the same, there are differences in details based on how CUPS manages printers.
Solaris specific
Solaris provides some additional utilities to manage the print services, which are not available on Linux. They are as follows: lpsched lpset lpshut lpsystem lpusers lpforms lpget lpfilter Start the LP print service daemon Set printing configuration in /etc/printers.conf Stop the lp print service Register remote systems with print service Set printing queue priorities Administer forms used with the lp service Get printing configuration Administer filters used with the lp service
154
Linux specific
Linux also provides some additional functions and capability to manage the print services. They are as follows: cupsd lpinfo lpoptions lppasswd Start the common UNIX printing system daemon Show available devices or drivers Display or set printer options and defaults Add, change, or delete digest password in CUPS
Important: Most Linux distribution vendors advise against configuring the printing system through the direct editing of the configuration files. The CUPS service dynamically builds the configuration files each time it is started, and changes will be lost. The /etc/printcap file (for example) is created only for the purpose of compatibility with printcap-based applications.
Task table
Table 10-1 organizes the command comparison by administrator task.
Table 10-1 Print service management task commands Task Run multiple tasks in a GUI environment Add a printer Start a print queue Stop a print queue Display print queue status Cancel a print job Add a print queue Change a print queue Remove a print queue Display settings of a print queue Set print queue settings Print files Solaris admintool lpadmin accept, enable, or lpc reject, disable, or lpc lpstat or lpc cancel lpadmin lpadmin lpadmin lpadmin lpadmin lp or lpr Red Hat system-config-printe r-gui lpadmin accept, enable, or lpc reject, disable, or lpc lpc or lpq cancel or lprm lpadmin lpadmin lpadmin lpadmin or lpoptions lpoptions lp or lpr SUSE yast2 lpadmin accept, enable, or lpc reject, disable, or lpc lpc or lpq cancel or lprm lpadmin lpadmin lpadmin lpadmin or lpoptions lpoptions lp or lpr
155
Task Display print service status information Move the print request to another print queue Print services daemon Start and stop script for the print services daemon Put printing config information in the system config database Display printing config information from the system config database Register remote print queues in local system Set printing queue priorities for users Configure forms for the print queue Apply filters to the print queue Display available devices or drivers Manage digest password in CUPS
N/A
N/A
lpget
N/A
N/A
156
PostScript
CUPS supports these printers by default, using either supplied PostScript Printer Description (PPD) files for your brand and model of printer, or those available from your printer manufacturer, or from places such as:
http://www.linuxprinting.org/
Proprietary
A few of the least expensive printers use proprietary communication models and come with Windows-only drivers. Lexmark inkjet printers are a common example of this. These are usually poorly-supported by Linux, if they are supported at all. You might find help for some models at:
http://www.linuxprinting.org/
157
158
11
Chapter 11.
159
11.2 Commands
The following command line-based user ID administration tools have very similar basic functionality between Solaris and Linux: useradd usermod userdel For these command line-based tools, functions such as adding comments, setting home directory path, base group ID, and other group IDs, creating a home directory, using skeleton profiles, and the default shell settings are the same between Solaris and Linux.
-M option
160
/etc/login.defs. By giving it this parameter, it overwrites that option to not create it. -n option The useradd command creates a group name to the same user name by default. By giving this parameter, it will not create the group name with the same name as the user name. Not to add the user to the last login log. Assign a user passwd when adding the user account. Assign a UID that is lower than the UID_MIN set in /etc/login.defs, which can make the user ID a system account.
-D or --binddn <binddn> option Add the user using the Distinguished Name binddn to bind to the LDAP directory. -P or --path <path> option Add the user ID in a different path for the passwd and shadow files. --service option --usage option Add the user account using the special service, which can be a local file, LDAP, NIS, or NIS+. Display a short list of valid options.
--show-defaults option Display the default settings for the user parameters: homedir, expiry, inactivity, gid, other groups, and default shell. --save-defaults options Change the default settings for the user parameters. Note: Both Solaris and Red Hat use the -D option to set and display the user parameter defaults. However, SUSE Linux uses the -D option for a different purpose.
161
option settings defined in the previous list. The command differences are as follows: Solaris: The usermod command enables you to change most of the parameters that are set by the useradd command. Red Hat: This also enables you to change most of the parameters that are set by the useradd command, with the following available options: -L option -U option SUSE: The usermod does not allow the changes to any of the basic user account parameter except for the following changes: -D <binddn> option -P <path> option Change the Distinguished Name binddn. Change the path for the passwd and shadow files. Change the user accounts password. -r <service> option Change the accounts special service procedure. Either local files, LDAP, NIS, or NIS+. Lock the user account. Unlock the user account.
162
163
OpenLDAP is also available for Solaris. In addition to the documentation provided by SUSE and Red Hat, for a good how-to for LDAP administration, refer to the Linux Documentation Project (http://www.tldp.org/HOWTO/LDAP-HOWTO/index.html). There are modules (pam_ldap and nss_ldap) available to allow for workstation authentication against LDAP. The /etc/ldap.conf and /etc/nsswitch.conf files have the same content on both operating systems. If you plan to connect Linux LDAP clients to Suns LDAP offerings, the connection should be straightforward. If you are moving from Suns offerings to a Linux LDAP server solution, keep in mind that authentication methods and schemas will probably differthe LDAP technical community have not completely standardized in these areas. The basic configuration command on RHEL4 is system-config-authentication, and on SUSE the YaST2 GUI contains modules for configuring either an LDAP client or server. The OpenLDAP administration commands themselves are: ldapadd ldapcompare ldapdelete ldapmodify ldapmodrdn ldappasswd ldapsearch ldapwhoami Add entry Perform compare based on parameters Delete entry modify entry Rename (modifies RDN) entry Set password of entry Connect to server and searches based on parameters Perform LDAP whoami operation
164
listen lp nobody noaccess nobody4 sync shutdown halt mail news operator games
37:4 71:8 60001:60001 60002:60002 65534:65534 N/A N/A N/A N/A N/A N/A N/A
N/A 4:7 99:99 N/A N/A 5:0 6:0 7:0 8:12 9:13 11:0 12:100
N/A 4:7 65534:65533 N/A N/A N/A N/A N/A 8:12 9:13 N/A 12:100
165
User gopher man ftp squid pvm named at postgres mysql ncsd mdom rpcuser wwwrun rpc amanda netdump rpm ntp canna irc mailman gdm
Solaris UID:GID N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
Red Hat UID:GID 13:30 N/A 14:50 23:23 24:24 25:25 N/A 26:26 27:27 28:28 N/A 29:29 N/A 32:32 33:6 34:34 37:37 38:38 39:39 N/A 41:41 42:42
SUSE UID:GID N/A 13:62 40:49 31:65534 N/A 44:44 25:25 26:26 60:2 N/A 28:28 N/A 30:8 N/A 37:6 104:104 N/A 74:65534 N/A 39:65534 72:67 50:15
Comment
Man pages viewer FTP user Squid proxy server Parallel processing pkg
Batch daemon PostgreSQL server mySQL server ncsd daemon Mailing list agent RPC service user WWW daemon Apache Portmapper RPC user Amanada backup suite netdump Package manager
Canna service users IRC daemon GNU mailing list mgr GNOME desktop
166
User xfs mailnull apache wnn ldap vscan webalizer pop haldaemon vcsa snort sshd radvd
Solaris UID:GID N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
Red Hat UID:GID 43:43 47:47 48:48 49:49 55:55 N/A 67:67 N/A 68:68 69:69 N/A 74:74 75:75
SUSE UID:GID N/A N/A N/A N/A 76:70 65:103 N/A 67:100 N/A N/A 73:68 71:65 N/A
Apache Wnn input server LDAP user Virus scanner Webalizer POP server HAL daemon Virtual console memory owner Snort network monitor Privilegeseparated SSH Router advertisement daemon Cyrus IMAP server Network monitor user mgetty fax spool System message bus Mail server Quagga routing suite Spam/virus pkg Radius user
167
Table 11-2 Group ID differences Group root other bin sys adm uucp mail tty lp nuucp staff daemon sysadmin smmsp nobody noaccess nogroup disk Solaris 0 1 2 3 4 5 6 7 8 9 10 12 14 25 60001 60002 65534 N/A Red Hat 0 N/A 1 3 4 14 12 5 8 N/A N/A 2 N/A N/A 99 N/A N/A 6 SUSE 0 N/A 1 3 N/A 14 12 5 7 N/A N/A 2 N/A N/A 65533 N/A 65534 6
168
Group mem www kmem wheel news man shadow dialout audio floppy games cdrom slocate console utmp squid pvm named at postgres mysql nscd mdom rpcuser gopher rpc public
Solaris N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
Red Hat 8 N/A 9 10 13 15 N/A N/A N/A 19 20 N/A 21 N/A 22 23 24 25 N/A 26 27 28 N/A 29 30 32 N/A
SUSE N/A 8 9 10 13 N/A 15 16 17 19 40 20 N/A 21 22 N/A N/A 44 25 26 N/A N/A 28 N/A N/A N/A 32
169
Group video netdump rpm ntp canna dip mailman xok gdm trusted xfs modem mailnull apache wnn ftp smmsp lock ldap maildrop man pkcs11 sshd webalizer haldaemon snort vcsa
Solaris N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
Red Hat N/A 34 37 38 39 40 41 N/A 42 N/A 43 N/A 47 48 49 50 51 54 55 N/A N/A N/A N/A 67 68 N/A 69
SUSE 33 N/A N/A N/A N/A N/A 67 41 N/A 42 N/A 43 N/A N/A N/A 49 N/A N/A 70 59 62 64 65 N/A N/A 68 N/A
170
Group ntadmin sshd radvd pcap fax dbus postfix postdrop quagga exim radiusd dovecot ident users htt quaggavt vscan dump nfsnobody
Solaris N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
SUSE 71 N/A N/A N/A N/A N/A 51 N/A 101 N/A 102 N/A N/A 100 N/A N/A 103 104 N/A
171
172
12
Chapter 12.
173
Certain tools are installed by default. You should review these packages and install them if your installation requires the tools provided by the packages: For RHEL: sysstat package: sar, iostat sysreport package: sysreport (system information collector) For SLES: sysstat package: sar, iostat siga package: siga (System Information GAthering) Many of the commands discussed in this chapter have options that allow them to be run iteratively. The output from these commands will eventually scroll off the screen. You can save the output several different ways. For example: Execute the command in a script subshell. Redirect the output to a file with the redirect operator > or >>. Redirect the output to a file with the tee command and view it at the same. Execute the command with the watch command. Here are three more points to consider: Log files showed be reviewed on a regular basis. You can use the dmesg command to display the current messages in the kernels ring buffer. The /proc file system contains system-wide and process-specific configuration and state information. There are configuration files associated with some of the commands in this chapter. Refer to the documentation for each command to find the location and format of its configuration file. Linux kernel parameters can be displayed with the sysctl -a command. Setting kernel parameters is outside the scope of this chapter.
174
12.1 Processors
Processor configuration information is in The /proc/cpuinfo file. Table 12-1 describes the differences in CPU monitoring commands.
Table 12-1 CPU monitoring commands Solaris iostat mpstat psrinfo, sar -r ps sag top uptime vmstat w Linux iostat mpstat procinfo ps isag top uptime vmstat w Comments Display I/O statistics Display individual processor statistics in a multiprocessor system Display system status for CPU and memory usage Per process CPU utilization and time Display sar data graphically Display top CPU user for running processes and CPU and memory statistics Load average for the past 1, 5 and 15 minutes Display virtual memory statistics Display who is currently logged in
In addition to these tools, a profiling suite known as OProfile is available. OProfile is a system-wide profiler for Linux systems, capable of profiling all running code without too much extra impact on system load. It consists of a kernel driver and a daemon for collecting sample data and several post-profiling tools for turning data into information. This tool ships with RHEL4. In SUSE, the kernel is enabled for it (the driver portion) and the daemon is available from:
http://oprofile.sourceforge.net/
175
Table 12-2 Real and virtual memory monitoring commands Solaris sar -r psrinfo sag sar top vmstat Linux free procinfo isag sar top vmstat Comments Display amount of free and used memory Display system status for CPU and memory usage Display sar data graphically Display, collect, or store system activity status Display top CPU user for running processes and CPU and memory statistics Display virtual memory statistics
176
software RAID devices. Table 12-4 illustrates software RAID monitoring commands.
Table 12-4 Software RAID monitoring commands Solaris metastat metadb Linux cat /proc/mdstat lsraid (SUSE only; deprecated in Red Hat, use mdadm instead) mdadm sgraidmon (SUSE only) Comments Display status information for software RAID devices List and query MD devices
mdmonitord N/A
Manage and monitor software RAID devices Monitor SCSI devices for hot-removal and hot-insertion events
177
Comments Report physical volume information Display volume group attributes Report volume group information
12.4 Network
Table 12-7 illustrates some network activity monitoring commands. Additional network performance information is available in /proc/slabinfo.
Table 12-7 Network monitoring commands Solaris N/A ifconfig N/A netstat nfsstat Linux ethereal ifconfig mrtg netstat nfsstat Comments Graphical network protocol analyzer. Available for Solaris, but not installed by default. Configure network device. Monitor traffic load. Available for Solaris, but not installed by default. Display network statistics, routing information, connections, and so on. Display NFS statistics.
178
Comments Send ICMP echo request packets to network host. Display sar data graphically. The -n parameter on Linux can be used to report different types of network activity. Display network packets. Test network connectivity using a UDP protocol. Dump network traffic.
179
180
13
Chapter 13.
181
Common tools
The following tools are some of the tools available for all three operating systems discussed in this book: bzip2, bunzip2, bzcat, bzip2recover compress, uncompress gzip, gunzip, gzcat gznew (recompress .Z files to .gz files) gzexe (compress executable files in place) pack, pcat, unpack zip, zipcloak, zipnote, zipsplit There are other programs that come with some of these tools that do specific functions. For example, gzgrep provides the ability to grep within a compressed
182
file and bzless, which enables a user to page a compressed file. For Solaris, some of these other programs are only available in Solaris 9, or as part of the Companion CD installation. For more details about how to use each tool, refer to their operating system man pages.
Task table
Table 13-1 illustrates the basic file system backup and restore commands.
Table 13-1 File system backup commands File system backup task Full or incremental backup Restore Solaris ufsdump usfrestore Linux dump (for ext2/3 file system only) tar restore (for ext2/3 file system only) tar
183
last-access date stamps. This tool is very useful for doing a full backup. The corresponding tool to this is the restore command. The GNU tar command that comes in Linux has the following useful features: --atime-preserve: Option to not change access times on dumped files. --checkpoint: Print directory names while read the archive. -f, --file=[HOSTNAME:]<device>: Use archive file or device <device>. -F, --info-script=<file>, --new-volume-script=<file>: Run the script <file> at the end of each archive or tape. -g, --listed-incremental=<file>: Create, list, or extract new GNU-format incremental backup file. -h, --dereference: Do not dump symlinks; dump the files to which they point. -j, --bzip2, --bunzip2: Filter the archive through bzip2. -l, --one-file-system: Stay in local file system when creating an archive. -N, --after-date=<DATE>, --newer=<DATE>: Store only files newer than <DATE>. -V, --label=<NAME>: Create archive with volume name <NAME>. -Z, --compress, --uncompress: Filter the archive through compress. -z, --gzip, --ungzip: Filter the archive through gzip. For more information about the GNU tar command, refer to the man pages or run tar --help for a more updated list of available options.
184
Linux task
Linux does not come with a file system snaphot as Solaris does. The closest thing it has is the dump command, as referred to in the previous section. There is a script with about the same functionality as fssnap. It was originally written by Mike Rubel and is available at:
http://www.mikerubel.org
13.5 AMANDA
AMANDA, the Advanced Maryland Automated Network Disk Archiver, is a public domain utility developed at the University of Maryland. It is a backup system that enables the administrator of a LAN to set up a single master backup server to back up multiple hosts to a single large capacity tape drive. AMANDA uses native dump or GNU tar facilities and can back up a large number of workstations running multiple versions of UNIX. Recent versions can also use SMB to back up Microsoft Windows hosts. For more information about this tool, see:
http://www.amanda.org/
185
186
14
Chapter 14.
187
Red Hat:
https://www.redhat.com/apps/support/
SUSE:
http://www.novell.com/linux/security/securitysupport.html
Bastille is a useful tool for system administrators to discover and tighten Linux security settings. A graphical user interface enables administrators to choose security settings appropriate for their environment. Bastille automatically implements changes based on selections provided by the user.
188
14.3.1 inetd/xinetd
In Solaris, the more traditional Internet services are enabled or disabled in the file /etc/inetd.conf. As we discuss in 7.8.1, inetd-based versus xinetd-based network services on page 117, Linux uses a slightly different method than Solaris when it comes to inetd services. From a security perspective, it is important to ensure that all unnecessary services are disabled and TCP wrappers are set to monitor all enabled services that can be wrapped. Table 14-1 on page 190 shows the different locations of the inetd configuration files.
189
Table 14-1 inetd configuration files Services Configuration locations Solaris /etc/inetd.conf Red Hat /etc/xinetd.d/ /etc/xinetd.conf SUSE /etc/xinetd.d/ /etc/xinetd.conf
To disable an xinetd service, edit the appropriate file in the /etc/xinetd.d/ directory by ensuring that the line disable = yes is present in the file. Example 14-1 provides an example of how to disable the Telnet service.
Example 14-1 Sample xinetd entry for a service # default: on # description: The telnet server serves telnet sessions; it uses \ # unencrypted username/password pairs for authentication. service telnet { flags = REUSE socket_type = stream wait = no user = root server = /usr/sbin/in.telnetd log_on_failure += USERID disable = yes }
In Solaris, TCP wrappers are enabled by adding the following line to the /etc/default/inetd file:
ENABLE_TCPWRAPPERS=YES
190
This is not necessary in Linux because TCP wrappers are typically enabled during installation. In Solaris, each service to be wrapped must be specified as such in the /etc/inetd.conf file. Example 14-2 shows how to wrap the Telnet service in the /etc/inetd.conf file.
Example 14-2 Wrapping the Telnet service in /etc/inetd.conf telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd
Linux TCP wrappers are automatically applied to all xinetd services as long as TCP wrappers are compiled in at installation time. For detailed configuration information, check the following resources. Chapter 15, TCP Wrappers and xinetd, in Red Hat Linux 9: Red Hat Linux Reference Guide, available at:
http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/ref-guide/ch-tcpwrapp ers.html
14.3.3 FTP
FTP historically is a protocol has had a lot of documented security issues associated with its use, for example, the broadcasting of unencrypted user names and passwords during authentication. Nevertheless, FTP is a very popular and useful internetworking protocol. This section discusses methods for running FTP on Linux in a reasonably secure manner. Implementations of the FTP protocol are generally similar across all platforms. However, there are different versions of the server and several differences between the Solaris and Linux versions of the FTP server. Solaris currently installs wu-ftp as its default FTP server. Red Hat and SUSE both use Very Secure FTP (vsftpd). vsftpd is a GPL-licensed FTP server for UNIX systems and is included in Linux. It is considered secure, extremely fast, and stable. Although it is small in size, vsftpd has a lot of functionality. Some of the more popular features of vsftpd include: Virtual IP configurations Virtual users Ability to chroot users into their home directories
191
Run either stand-alone or from inetd Written to reduce the risk of buffer overflow attacks Powerful per-user configurability Reduce the risk of DoS attacks by using bandwidth throttling IPv6 support Support for SSL encryption One of the most important security-related differences between Solaris and Linux FTP is the location of the ftpusers file. This file is used to control access to the FTP server. Solaris: /etc/ftpd/ftpusers Linux: /etc/ftpusers With all of these advanced features, the following references should be helpful in learning and configuring vsftp:
http://vsftpd.beasts.org/vsftpd_conf.html http://vsftpd.beasts.org/ http://www.vsftpdrocks.org/
Here we provide some examples of kernel tuning in both Solaris and Linux. For socket queue defense against SYN attacks: Solaris: /usr/sbin/ndd -set /dev/tcp tcp_conn_req_max_q 1024 Linux: sysctl -w net.ipv4.tcp_max_syn_backlog-1280
192
Redirects (IP redirects can be used to modify the routing table on a remote host): Solaris:
/usr/sbin/ndd -set /dev/ip ip_ignore_redirect 1 /usr/sbin/ndd -set /dev/ip ip_send_redirects 0
Linux:
sysctl -w net.ipv4.conf.all.send_redirects=0 sysctl -w net.ipv4.conf.all.accept_redirects=0
As you can see, Linux uses the sysctl command to modify kernel parameters at run time. These kernel parameters are controlled by the files in the /proc/sys/ directory. For more detailed information, check the sysctl man page online at:
http://linuxcommand.org/man_pages/sysctl8.html
Another good resource about this topic is the UNIX IP Stack Tuning Guide at:
http://www.cymru.com/Documents/ip-stack-tuning.html
14.5 Logging
Logging in Linux is similar to Solaris with a few exceptions. For the most part, Solaris logs syslog messages to the /var/adm/messages file unless otherwise specified in the /etc/syslog.conf file. Linux by default logs many of its syslog messages in numerous files in /var/log/ by default. As with Solaris, these are speicified in the /etc/syslog.conf file. Table 14-2 shows many of the default Linux log files found in /var/log/.
Table 14-2 Security logging facilities Solaris Main log file authpriv cron logs Mail messages /var/cron/log /var/adm/messages Red Hat /var/log/messages /var/log/secure /var/log/cron /var/log/maillog /var/log/mail /var/log/mail.info /var/log/mail.warn /var/log/mail.err SUSE /var/log/messages
Boot messages
/var/log/boot.msg
/var/log/boot.log
For more information about logging, see 17.4, Logs on page 220.
193
14.7 PAM
The default mechanism used for user authentication in Linux uses Pluggable Authentication Modules (PAM). PAM provides centralized authentication for common services such as login, FTP, Telnet, and SSH. PAM is implemented using dynamic load libraries (DLLs). Authentication can be customized for PAM-aware services using PAM configurations files. Figure 14-1 illustrates PAM operations.
194
Authentication for each PAM-aware application is configured by a configuration file in the /etc/pam.d directory (the file name indicates the service it configures). PAM modules implement user authentication; by default, PAM modules are located in the /lib/security directory. Some PAM modules read global configuration files located in the /etc/security directory. Note: Solaris PAM configuration occurs in the /etc/pam.conf file, and Linux uses the /etc/pam.d directory. A PAM configuration file consists of lines in the form:
module-type control-flag module-path arguments
195
Table 14-3 Authentication mechanisms Type auth account Description Used to authenticate a user based on user name and password Used to grant or deny access based on account policies (such as time of day) password session Used to authorize user password updates Used to apply settings before a session is established
Note: More than one line can be specified for any PAM module type. This is referred to as module stacking. In this case, each module is executed in first-to-last order. Final authentication depends on the PAM control flags specified.
If superuser authority is required for a network session, log in as a non-privileged user and then issue the su command to switch to superuser. Alternatively, consider using sudo to delegate authority. The pam_securetty.so module is not enabled for SSH in the default SLES8 installation. It might be desirable to deny superuser SSH network access even though the data is encrypted. This can help prevent an attacker from guessing the root password. See Table 14-4 on page 197.
196
Table 14-4 Limiting superuser login Solaris Allow/deny root login /etc/default/login Red Hat /etc/securetty SUSE /etc/securetty
14.8 umask
The function and usage of umask is the same between Solaris and Linux. The configuration locations are a little different, as shown in Table 14-5.
Table 14-5 Controlling default umask Solaris umask /etc/profile Red Hat /etc/bashrc SUSE /etc/profile
14.9 SSH
The Secure Shell (also known as SSH) is a secure network access protocol. Traditional network access protocols (Telnet, FTP, and the r-command suite, such as rlogin, rcp, and rsh) must be considered inherently insecure. Unencrypted data (including user IDs and passwords) is transmitted over the network and can be captured by malicious third parties. SSH provides a secure alternative for remote access, file transfer, and remote command execution. SSH was originally developed by Tatu Ylnen (a researcher at the Helsinki University of Technology) as a method to prevent password-sniffing attacks. His initial implementation (known as SSH1) was released as free software. The SSH-1 protocol was formalized as an Internet Engineering Task Force (IETF) Draft. Subsequent improvements resulted in a new SSH-2 protocol originally
197
implemented as the SSH2 commercial product available from SSH Communications Security, Ltd. (founded by Ylnen in 1995). OpenSSH is an open source implementation of Secure Shell based on the last free version of SSH1. It supports both the SSH-1 and SSH-2 protocols. OpenSSH is provided as part of most distributions of Linux. For details about OpenSSH, refer to:
http://www.openssh.com
Note: When we use the term SSH in the remainder of this chapter, we are referring specifically to the OpenSSH implementation.
/sbin/setkey
/sbin/racoon
198
/etc/racoon/racoon.conf
The racoon daemon configuration file used to configure various aspects of the IPSec connection, including authentication methods and encryption algorithms used in the connection. For a complete listing of directives available, refer to the racoon.conf(5) man page.
Configuring IPSec on Red Hat Enterprise Linux can be done through the Network Administration Tool or by manually editing networking and IPSec configuration files. For more information about using the Network Administration Tool, refer to the Red Hat Enterprise Linux System Administration Guide, available at:
http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/security-guide/ ch-vpn.html
SUSE IPSec
SLES uses the Road Warrior server as its VPN tool. Road Warrior server is a VPN server that accepts connections from any client with a valid and signed CA certificate. Perform the following three steps to set up a Road Warrior server: 1. Create a server certificate on the CA management computer. 2. Import a certificate on the server computer. 3. Set up a connection on the server. For details about how to configure both the IPSec server and client on SLES, refer to Chapter 26 of the document available at:
http://www.novell.com/documentation/sles9/pdfdoc/sles_9_admin_guide/sles_9_ admin_guide.pdf
14.11 Kerberos
We discuss the differences in Kerberos implementations between Red Hat and SUSE in this section.
199
5. Edit the /var/kerberos/krb5kdc/kadm5.acl file. 6. Start Kerberos using the following commands:
/sbin/service krb5kdc start /sbin/service kadmin start /sbin/service krb524 start
7. Add principals for your users using the addprinc command with kadmin. 8. Verify that the server will issue tickets by running kinit to obtain a ticket and store it in a credential cache file. For more information about how to configure a Kerberos server, see:
http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/ref-guide/s1-kerberos -server.html
The Red Hat kerberos distribution has the ability to run through the configuration of services within xinetd. Example 14-4 shows the contents of a typical xinetd configuration for some kerberized services (from /etc/xinetd.d/).
Example 14-4 xinted service entries krb5-telnet
service telnet { flags = REUSE socket_type = stream wait = no user = root server = /usr/local/krb5/sbin/telnetd server_args = -X KERBEROS_V4 -a valid log_on_failure += USERID disable = no } kshell service kshell { flags socket_type wait user server
= = = = =
200
server_args = -5 -c -A disable = no } klogin service klogin { flags socket_type wait user server server_args disable } eklogin service eklogin { flags socket_type wait user server server_args disable } gss-ftp service ftp { flags socket_type wait user server server_args disable }
= = = = = = =
= = = = = = =
= = = = = = =
SUSE Kerberos
SUSE uses the Heimdal Kerberos implementation. This functions similarly to other Kerberos implementations. For configuration and administration details of both the Key Distribution Center (KDC) and the Kerberos client, see Chapter 26
201
of the SUSE Linux Enterprise Server 9 Administration and Installation Guide, available at:
http://www.novell.com/documentation/sles9/
14.13 Firewalls
Both Linux and Solaris include firewall services. Linux uses the open source GPL Netfilter, and Solaris 9 includes SunScreen 3.2, a Sun-branded, non-open source firewall. Both firewalls offer standard filtering such as blocking traffic by port or protocol, stateful inspection, and logging, and both offer NAT and IP masquerading capabilities. Note: Both firewalls have the ability to run as a host-based firewall to protect only the host on which it is installed. Consider that there are two general types of firewalls: Those that protect networks and hosts on networks Those that protect individual hosts
202
The Linux firewall can be configured to act as both a network-based firewall with stateful inspection and packet filtering, and as an individual firewall protecting only the host on which it is installed. The Linux firewall is made up of three basic components: Tables: Tables can be thought of as a set of firewall rules. Chains: Chains are groups of rules found within a table. The default chains are FORWARD, INPUT, and OUTPUT. Policies: Policies are the default actions taken on a packet when it does not match any of the chains. The policies for packets are DROP, REJECT, and ACCEPT. The primary command facility used to add and remove rules to or from a Linux firewall is iptables. Table 14-7 shows some of the more useful iptables command options. For a more exhaustive list, see the iptables man page.
Table 14-7 iptables command options Command iptables -A iptables -D iptables -I (capital i) iptables -R iptables -L iptables -F iptables -N iptables -h Description Append a rule to the end of the selected chain Delete one or more rules from the selected chain Insert a rule into the selected chain as a specific rule number Replace a rule in the selected chain List all of the rules in the selected chain Flush the selected chain (delete all rules) Create a new user-defined chain Help
For more detailed information about how to configure firewall services for Linux, see the following links: Red Hat:
http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/security-guide/ http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/install-guide/s1-fire wallconfig.html
203
Novell SUSE:
http://www.novell.com/documentation/sles9/ http://www.novell.com/documentation/suse91/suselinux-adminguide/html/ch19.h tml
204
15
Chapter 15.
205
From http://linux-ha.org
206
Resource groups provide simple, easy-to-use service management for straightforward environments. Active fencing mechanism (STONITH) provides strong data integrity guarantees, even in unusual failure cases. Provides stronger integrity guarantees than simple quorum tie-breakers. Open source implementation avoids vendor lock-in and provides great flexibility, stability, responsiveness, and testing. Works on stand-alone machines to provide easy-to-use, init-script-based service monitoring and restart.
15.2.1 Heartbeat
The Heartbeat program is one of the core components of Linux-HA. It performs death-of-node detection, communications, and cluster management in one process. Heartbeat monitors node death and includes built-in resource monitoring for all types of resources. Resources are automatically restarted on failure.1 Heartbeat also provides strongly authenticated, locally ordered, multicast messaging.
207
Heartbeat (release 1) style resource agents. Linux Standards Base (LSB) (normal init script) resource agents. STONITH. Resource agent interface for instantiating STONITH objects to be used by the STONITH daemon.
208
For more information about how to get started configuring Heartbeat, refer to the documentation available at the Linux-HA Web site:
http://linux-ha.org/GettingStartedWithHeartbeat
This page is particularly good because it shows various example configurations for many popular cluster environments.
Kernel
Linux-HA runs well on any distribution using Linux kernel version 2.6 or later. This includes all current Red Hat and Novell SUSE kernels. There are also no kernel dependencies or hooks.
209
210
16
Chapter 16.
Shell scripting
This chapter discusses the common shells that system administrators use for their day-to-day work. This chapter includes the following topics: Overview of the shell environment Public Domain Korn shell Moving from ksh to bash
211
There are other shells that can be installed from the Companion CD. Solaris 9, in addition to the previous shells, also comes with: bash tcsh zsh Bourne-Again shell Tenex C shell Another shell option that includes a combination of features found in bash, ksh, and tsch
The default shell provided when a new user is created, and the shell parameter is not used, is sh (Bourne shell).
212
For a description about how to use this file, refer to Chapter 17, Troubleshooting on page 215.
Here are some suggested workarounds for the read command: Work around 1: Using echo, as shown in Example 16-2
Example 16-2 Using a redirected echo to a read > > A > read x y z < <(echo A B C) echo $x $y $z B C _
213
For more information about using bash, refer to the following Web site:
http://www.gnu.org/software/bash/
214
17
Chapter 17.
Troubleshooting
This chapter describes some differences in the troubleshooting process of Linux and Solaris. We discuss the following topics: Troubleshooting the booting process Core files Crash dumps Logs Permissions: File access problems Printing File systems Packages root password recovery Network System and user processes Diagnostic and debugging tools
215
216
termination and to troubleshoot the respective program that generated the core file.
217
Table 17-1shows the differences between the Solaris and Linux core file patterns.
Table 17-1 Core file patterns Core pattern definition Process ID Effective user ID Effective group ID Executable file name System node name (uname -n) Machine name (uname -m) Time stamp Number of signal causing dump Literal % Solaris %p %u %g %f %n %m %t N/A %% Linux %p %u %u %e %h N/A %t %s %%
218
219
4. Creates dump files on the permanent dump storage area from the dump device. The resulting dump can be analyzed with the lcrash tool that is part of this package. And last but not least, LCKD provides for both local and network storage of dumps. For more information about the Linux Kernel Crash Dump utility, refer to the following Web site and the and SUSE documentation:
http://lkcd.sourceforge.net
Table 17-2 shows the main differences between Solaris and Linux crash dump management.
Table 17-2 Crash dump management Topics Disk crash dump utilities Disk crash config files Network crash dump utilities Network crash config files Crash analyzing tools Crash dump default store directory Solaris dumpadm savecore /etc/dumpadm.conf N/A N/A mdb /var/crash RHEL /etc/init.d/diskdump savecore /etc/sysconfig/diskdump /etc/init.d/netdump /etc/init.d/netdump-server /etc/sysconfig/netdump /etc/netdump.conf crash /var/crash SLES lkcd /etc/sysconfig/dump lkcd /etc/sysconfig/dump lcrash /var/log/dump
17.4 Logs
System logs are very useful for troubleshooting. The logs are the first thing to check if something is going wrong. Even if the system is stable and running just fine, it is good to inspect the system logs periodically. There might be an indication of symptoms that will potentially affect the availability of the system.
Logs in Solaris
Solaris uses the syslogd daemon to record various system warnings and errors. The syslogd daemon is configured by default to send the most critical messages to the console in addition to logging them to files. Most system messages are
220
stored by default in the /var/adm/ directory, and the file to check is /var/adm/messages. The system logs are rotated by the logadm (in Solaris 9) and newsyslog (in Solaris 8) command, which has an entry in the root crontab file. The syslogd configuration file is /etc/syslog.conf and it can contain macros and logic blocks. It also has a /etc/default/syslogd configuration file for changing the daemon behavior globally. To see the system diagnostic messages from the boot time, use the dmesg command.
Logs in Linux
Linux also uses the syslogd daemon to record various system warnings and errors. The syslogd daemon is configured by default to send the most critical messages to the console in addition to logging them to files. Most system messages are stored by default in the /var/log/ directory, and the file to check is /var/log/messages. The system logs are rotated by the logrotate program, which has an entry in the /etc/cron.daily/ directory and the configuration is stored in the /etc/logrotate.conf file. The syslogd configuration file is /etc/syslog.conf and it has a syntax similar to Solaris with the exception that it cannot contain macros and logic blocks. It also has a /etc/sysconfig/syslog configuration file for changing the daemon behavior globally. In Linux, there is also a klogd kernel log daemon, which has no equivalent is Solaris. It intercepts and logs Linux kernel messages from /proc/kmsg and logs it directly or through the syslogd daemon. For more information, refer to the man page of klogd. To see the system diagnostic messages from the boot time, use the dmesg command or look in /var/log/boot.log (in Red Hat) or /var/log/boot.msg (in SUSE). The default behavior for SLES is to split the messages for all facilities into files based on the priority of the messages. This is set in the /etc/syslog.conf file and described the syslog.conf man page. So, unless auth and cron have specific entries in the /etc/syslog.conf file, their messages will be directed to files based on the priority of the messages.
221
The locate command is different from the find command. First, the locate command can be used to find any file or directory, not just executable files. Second, locate is much faster than the find command because it uses a file name database. The updatedb command is used to initialize and maintain the file name database. You can run the updatedb command at any time to update the file name database. If you want to schedule the updatedb command to run one or more times daily, pick times when there is less activity on the server. The updatedb command can run for a long time as it searches the file systems on the server. Refer to the man page for updatedb for configuration options.
Table 17-3 File location commands Task Display $PATH settings Search $PATH for first occurrence of executable filename Search file system or directory tree for filename Update the file name database Search the file name database for filename Display mounted file systems and mount options Solaris echo $PATH which Linux echo $PATH which
222
17.6 Printing
This section covers basic troubleshooting of print subsystems. For more detailed information about managing print queues and print jobs, refer to your Linux distributions administration guides. Table 17-5 lists basic troubleshooting commands.
Table 17-5 Print service troubleshooting commands Print service troubleshooting task Display print queue status Display settings of a print queue Display print service status information Solaris lpstat lpc lpadmin lpstat Linux lpc lpq lpadmin lpoptions lpstat
223
Print service troubleshooting task Display printing config information from the system config database Display available devices or drivers
Both commands will return connection refused if no services are registered with the supplied port number. Any other output will mean that a service is registered with the supplied port number. After you have determined the problem is not with the network, troubleshoot the printer locally at the server.
224
LPD
Access permissions are located in /etc/lpd.perms.
CUPS
Access permissions and other configuration parameters are in /etc/cups/cupsd.conf. Log files are in the /var/log/cups directory. CUPS provides online manuals at the following location. The Software Administrators Manual contains a troubleshooting section along with installation and configuration sections.
http://localhost:6(2)31/documentation.html
225
Important: In Linux, it is a good practice to use the specific fsck.filesystemtype program instead of the generic fsck, or if you use the generic fsck, always use the -t fstype switch.
226
17.8 Packages
This section covers troubleshooting software packages. We describe the following tasks in this section: removing packages, upgrading packages, and verifying the installation of packages. Table 17-8 on page 228 illustrates commands used to accomplish these tasks.
227
Table 17-8 Package troubleshooting tasks Package management tasks Remove software package Upgrade/install a package Verify correct installation Verify digest and digital signature Solaris pkgrm pkgadd pkgchk N/A Linux rpm -e rpm -U rpm -F rpm -V rpm -K
In this case, the file mode test failed because the file mode is different on the file system when compared to the file mode in the package. This particular test compares permissions and the file type. All other tests passed because they returned a single . . The letter c is the attribute marker. It tells us that /etc/crontab is a configuration file.
228
Refer to the man page for the rpm command for a detailed list of options and parameters.
Database consistency
You might encounter a situation where the RPM database becomes unusable or corrupt. It can be difficult, if not impossible, to upgrade packages if their corresponding entries in the database cannot be accessed. Two parameters are available for RPM database management: --initdb is used to create a new RPM database. --rebuilddb is used to rebuild RPM database indexes from existing, installed RPM package headers.
229
6. Reboot the system. 7. The root password now is not set. Press Enter at the password prompt when you login as root.
17.10 Network
Most of the networking tools used for network troubleshooting are the same in both Solaris and Linux, with some minor differences as illustrated in Table 17-9 on page 231.
230
Table 17-9 Troubleshooting network problems Task Display interface settings Display interface status and statistics Configure interface Check various network statistics Check DNS resolver Check name services config Display kernel network parameters Configure kernel network promontories Check for network link Query DNS Check routing table Check ARP entries Testing for connectivity Check IP path Capturing network packets Solaris ifconfig netstat -i ifconfig netstat more /etc/resolv.conf more /etc/nsswitch.conf ndd /dev/ip (\?)parameter ndd /dev/tcp (\?)parameter ndd -set driver parameter ndd driver link_status nslookup dig netstat -r arp -a ping traceroute snoop Linux ip ifconfig netstat -i ifconfig ip ifconfig netstat more /etc/resolv.conf more /etc/nsswitch.conf sysctl -a | grep ^net sysctl -w var=value ethtool mii-tool nslookup dig netstat -r route arp ping traceroute tcpdump tethereal ethereal
Note: In Linux, a network interface is considered up by the kernel even if the network link is not present, so this is the first thing to check if you have network problems.
231
running processes. The ps command gives you a point in time snapshot of the system processes. The top command gives you an iterative, interactive display of system processes. Whether you use the ps or top command, important columns in the output of these commands to monitor are %CPU, STAT, START or STIME, and TIME. Table 17-10 provides an overview of the command sets used to troubleshoot system and user processes.
Table 17-10 Troubleshooting system and user processes Task Trace system calls and signals Library trace Print shared library dependencies Report IPC status Display and manage system resources available to a user or process List open files and sockets and their owning user IDs and PIDs Identify which user or process is using a file or socket Send signals to processes List current processes List current processes based on name and other attributes List current processes in an interactive, iterative format Report system activity Display virtual memory statistics Display I/O statistics Display system error log Solaris truss N/A ldd ipcs ulimit proc tools: pfiles, pmap, ptree, and so on fuser kill pkill ps pgrep top (on companion CD) sar vmstat iostat dmesg Linux strace ltrace ldd ipcs ulimit lsof fuser kill pkill ps pgrep top sar vmstat iostat dmesg
232
name for some packages will be the same on Red Hat Enterprise Linux and Novell SUSE Linux Enterprise Server. The version might be different. The format of the following lists is: base package name* : command For Red Hat Enterprise Linux: sysreport* : sysreport hwbrowser* : hwbrowser (graphical tool) pciutils* : lspci oprofile* : opreport gdb* : gdb strace* : strace statserial* : statserial For Novell SUSE Linux Enterprise Server: siga* : siga pciutils* : lspci gdb* : gdb strace* : strace ksymoops* : ksymoops statserial* : statserial Refer to the man pages and RPM package descriptions for information regarding these commands.
Memtest86
SUSE provides a memory test application available only on x86 systems called memtest86. It is available from the boot screen when booting from the CD-ROM. This RAM test runs an endless read and write loop. You should let this test run for several hours. Reboot the system to terminate the test. For more information about this application, refer to the following Web site:
http://www.memtest86.com
233
234
Part 3
Part
235
236
18
Chapter 18.
237
Follow the installation instructions provided with each package or those included with your server platform regarding updating firmware levels. For a complete driver listing of the most common server components, refer to:
http://www.ibm.com/pc/support/site.wss/DRVR-MATRIX.html
For more information about the booting and installation process, refer to Chapter 8, Boot and system initialization on page 125.
18.1.1 xSeries
Before starting an installation, make sure that any disk subsystems, such as RAID arrays, have already been configured. For more information about how to configure these systems, refer to the documentation included with the disk subsystem hardware. In general, the xSeries server platform is installed in much the same manner as other IA32-based architecture platforms. The xSeries specifics for installation starts with the selection of the boot device. If the system does not boot from the installation device that contains the Linux distribution, you need to enter the boot setup device screen at startup. Follow the instructions after initially powering on the system for what keys to press to enter the boot device configuration or refer to the system documentation.
238
18.1.2 BladeCenter
All the blades share the CD-ROM, floppy drive, keyboard, video, and mouse. There are two I/O selection buttons on the front of each blade that allow for assignment of the CD-ROM and floppy drive and also for the keyboard, video, and mouse (KVM). There is also a power button on each blade that is protected by a hinged plastic flap. After a blade is powered up, pressing the CD-ROM or the KVM button on that blade selects the corresponding resource for that blade. On the blade that is currently connected to the CD-ROM or the KVM, the corresponding I/O selection button lights up solid green. Sharing the CD-ROM for all the blades is a limitation of installing on multiple blades. Using the CD-ROM, you can install individual blades one at a time; however, that process is time-consuming if you install more than one or two blades. As an alternative, install one blade and configure it to be a network-installed server. Subsequent operating system installations are then performed from that server. To read more about how to do this installation process, refer to the IBM Redbook IBM Eserver BladeCenter, Linux, and Open Source: Blueprint for e-business on demand, SG24-7034, available at:
http://www.redbooks.ibm.com/abstracts/sg247034.html
239
IBM Director
For complete server management of xSeries and BladeCenter systems, the recommended tool is IBM Director. With IBM Director, you have complete access to the management hardware in addition to other management tasks such as event management, inventory, and deployment. IBM Director is available to xSeries platform customers from:
http://www.ibm.com/pc/support/site.wss/MIGR-57057.html
18.2.1 xSeries
This section provides functional details for IBM Eserver xSeries Baseboard Management Controller and Remote Supervisor Adapter II.
Functionality
The integrated BMC might have all or part of the following functionality: Monitoring of system voltages Battery voltage monitor System temperature monitors Fan speed control Fan tachometer monitor Power Good signal monitor System ID and planar version detection System power control System reset control NMI detection SMI detection and generation Serial port text redirection Remind button detection System LEDs control (power, HDD activity, alert, and so on) Control of Lightpath LED
240
For more information about the full functionality of the BMC, refer to the xSeries system documentation that came with the server.
External connection
The BMCs communicate through one of the integrated Ethernet adapters on the server. To communicate with the BMC, attach a standard Ethernet cable.
Configuration
There are two different methods for configuring the BMC. The BMC configuration can be done through the System Setup in BIOS (pressing F1 at boot time) and accessing BMC settings through the Advanced Options menu. Using System Setup in BIOS is the recommended method. After the server network settings are configured, you can use the Management Processor Assistant (MPA) task in IBM Director to configure the other required settings such as user IDs, passwords, and alert destinations in the BMC. The second configuration method uses the bmc_cfg.exe utility. This utility is located on the BMC firmware update diskette or CD. You can only run bmc_cfg by exiting to a MS-DOS-based program after booting the server from the bootable BMC management firmware update diskette or CD.
Functionality
Some of the features and functionality of the RSA II include: Automatic notification and alerts Continuous health monitoring and control Event log LAN and Advanced System Management (ASM) interconnect remote access Operating system failure screen capture Remote media Remote power control Server console redirection
241
Connections
The RSA II supports various connections available on the card and on breakout connectors. Refer to Figure 18-1 for connector locations. There are variations on the location of the connectors available depending on the model of adapter and xSeries server. For specific connector locations on your adapter, refer to the system documentation that came with the xSeries server hardware.
The RSA II has the following connectors (the numbers refer to Figure 18-1): Video connector (1 in Figure 18-1): The RSA II contains an additional video subsystem on the adapter. When the RSA II is installed in a server, it automatically disables the on-board video. The servers monitor should be connected to the RSA II video connector. 10/100 Ethernet connector (2): For connection to a 10 Mbps or 100 Mbps Ethernet-based client LAN or management LAN. Power connector (3): Access to RSA II is possible if the server is powered down when the external power supply is used (supplied when the adapter is purchased as an option). Connect the power supply to a different power source as the server (for example, a separate UPS). Mini-USB connector (4): This port provides the ability for a remote keyboard and mouse when using the remote control feature. Connect this to a USB port of the server, except for the following servers where the cable should not be connected (the USB signal is transmitted inside these servers): xSeries 225 xSeries 226 xSeries 365 Eserver 326
242
Breakout connector (5): To use RSA II as a focal point for an ASM network or for connecting a modem, a breakout cable is supplied, which has the ASM and serial connections. The breakout cable has two serial connectors (earlier RSA II adapters had only one serial port) and two RJ45 connectors for daisy chaining the ASM RS-485 interconnect network. 20-pin connector for the connection to the servers motherboard (6): Figure 18-1 on page 242 shows the connector on the planar where the supplied cable should be connected.
243
MPCLI supports three methods of communicating with a service processor: In-band communication using a device driver Out-of-band communication using an IP connection Out-of-band communication using an RS-485 interconnect For more information and to download the MPCLI, refer to following link:
http://www.ibm.com/pc/support/site.wss/MIGR-54216.html
Web interface
The Remote Supervisor Adapter II and BladeCenter Management Module have a built-in Web server that enables users to access these service processors using a Web browser. The browser must be Java enabled, support JavaScript 1.2 or later, and have a Java 1.4.1 or later plug-in installed. For best results when using the Web browser, ensure that your monitors resolution is at least 800x600 and at least 256 colors.
18.2.2 BladeCenter
The BladeCenter system provides shared resources to all the blades, such as power, cooling, system management, network connections, CD-ROM, floppy, keyboard, video, and mouse. The use of common resources allows the blades to be smaller and reduces the need for cabling. BladeCenter consists of a rack-mounted chassis. The front of BladeCenter supports 14 blade server slots and has a CD-ROM drive, USB port, and floppy drive. The back of the chassis has slots for two blower modules, four power modules, four network modules, and a Management Module.
244
manage the blade servers. Additionally, it acts like a RSA II for every installed blade server. For more information about how to connect and configure the Management Module, refer to Management Module configuration on page 264.
18.3 References
The following links provide more specific information about the Eserver xSeries and BladeCenter server hardware: From this chapter: The latest BIOS and firmware code is available at:
http://www.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-4JTS2T
For a complete driver listing of the most common server components, refer to:
http://www.ibm.com/pc/support/site.wss/DRVR-MATRIX.html
The IBM Redbook IBM Eserver BladeCenter, Linux, and Open Source: Blueprint for e-business on demand, SG24-7034, available at:
http://www.redbooks.ibm.com/abstracts/sg247034.html
The IBM Redbook IBM Eserver xSeries and BladeCenter Server Management, SG24-6495, available at:
http://www.redbooks.ibm.com/Redbooks.nsf/RedbookAbstracts/sg246495.html
For more information and to download the MPCLI, refer to the following link:
http://www.ibm.com/pc/support/site.wss/MIGR-54216.html
Additional resources: More information about the IBM Eserver xSeries server platforms:
http://www.ibm.com/servers/eserver/xseries
245
246
19
Chapter 19.
247
19.1 Planning
This section describes issues that system administrators should consider before beginning the installation of an Eserver i5, Eserver p5, or Eserver BladeCenter JS20.
Monolithic (stand-alone)
In a monolithic installation, Linux owns the entire server and all of its resources. This installation is only common for Eserver p5 systems. A monolithic install does not require any POWER technology-specific preinstallation planning. Note: The Eserver p5 system is initially preconfigured for monolithic operation.
Hosted (partitioned)
In a hosted installation, Linux runs in a partition, along with other instances of Linux. By using logical partitioning (LPAR), a single physical system can be divided into multiple logical partitions, each running their own operating system image. The Eserver i5 and Eserver p5 both support hosted installations.
248
You must use tools to partition Eserver i5 and Eserver p5 servers. The tool that you use to partition each server depends on the server model and the operating systems and features that you want to use: Hardware Management Console (HMC) The Hardware Management Console (HMC) is a hardware appliance that connects to the server firmware. You use the HMC to specify to the server firmware how you want resources to be allocated among the logical partitions on the managed system. You also use the HMC to start and stop the logical partitions, update the server firmware code, manage IBM Eserver Capacity on Demand, and transmit service information to service and support if there are any hardware problems with your managed system. Figure 19-1 illustrates the logical partitions and the server firmware on the IBM Eserver hardware. The server firmware is code stored in system flash memory on the server. The server firmware directly controls the resource allocations on the server and the communications between logical partitions on the server. The HMC connects with the server firmware and specifies how the server firmware allocates resources on the server.
If you use a single HMC to manage a server, and the HMC malfunctions or becomes disconnected from the server firmware, the server continues to run, but you will not be able to change the logical partition configuration of the server or manage the server. If desired, you can attach an additional HMC to act as a backup and to provide a redundant path between the server and IBM service and support. Partitioning using the HMC is supported on all IBM Eserver i5, IBM Eserver p5, IBM System p5, and IBM Eserver OpenPower server models, although some models require you to enter an Advanced POWER Virtualization activation code before you can partition the server. Integrated Virtualization Manager The Integrated Virtualization Manager is a browser-based system management interface for Virtual I/O Server that enables you to create and
249
manage Linux logical partitions on a single IBM Eserver p5 or IBM System p5 server or Linux logical partitions on a single IBM Eserver OpenPower server. The Integrated Virtualization Manager is supported only on select IBM Eserver p5, IBM System p5, and OpenPower server models. Virtual I/O Server is software that provides virtual storage and shared Ethernet resources to the other logical partitions on the managed system. Virtual I/O Server is not a general purpose operating system that can run applications. Virtual I/O Server is installed on a logical partition in the place of a general purpose operating system and is used solely to provide virtual I/O resources to other logical partitions with general purpose operating systems. You use the Integrated Virtualization Manager to specify to Virtual I/O Server how these resources are assigned to the other logical partitions. To use the Integrated Virtualization Manager, you must first install Virtual I/O Server on an unpartitioned server. Virtual I/O Server automatically creates a logical partition for itself, which is called the management partition for the managed system. The management partition is the Virtual I/O Server logical partition that controls all of the physical I/O resources on the managed system. After you install Virtual I/O Server, you can configure a physical Ethernet adapter on the server so that you can connect to the Integrated Virtualization Manager from a computer with a Web browser. Figure 19-2 on page 251 illustrates Virtual I/O Server in its own logical partition, and the Linux logical partitions that are managed by the Virtual I/O Server logical partition. The browser on the PC connects to the Integrated Virtualization Manager interface over a network, and you can use the Integrated Virtualization Manager to create and manage the logical partitions on the server.
250
Virtual Partition Manager The Virtual Partition Manager is a feature of IBM i5/OS V5R3 that enables you to create and manage one i5/OS logical partition and up to four Linux logical partitions on a single IBM Eserver i5 server. To use the Virtual Partition Manager, you must first install i5/OS on an unpartitioned server. After you install i5/OS, you can initiate a console session on i5/OS and use Dedicated Service Tools (DST) or System Service Tools (SST) to create and configure Linux logical partitions. i5/OS controls the resource allocations of the logical partitions on the server. Figure 19-3 on page 252 illustrates the i5/OS logical partition and the Linux logical partitions that are managed by the i5/OS logical partition. The twinaxial console connects to the i5/OS logical partition, and you can use DST or SST to create and configure the Linux logical partitions on the server.
251
When you use the Virtual Partition Manager to partition an Eserver i5 server, DST and SST are the only tools that you can use to create and manage the logical partitions. You cannot use iSeries Navigator to create or manage logical partitions on an Eserver i5 server. However, the console session that you use to access DST or SST can be initiated using either iSeries Operations Console (LAN or direct attach) or a twinaxial console. Although each logical partition acts as an independent server, the logical partitions on a server can share some kinds of resources with each other. The ability to share resources among many logical partitions enables you to increase resource utilization on the server and to shift the server resources to where they are needed. The following list illustrates some of the ways in which logical partitions can share resources. (For some server models, the features mentioned in this list are options for which you must obtain and enter an activation code.) Micro-Partitioning (or shared processing) enables logical partitions to share the processors in the shared processor pool. The shared processor pool includes all processors on the server that are not dedicated to specific logical partitions. Each logical partition that uses the shared processor pool is assigned a specific amount of processor power from the shared processor pool. If the logical partition needs more processor power than its assigned amount, the logical partition is set by default to use the unused processor power in the shared processor pool. The amount of processor power that the logical partition can use is limited only by the virtual processor settings of the logical partition and the amount of unused processor power available in the shared processor pool.
252
Dynamic logical partitioning enables you to move resources to, from, and between running logical partitions manually without shutting down or restarting the logical partitions. This enables you to share devices that logical partitions use occasionally. For example, if the logical partitions on your server use an optical drive occasionally, you can assign a single optical drive to multiple logical partitions as a desired device. The optical drive would belong to only one logical partition at a time, but you can use dynamic logical partitioning to move the optical drive between logical partitions as needed. On servers that are managed using the Integrated Virtualization Manager, dynamic logical partitioning is supported only for the management partition. Dynamic logical partitioning is not supported on servers that are managed using the Virtual Partition Manager. Virtual I/O enables logical partitions to access and use I/O resources on other logical partitions. For example, virtual Ethernet enables you to create a virtual LAN that connects the logical partitions on your server to each other. If one of the logical partitions on the server has a physical Ethernet adapter that is connected to an external network, you can configure the operating system of that logical partition to connect the virtual LAN with the physical Ethernet adapter. This enables the logical partitions on the server to share a physical Ethernet connection to an external network.
253
The LVT provides you with a validation report that reflects your system requirements while not exceeding logical partition recommendations. 4. If your machine is an Eserver i5, decide if you want i5/OS to provide Linux logical partitions. 5. Plan for Linux software licensing in a partitioned environment by reading and understanding the license agreement for your Linux distribution.
Network planning
Successful installation of BladeCenter JS20 requires that you have a clear plan for how you will use the various networking capabilities of the BladeCenter infrastructure. This plan should address the following questions: What network connectivity is needed for the blade servers to support the applications installed on them? What network connectivity is needed to manage the BladeCenter, input/output (I/O) modules, and blade servers? What virtual local area networks (VLANs) are required for each LAN Switch I/O Module to provide the network connectivity established previously? What IP subnet will be used for each VLAN and how will IP addresses be allocated to each device on the VLAN? Will IP addresses be assigned statically or dynamically using DHCP? What host names will be used for each network interface? How will host names be resolved to IP addresses?
254
Are there requirements for a high-performance, low-latency interconnection network? Where multiple BladeCenter chassis are installed, how will they be interconnected? The following topics explore common network planning requirements that we expect to arise in the installation of BladeCenter JS20s.
255
The following four sections describe each of the logical networks illustrated in Figure 19-4.
256
257
Application subnet
The primary reason you install BladeCenter JS20s is to support applications. Many applications have requirements to communicate with other systems. You use one or more application subnets for this purpose. The primary application subnet is implemented using a VLAN provided by the LAN Switch I/O Modules installed in I/O module bay 1 of each BladeCenter chassis. The same LAN Switch I/O Module is used to support the SoL subnet and VLAN. Where different BladeCenter JS20s participate in different applications and there is a requirement to separate application traffic, you might need to define multiple
258
application subnets and VLANs. Each BladeCenter JS20 is connected to the appropriate application subnet based on the applications that are installed on the blade server. If application communication requirements with other systems are complex, you can install an additional pair of Gigabit Ethernet interfaces on each BladeCenter JS20. You do this using the Gigabit Ethernet Expansion Card in conjunction with compatible I/O modules installed in I/O module bays 3 and 4.
Monolithic (stand-alone)
There are three ways to power on a monolithic Eserver p5: Power switch The Advanced System Management Interface (ASMI) through a serial connection The ASMI Web interface Only the first and second option are available when the machine is initially unpacked from the box and plugged in. The third option requires the configuration of the Hardware Management Console (HMC) network port using the ASMI serial connection. For more information about the ASMI, refer to Managing the Advanced System Management Interface (ASMI), available at:
http://publib.boulder.ibm.com/infocenter/eserver/v1r3s/index.jsp
Tip: Use ASMI to set the systems time and date before beginning any Linux installations. This will help avoid potential problems during Linux installations. After powering on, a monolithic system proceeds to progress through a series of hardware checks. The LED panel on the front of the machine will flash various codes to indicate this progression.
259
If the machine is booted with an ASCII terminal connected to its serial port, these same LED codes will display on the ASCII terminal. Nothing will show on a console connected to the graphics card during this process.
Hosted (partitioned)
The servers HMC network port must be configured using the ASMI serial connection. For more information, refer to Managing the Advanced System Management Interface (ASMI), available at:
http://publib.boulder.ibm.com/infocenter/eserver/v1r3s/index.jsp
Tip: Use ASMI to set the systems time and date before beginning any Linux installations. This will help avoid potential problems during Linux installations. The Hardware Management Console must be configured and the server attached before powering up. Refer to Managing the Hardware Management Console (HMC), available at:
http://publib.boulder.ibm.com/infocenter/eserver/v1r3s/index.jsp
When connected to an HMC, there are three ways to power on Eserver i5 and Eserver p5 systems: The HMC The Advanced System Management Interface (ASMI) through a serial connection The ASMI Web interface Restriction: When connected to an HMC, Eserver i5 and Eserver p5 will not power up through the power switch. We recommend using the HMC to power on a hosted system into the partition standby mode. This mode powers the machine to a level that allows partition creation and manipulation. To power on a managed system to this mode, complete the following steps: 1. In the Navigation area, expand the Server and Partition folder. 2. Click the Server Management icon. 3. In the Contents area, select the managed system. 4. From the menu, click Selected Power On. 5. Select Standby power-on mode and click OK. After powering on, a hosted system proceeds to progress through a series of hardware checks. The LED panel on the front of the machine and the panel
260
display for the machine in the HMC window will flash various codes to indicate this progression. The system status panel displays Standby after the power on process has completed.
Monolithic (stand-alone)
During the power-on process, the console (ASCII or graphical) will eventually display information about the final stage of hardware checking. This stage is where the SMS menu becomes available. To access the SMS menu, the usual method involves pressing the F1 key after the keyboard icon appears for a graphical console (see Figure 19-5 on page 262), or pressing the 1 key after the word keyboard appears for a ASCII terminal (see Figure 19-7 on page 264). Consult your hardware guide to confirm the correct graphical key sequence. The menu opens after the hardware check process completes. Note: If prompted for a password, the default password is admin.
261
Hosted (partitioned)
When the system is in standby mode, the next step involves creating and booting a partition. For steps for creating partitions, as well as example partition configurations, refer to Partitioning for Linux, available in the IBM Eserver Information Center:
http://publib.boulder.ibm.com/infocenter/eserver/v1r3s/index.jsp
In hosted mode, the partition to install must have the CD/DVD drive in its partition profile. To assign the CD/DVD drive to a partition: 1. Go to Server and Partition Server Management. 2. Open the server and partition to which you want to install. 3. Right-click the profile you want to use for installation and select Properties. 4. In the Logical Partiton Profile Properties window, go to the Physical I/O tab. 5. From the Managed system I/O devices window, select the Other Mass Storage Controller from the bus where it is attached. 6. Click Add as required to assign this CD/DVD drive to the partition. The result should look similar to the example in Figure 19-6 on page 263.
262
To boot an Eserver p5 partition: 1. Right-click the partition. 2. Select Activate. 3. Select the Open terminal option. 4. Click OK. To boot an Eserver i5 partition: 1. Right-click the partition. 2. Select Open Terminal Window. 3. Vary on the partition from i5/OS. During the power on process, the terminal console eventually displays information about the final stage of hardware checking. This stage is where the SMS menu becomes available. To access the SMS menu, press the 1 key after the word keyboard appears (see Figure 19-7 on page 264). The menu appears after the hardware check process completes.
263
264
The primary setup task for the Management Module is to assign IP addresses, which are necessary to communicate with the Management Module Web and command line interfaces. The Management Module has two network interfaces, an external interface (eth0) and an internal interface (eth1). The external interface is accessible through the 10/100BaseT connector on the Management Module. The internal interface is connected to the management interfaces of all the installed I/O modules that support such interfaces. This includes all switch I/O modules. The default behavior of a new Management Module is to request an IP address for the external interface through DHCP. If the Management Module does not receive a valid response from a DHCP server within two minutes of powering on, it uses a default static IP address of 192.168.70.125 with the default subnet mask of 255.255.255.0. Note: The default host name is MMxxxxxxxxxxxx, where xxxxxxxxxxxx is the burned-in medium access control (MAC) address. The default IP address for the internal interface is statically assigned to be 192.168.70.126 with a subnet mask of 255.255.255.0. You can reset the IP addresses of a Management Module that was previously configured back to the factory defaults by using the IP reset button on the Management Module. For the procedure for doing this, see IBM Eserver BladeCenter Management Module Users Guide, available at:
http://www.ibm.com/pc/support/site.wss/MIGR-45153.html
265
3. Connect to the Management Module Web interface by pointing your Web browser on the workstation to:
http://192.168.70.125
4. Enter a valid user ID and password. The factory default configuration of a Management Module defines a user ID named, USERID, with a password of PASSW0RD. The 0 in the password is a zero. In production environments, consider changing these defaults. 5. From the Management Module Web interface, select MM Control Network Interfaces. 6. The form window shown in Figure 19-8 on page 267 opens. Enter the desired external and internal IP addresses, subnet masks, and default gateway for the Management Module. Then, click Save to store the new IP addresses.
266
7. Restart the Management Module. In the Management Module Web interface, select MM Control Restart MM. Then, click the Restart button on the displayed form. You are prompted to confirm the restart before it occurs. 8. Remove the Management Module from the isolated private Ethernet network and connect it to the network you will use to manage BladeCenter. You can now connect to the Management Module Web and command line interfaces using the IP address that you assigned to the Management Module external network interface.
267
Now, consider performing other Management Module setup tasks, such as: Setting the Management Module date and time so that log entries have useful time stamps. Defining user IDs and passwords for the system administrators and operators who will manage the BladeCenter. Alternatively, you can configure the Management Module to use a Lightweight Directory Access Protocol (LDAP) directory for this purpose. Configuring the Management Module to send alerts to management systems through SNMP, or system administrators using e-mail through Simple Mail Transfer Protocol (SMTP). Enabling the use of Secure Sockets Layer (SSL) to securely access the Management Module Web interface. Enabling the use of Secure Shell (SSH) to securely access the Management Module command line interface (CLI). For additional information about how to perform these tasks, refer to the IBM Eserver BladeCenter Management Module Users Guide, available at:
http://www.ibm.com/pc/support/site.wss/MIGR-45153.html
268
2. From the Management Module Web interface, select I/O Module Tasks Management. 3. In the form shown in Figure 19-9, scroll down to the entry for the LAN Switch I/O Module that you want to configure. Enter the IP address, subnet mask, and gateway that you want to assign to the LAN Switch I/O Module management interface. Click Save to activate the new IP address.
4. You are prompted to confirm that you want to change the IP address. 5. Select the Advanced Management link for the LAN Switch I/O Module. 6. Scroll down to the Advanced Setup section of the displayed form, as illustrated in Figure 19-10 on page 270. For the External ports field, select Enabled from the drop-down list and then click Save.
269
At this point, the LAN Switch I/O Module management interface has an IP address. In addition, the external ports on the LAN switch module are enabled so that they can be used to communicate with blade servers. The SoL remote text console function of the Management Module depends on a VLAN provided by a LAN Switch I/O Module installed in I/O module bay 1. This VLAN is automatically provided by the 4-Port Gigabit Ethernet Switch Module and the Nortel Networks Layer 2-7 Gigabit Ethernet Switch Module using VLAN 4095.
270
If you are using a Cisco Systems Intelligent Gigabit Ethernet Switch Module in I/O module bay 1, you must manually configure this VLAN. A procedure is documented in the Cisco Systems Intelligent Gigabit Ethernet Switch Module for the IBM Eserver BladeCenter Installation Guide. This Cisco guide describes how to manually set up the VLAN that is needed to support the SoL remote text console function and is available at:
http://www.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-57858
271
272
The correct boot sequence depends on the method that you plan to use to install an operating system on the blade server. To install Linux from a CD, set the CD-ROM first.
273
4. The Ethernet controller of the target blade server passes the SoL data stream received from the private VLAN to the blade system management processor (BSMP), which manages the text console for the blade server.
274
d. Leave the values for Accumulate timeout, Send threshold, Retry count, and Retry interval at their defaults (5, 250, 3, and 250). e. Leave the values for User Defined Keystroke Sequences at their defaults. f. Click Save.
3. Restart the Management Module: a. In the Management Module Web interface, select MM Control Restart MM. b. Click the Restart button on the displayed form. c. You are prompted to confirm the restart before it occurs. 4. After the Management Module has restarted and you have reconnected to the Management Module Web interface from your Web browser, enable the SoL remote text console for each blade server. a. Select Blade Tasks Serial Over LAN from the Management Module Web interface. b. In the right pane, scroll down until you see the Serial Over LAN Status section (see Figure 19-14 on page 276).
275
c. Select the blade servers you want to enable for SoL. You can choose all of them by selecting the check box at the top of the table. d. Click the Enable Serial Over LAN link under the table. You might need to scroll down to see this link.
e. After a few seconds, the window refreshes. In the SOL column of the table, verify that each blade server has a status of Enabled. The configuration of the SoL remote text console function is now complete.
You can connect to the Management Module CLI using either a Telnet or SSH client. The Management Module can support up to 20 concurrent CLI
276
connections. This is sufficient to support the concurrent use of a SoL remote text console to each blade server in a full BladeCenter chassis. At the same time, it supports six additional CLI connections for other administrative activities. Restriction: You can only have one active SoL remote text console connection to each blade server. The Management Module CLI is context sensitive. When you issue CLI commands, you can accept the current context or override the context using the -T option provided on most commands. In our examples, we use the -T option to make it clear on which entity the command is operating. You can change the context for the Management Module CLI by using the env -T command. To use the SoL remote text console function, first connect to the Management Module from a Telnet or SSH client. You are prompted to enter a user ID and password. The default user ID is USERID and the default password is PASSW0RD, where 0 in the default password is a zero. Consider changing the defaults in a production environment. There are several different commands that you can use to access the SoL remote text console function. Table 19-1 lists the most useful commands.
Table 19-1 Management Module commands for SoL Command console Description Open a SoL remote text console for the blade server. This command fails if another SoL remote text console is already open for the blade server. Terminate any existing SoL remote text console for the blade server and open a SoL remote text console for the blade server. Reset the blade server, and then open a SoL remote text console for the blade server. This is functionally equivalent to the boot -c command when used in a blade server context. Power on the blade server and then open a SoL remote text console for the blade server. Power on the blade server and then open a SoL remote text console for the blade server. If the blade server is already powered on, power it off first, and then power on.
console -o
277
Here are some examples of how to use these commands. To open a SoL remote text console to the blade server in bay 3, use the following command:
console -T system:blade[3]
To reset the blade server in bay 2 and then open a SoL remote text console to the blade server, use the following command:
boot -c -T system:blade[2]
To terminate an active SoL remote text console, press the Esc key followed by an open parenthesis (Shift+9 on U.S. keyboards). When the SoL remote text console ends, you return to the Management Module CLI prompt.
This section is applicable to Eserver BladeCenter JS20 and the Eserver i5 and Eserver p5 platforms.
278
These are the steps for performing a basic install of RHEL on Eserver i5 and Eserver p5 systems or a partition or a JS20 blade server from a CD: 1. At the yaboot prompt (boot:), press Enter to begin the installation. Note: Refer to Additional RHEL installation boot options on page 280 for information about providing additional options, such as using VNC. 2. In the CD Found window, click Skip if you do not want to test the CD media, and go to step 3. Otherwise, click OK if you want to test the CD media before you proceed with the installation. a. In the Media Check window, click Test to test the CD currently in the CD-ROM drive. b. If the media check result is PASS, click OK and proceed with the installation from that CD. c. If the CD is ejected after the media check, reinsert the CD into the CD-ROM drive. d. Click Continue. 3. In the Red Hat Enterprise Linux AS welcome window, click OK. 4. Select your language; then click OK. 5. In the Disk Partitioning Setup window, select Autopartition. If you get a warning that says the drive will be initialized and all data will be lost, select Yes. 6. In the Partitioning window, you can see how the devices will be allocated by the Linux installation. Click OK. Be aware that you will need approximately 3 GB allocated for the root (/) partition. Important: The Eserver i5 and Eserver p5 installations require /sda1 to be a PReP boot partition. Changing the size of or removing this partition will cause the system to fail during boot. 7. Configure the appropriate network settings for your environment.
279
8. When your network configuration is complete, the Firewall and SELinux windows open. Click OK if you want to enable the default configurations. 9. In the Language Support window, select any additional languages that you want to use on this Linux installation, and then click OK. 10.In the Time Zone Selection window, select System clock uses UTC and select the appropriate time zone for your system. Click OK. 11.Set the root password for your system. Click OK. 12.Select what packages to install in the Package Defaults window. Click OK. 13.In the Installation to begin window, click OK. 14.The installation process prompts you to change the CD several times. After the installation is complete, the system will inform you to remove the CD and reboot. Note: The SMS menu should be invoked after reboot on Eserver i5 and Eserver p5 systems to ensure that the boot device order has the installed hard drive as the first device. JS20 blade servers should have the hard disk listed as second in the boot order. If not, update this using the BladeCenter Management Module.
These are the steps for performing a basic installation of SLES on Eserver i5 and Eserver p5 systems or a partition from a CD: 1. At the prompt (boot:), press Enter to begin the installation. Note: Refer to the Additional SLES install boot options on page 282 for information about providing additional options, such as using VNC.
280
2. At the prompt, What type of terminal do you have?, select 4) X Terminal Emulator (xterm). 3. After you have read the License Agreement, select I Agree. 4. Select your language. Click Accept. 5. Select New Installation. 6. Select Partitioning. 7. In the Suggested Partitioning window, select Create custom partition setup, and then click Next for a list of the available hard drives. Important: Eserver i5 and Eserver p5 installations require /sda1 to be a PReP boot partition. Changing the size of or removing this partition will cause the system to fail during boot. 8. Select the drive you want to use, and then click Next. 9. To create a full system partition, click Use entire hard disk. 10.A warning appears; select Yes, install to begin the installation. During this part of the installation procedure, you might need to change the CD. Follow the prompts. At the end of this phase of the installation, the system restarts. Note: The SUSE Linux Enterprise Server installer automatically sets the SMS boot order for the Eserver i5 and Eserver p5 systems, so the partition restarts from the correct device. The boot order for a JS20 blade server should be changed using the BladeCenter Management Module. 11.After the boot: prompt appears, the system starts automatically after several seconds. 12.When the installation window reopens, you are prompted to create a password for root. Enter the password for the root user twice, as prompted. Click Next. 13.In the Network Configuration window, select Change. 14.Select Network Interfaces. 15.In the Network cards configuration window, select Change under Ethernet card 0. 16.Select Edit. 17.Select and enter the settings appropriate for your environment, such as IP address, host name and name server, and routing. Click Next. 18.In the Network cards configuration overview window, click Finish. Click Next.
281
19.In the Test Internet Connection window, select No, Skip This Test. Click Next. 20.In the Service Configuration window, make sure that the Common Name and the Server Name fields have the correct values for your environment. Click Next. 21.For User Authentication Method, select Local (/etc/passwd). Click Next. 22.For LDAP Client Configuration, click Next. 23.In the Add a New LDAP User window, if you want to create a new user, do so here. Otherwise, do not create a new user. Click Next, and select Yes if you are warned about Empty user login. 24.After you have read the Release Notes window, click Next. 25.In the Hardware Configuration window, click Next. 26.When you see the Installation Completed window, click Finish. 27.After all of the settings are configured, the system exits the installation procedure and a login prompt is displayed.
282
ProxyPort: <3128> This specifies the port used by the proxy, if it does not use the default port. Textmode: <0|1> This keyword enables starting YaST in text mode. VNC: <0|1> The VNC parameter controls the installation process through VNC, which makes the installation more convenient for hosts that do not have a graphical console. If enabled, the corresponding service is activated. Also see the VNCPassword keyword. VNCPassword: <password> This sets a password for a VNC installation to control access to the session. UseSSH: <0|1> This keyword enables access to linuxrc through SSH when performing the installation with YaST in text mode. SSHPassword: <password> This sets the password for the user root to access linuxrc. Insmod: <module parameters> This specifies a module the kernel should load and any parameters needed for it. Module parameters must be separated by spaces. AddSwap: <0|3|/dev/hda5> If set to 0, the system does not try to activate a swap partition. If set to a positive number, the partition corresponding to the number is activated as a swap partition. Alternatively, specify the full device name of a partition.
283
For information about configuring the YaBoot bootloader, refer to your distributions POWER technology-specific documentation and the official YaBoot Web site located at:
http://penguinppc.org/bootloaders/yaboot/
284
Table 19-2 shows the supported virtual functions found in both Eserver-supported Linux distributions and the IBM VIO Server.
Table 19-2 Supported virtual I/O functions Virtual I/O function Shared processing Virtual SCSI server Virtual SCSI client Virtual Ethernet server Virtual Ethernet client Virtual console server Virtual console client RHEL 4 Yes No Yes Yes Yes Yes Yes SLES 9 Yes Yes Yes Yes Yes Yes Yes IBM VIO Server Yes Yes N/A Yes N/A Yes N/A
Although IBM VIO Server is based on IBM AIX 5L, it is quite different. You only use the VIO Server commands; some standard AIX 5L features are not present, and some typical AIX 5L setups are not allowed, such as Logical Volume Manager (LVM)-level mirroring of VIO client logical volumes. For in-depth information about this and POWER virtualization, refer to the IBM Redbook Advanced POWER Virtualization on IBM System p5, SG24-7940. The following topics describe how to create profiles for a virtual I/O server and client partition and configure them in Linux: Create a virtual I/O server partition profile Create a client partition profile Configure Linux on a virtual I/O server Configure Linux on a virtual client partition
285
3. Take the default (No) for the Workload Management Groups function. 4. Assign a name to the profile. 5. Select the amount of memory you want to assign to the partition. 6. Select at least one Dedicated processor. 7. Assign physical I/O devices, such as CD/DVD drives and physical network adapters, to the partition. 8. Click Next in the I/O Pools window, because this function is not supported in Linux. 9. Select Yes, I want to specify virtual I/O adapters, as shown in Figure 19-16 on page 287.
286
10.The next window enables you to create all of the virtual I/O adapters you will use in the virtual I/O server. See Figure 19-17 for an example.
Figure 19-17 Create Logical Partition Profile - Create Virtual I/O Adapters
287
For the virtual Ethernet adapter, select Trunk adapter, as shown in Figure 19-18, and then click OK to return to the previous menu. In order to bridge two networks, one adapter in the virtual network must be designated as the trunk adapter. The trunk adapter manages all frames with unknown MAC addresses and routes them to the physical network. This virtual Ethernet adapter will be bridged with the VIO servers physical Ethernet adapter to an external network.
288
For the virtual SCSI, leave Server selected for the Adapter Type (as shown in Figure 19-19) because this partition provides the disk or block devices to the client partitions. You can also leave Any remote partition and slot can connect selected because you do not know which remote partitions this slot should map to yet. After you create the client partitions, you can come back and change this to the correct client partition and slot number.
Click OK to create the adapter and return to the Create Virtual I/O Adapter window. Serial adapters are not created until the client partitions are created later.
289
11.Figure 19-20 is an example of what you should see after creating your virtual SCSI and Ethernet adapters.
12.Click Next in the Create Virtual Adapters window. 13.Click Next in the Power Controlling Partition window, because this function is not supported in Linux.
290
14.Select desired optional settings and Normal under the Boot modes section of the Optional Settings menu. Click Next. 15.Click Finish in the Profile Summary window.
291
Click Next after configuring the processor settings. 6. Usually, there are no physical devices to assign because the client partitions only use virtual I/O. Click Next in the I/O window to continue. 7. Select Yes, I want to specify virtual I/O adapters, as shown in Figure 19-16 on page 287. 8. The next window enables you to create all of the virtual I/O adapters you will use in the client. See Figure 19-17 on page 287 for an example of this window. For the virtual Ethernet adapter, you can leave all the defaults, as shown in Figure 19-22. This is the virtual LAN that will be bridged to the physical network.
Click OK to create the adapter and return to the Create Virtual I/O Adapter window.
292
For the virtual SCSI, select Client for the Adapter Type (as shown in Figure 19-23).
Map the remote partition and slot number to the virtual SCSI server adapter slot you created for the virtual I/O server created earlier. For example, the first virtual SCSI adapter created for the virtual I/O server in 19.4.1, Create a virtual I/O server partition profile on page 285 used slot 4. So enter 4 in the Remote partition virtual slot number field for this partition. Then, click OK. Serial adapters are not created for client partitions. 9. Click Next in the Create Virtual Adapters window. 10.Click Next in the Power Controlling Partition window, because this function is not supported in Linux. 11.Select desired optional settings and Normal under the Boot modes section of the Optional Settings menu. Click Next. 12.Click Finish in the Profile Summary.
293
13.Return to the virtual I/O server profile to create the virtual serial client adapter. Start by right-clicking the default profile under the virtual I/O server partition and selecting Properties. 14.Go to the Virtual I/O tab and under Create adapters, select Serial and click Create. This launches a separate window to configure the properties of the virtual serial adapter. 15.Leave the type as Client and assign the Remote Partition to the corresponding client partition. Enter 0 for the Remote partition virtual slot number, as shown in Figure 19-24.
16.You can now go through each of the virtual server SCSI adapters you created earlier and assign the correct remote partition to them. For each of the virtual Server SCSI adapters, select Only selected remote partition and slot can connect in the Connection Information section. 17.Mapping the slot numbers is a little trickier. You must assign the correct client partition and slot to its corresponding SCSI server slot. Figure 19-25 on page 295 shows an example of the mapping between a SCSI server adapter and an associated SCSI client adapter.
294
The client and server configuration is now complete. The next steps involve installing and configuring Linux to recognize and use the virtual devices on the server and client.
295
distribution that contains the virtual SCSI server driver. After installing SLES9 SP1 or later, install the bridge-utils and ckermit packages found in your SLES installation media.
296
which interface is your second physical interface. For this example, it happens to be eth2. You can also use the same method to determine the first virtual Ethernet interface, which is eth0 for this exercise. Example 19-1 shows both of these examples.
Example 19-1 ifconfig output eth2 Link encap:Ethernet HWaddr 00:0D:60:DE:01:A9 inet6 addr: fe80::20d:60ff:fede:1a9/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:794359 errors:0 dropped:0 overruns:0 frame:0 TX packets:16 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:56965484 (54.3 Mb) TX bytes:1124 (1.0 Kb) Base address:0xec00 Memory:b8100000-b8120000 Link encap:Ethernet HWaddr 2A:34:F0:00:10:02 inet6 addr: fe80::2834:f0ff:fe00:1002/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:794177 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:53775670 (51.2 Mb) Interrupt:184
eth0
Notice how neither interface has an IP address defined. Next, use the bridging tools available in the bridge-utils package to create a couple scripts that configure the bridge when eth2 is activated and take down the bridge when eth2 is deactivated. The network configuration files for SLES9 are located in /etc/sysconfig/network and are labeled ifcfg-eth-id-<MAC_ADDRESS>. Using the MAC address of eth2, you can identify which configuration file needs to be edited. For this exercise, the configuration file is: /etc/sysconfig/network/ifcfg-eth-id-00:0d:60:de:01:a9 The variable POST_UP points to a script that will run after the device is activated, while POST_DOWN points to a script that will run after the device has been deactivated. The two scripts are bridge-up.sh and bridge-down.sh and can be stored in /usr/local/bin or /etc/sysconfig/network/. Set these variables in your Ethernet configuration file. You should have entries that look similar to these in your configuration file:
POST_UP_SCRIPT='/etc/sysconfig/network/bridge-up.sh' POST_DOWN_SCRIPT='/etc/sysconfig/network/bridge-down.sh'
297
Example 19-2 shows a sample bridge-up.sh script with comments describing each line.
Example 19-2 Sample bridge-up.sh script #!/bin/sh # the ethX device that called this script CFG=$1 # the ethX device that called this script # source the eth config script to set some variables . /etc/sysconfig/network/ifcfg-$CFG # create the ethernet bridge /sbin/brctl addbr br0 # reset addresses for virtual ethernet (eth0) /sbin/ifconfig eth0 0.0.0.0 # reset address for physical etherent (eth2) /sbin/ifconfig eth2 0.0.0.0 # add the virtual ethernet to the bridge /sbin/brctl addif br0 eth0 # add the physical ethernet to the bridge /sbin/brctl addif br0 eth2 # bring up the bridge interface with the IP # address our physical interface was using /sbin/ifconfig br0 $IPADDR netmask $NETMASK
Example 19-3 shows a sample bridge-down.sh script with comments describing each line.
Example 19-3 Sample bridge-down.sh script #!/bin/sh # bring down virtual ethernet device eth0 ifconfig eth0 down # bring down physical ethernet device eth2 ifconfig eth2 down # delete eth0 from bridge interface br0 brctl delif br0 eth0 # delete eth2 from bridge interface br0
298
brctl delif br0 eth3 # bring down bridge interface br0 ifconfig br0 down # remove bridge instance brctl delbr br0
Using the techniques described here, you should now have all three Ethernet interfaces configured in the virtual I/O server partition (see Figure 19-26 on page 296).
Add this command to /etc/rc.d/boot.local so that it executes on every boot. Looking at your kernel messages in /var/log/messages, you will see something similar to the following:
Initializing IBM hvcs (Hypervisor Virtual Console Server) Driver vio_register_driver: driver hvcs registering HVCS: Added vty-server@30000010. HVCS: driver module inserted.
Note: Slots are in hexadecimal in the kernel log. For example, 0x10 above is slot 16. Using these mappings, you can create console connections on the virtual I/O server partition to the corresponding client partition. For this tutorial, we use the kermit serial program, which is part of the ckermit software package. The following command creates a console connection to the client:
# kermit -l /dev/hvcs0 -c
The device /dev/hvsc0 is the first device and maps to the first vty-server. If additional clients were configured, they would map accordingly. After you run the kermit command, you should see a screen similar to the following:
Connecting to /dev/hvcs0, speed 38400 Escape character: Ctrl-\ (ASCII 28, FS): enabled Type the escape character followed by C to get back, or followed by ? to see other options. ----------------------------------------------------
299
This causes the module to load automatically on boot. The virtual SCSI server supports 64 target devices per bus and eight buses per virtual adapter. It defaults to one target and one bus per virtual adapter when the IBM virtual SCSI module is loaded. The virtual SCSI adapter supports multiple block devices, including an entire SCSI disk, a partition of a SCSI disk, and a shared file mounted over a loopback device. Modify a virtual SCSI adapter's settings through the sysfs file system (see /sys on page 90). The virtual SCSI adapters are located under /sys/devices/vio and all start with 300000xx, where xx is the slot number of the SCSI adapter. If the virtual I/O server partition has slot 4 configured as its first virtual SCSI adapter. It is represented in the sysfs file system under /sys/devices/vio/30000004/. To modify the number of buses this adapter supports, you must modify the setting /sys/devices/vio/30000004/num_buses. To modify the number of targets a certain bus supports, bus0 in this example, you modify /sys/devices/vio/30000004/bus0/num_targets. Here is an example of how to configure one adapter: 1. Set the number of targets to 1 for this bus:
# echo 1 > /sys/devices/vio/30000004/bus0/num_targets
You can add a function to /etc/rc.d/boot.local to make setting up the virtual SCSI adapters easier, as shown in Example 19-4 on page 301.
300
Example 19-4 Virtual SCSI function in boot.local #! /bin/sh # # Copyright (c) 2002 SuSE Linux AG Nuernberg, Germany. All rights reserved. # # Author: Werner Fink <[email protected]>, 1996 # Burchard Steinbild, 1996 # # /etc/init.d/boot.local # # script with local commands to be executed from init on system startup # # Here you should add things, that should happen directly after booting # before we're going to the first run level. # # load the Hypervisor Virtual Console driver modprobe hvcs # load the IBM Virtual SCSI server driver modprobe ibmvscsis function vscsisetup { if [ $# -ne 2 ]; then echo "vscsisetup: slot_number physical_device" exit 1 fi vslot=$1 physical_device=$2 if [ ! -e /sys/devices/vio/$vslot ]; then echo "vscsisetup: Error - Slot number $vslot does not exist" exit 1 fi if [ ! -e $physical_device ]; then echo "vscsisetup: Error - physical device $physical_device does not exist" exit 1 fi echo 1 > /sys/devices/vio/$vslot/bus0/num_targets echo $physical_device > /sys/devices/vio/$vslot/bus0/target0/device echo b > /sys/devices/vio/$vslot/bus0/target0/type echo 0 > /sys/devices/vio/$vslot/bus0/target0/ro echo 1 > /sys/devices/vio/$vslot/bus0/target0/active rc=`cat /sys/devices/vio/$vslot/bus0/target0/active` if [ $rc -ne '1' ]; then echo "IBMVSCSI Server configuration failed for device $vslot" fi; }
301
# assign block devices to virtual SCSI adapters # setup server slot 4 with /dev/sdb assigned to client partition vscsisetup 30000004 /dev/sdb
The virtual I/O server should be configured at this point. For this tutorial about virtualization, we do a CD installation on the client. In order to accomplish this, we must relocate the CD/DVD device to the client partition for installation. For additional installation methods, refer to Linux virtualization on POWER5: A hands-on setup guide on IBM developerWorks:
http://www.ibm.com/developerworks/edu/l-dw-linux-pow-virutal.html
Perform the following steps: 1. Power off the virtual I/O server partition. 2. Remove the CD/DVD device from the virtual I/O server partition profile. Refer to Hosted (partitioned) on page 262 for details. 3. Add the CD/DVD device to the client partition profile. 4. Power on the virtual I/O server partition and ensure that all the services and virtual functions are set up properly.
302
diagela
303
Linux on IBM Eserver i5 Implementation Guide, SG24-6388 The IBM Eserver BladeCenter JS20, SG24-6342 Advanced POWER Virtualization on IBM System p5, SG24-7940 IBM Information Center publications
http://publib.boulder.ibm.com/infocenter/eserver/v1r3s/index.jsp
Managing the Advanced System Management Interface (ASMI) Managing the Hardware Management Console (HMC) Managing your server using the Hardware Management Console
304
Partitioning for Linux Installing Linux Distribution guides Red Hat:Installation Guide for the IBM POWER Architecture
http://www.redhat.com/docs/manuals/enterprise/
Novel SUSE: SUSE Linux Enterprise Server 9 Architecture-Specific Information for IBM POWER
http://www.novell.com/documentation/sles9/index.html
IBM developerWorks
https://www.software.ibm.com/developerworks
305
306
20
Chapter 20.
307
Performance monitoring and tuning Troubleshooting and diagnostics S/390 and zSeries-specific Linux commands High availability Security References
308
20.1 Planning
As with any server, you must plan an installation. You must define the resources your applications need to function optimally. These resources, referred to as a footprint, should be the starting point of your planning. With this information, you can size and configure your server requirements appropriately. You will need several resources to properly size, deploy, and tune Linux on a mainframe. We cover these at a high level in this section and refer you to other Web sites or documents for more in-depth information. The information in this section will help you prepare for a Solution Assurance Review (SAR). All Linux on mainframes deployments should have a SAR at the beginning of the project. Ask your IBM zSeries representative to host a SAR for you. This will be a question and answer session where your team and IBM can discuss the behavior of your applications, your requirements, and expectations, and help identify what hardware resources you will need to be successful in your deployment. Running Linux under z/VM in an LPAR is considered the best practice. Virtual Machine (VM) has long been recognized as a robust computing platform, spanning the family of S/390 and zSeries servers. z/VM provides a highly flexible test and production environment for enterprises deploying the latest e-business solutions. z/VM supports Linux, one of the world's leading open source operating systems. Within the VM environment, Linux images benefit from the ability to share hardware and software resources and use internal high-speed communications. z/VM offers an ideal platform for consolidating workloads on a single physical server, which enables you to run tens to hundreds of Linux images. Although you can run Linux in an LPAR without z/VM, this chapter assumes that you are considering hosting Linux images with z/VM. Refer to the following brief list of Internet references for Linux on mainframes: Linux for S/390 project This Web site contains useful links to IBM Redbooks, other related Web sites, how-tos, man pages, and more:
http://www.Linuxvm.org/
z/VM publications This Web site provides links to documents for specific z/VM releases and a link to another Linux library that has articles discussing specific workloads:
http://www.vm.ibm.com/pubs/
Chapter 20. IBM eServer zSeries and IBM System z hardware platform specifics
309
IBM Eserver zSeries and IBM System z This Web site provides links to documents for specific zSeries models and a link to another Linux library that has articles discussing solutions, success stories, and technical support:
http://www.ibm.com/servers/eserver/zseries/
z/VM overview This Web site provides an overview of the features available in current releases of z/VM:
http://www.vm.ibm.com/overview
A set of planning worksheets is available in IBM Redbook z/VM and Linux on zSeries: From LPAR to Virtual Servers in Two Days, SG24-6695.
310
A 3270 emulator named x3270 (included for free in most distributions) for Linux desktops A Linux Secure Shell (SSH) client such as PuTTY (recommended) or TeraTerm for Windows desktops For Linux desktops, the SSH client, which is built-in
Linux can run on the bare hardware of the mainframe without any special software or support required. The actual internals of the Linux OS are identical from platform to platform. The only changes that are made in the mainframe implementation of Linux relate to the instructions that the operating system passes to the hardware. As mentioned earlier, running Linux under z/VM in an LPAR is considered the best practice.
Chapter 20. IBM eServer zSeries and IBM System z hardware platform specifics
311
20.2.2 Memory
There are three different address space sizes for Linux distributions. 64 GB: 64-bit word lengths are available on Intel, AMD, POWER, and zSeries processors. A 64-bit word length, generally speaking, provides applications with a 64 GB address space with current technology.
312
4 GB: 32-bit word lengths are available on Intel and earlier POWER or RISC processors. A 32-bit word length provides applications with a 4 GB address space. 2 GB: 31-bit address spaces are available on S/390 and zSeries processors. One bit of the 32-bit word length is reserved as a flag for the older 24-bit address space. This shorter 31-bit word length provides applications with a 2 GB address space (approximately). IBM S/390 only supports 31-bit address spaces. zSeries can run both 31-bit and 64-bit Linux guests. Because of the more limited address space in the 31-bit environment, we recommend that you deploy 64-bit Linux on zSeries. 31-bit applications are fully supported on 64-bit Linux on zSeries.
Chapter 20. IBM eServer zSeries and IBM System z hardware platform specifics
313
Subchannel One subchannel is dedicated to each I/O device accessed by the channel subsystem. The subchannel provides information about the attached I/O device to the channel subsystem (such as the CHPID, device status, and channel path availability). Subchannels are addressed using the system-unique 16-bit subchannel number. The actual number of available subchannels depends on the system model, but is limited to a maximum of 65,536 per system. Channel path A control unit is attached to the channel subsystem by one or more channel paths. Depending on the zSeries model and configuration, an I/O device can be accessed by as many as eight different channel paths. Types of channel paths supported on zSeries include: Enterprise Systems Connection (ESCON) Fibre Connection (FICON) Open Systems Adapter-2 (OSA-2) OSA-Express Channel paths are addressed using the system-unique 8-bit channel-path identifier (CHPID). The actual number of available channel paths depends on the system model, but is limited to a maximum of 256 per system. System assist processor (SAP) The SAP schedules an I/O operation. It finds an available channel path to the intended device and guarantees completion of the I/O operation. However, it is not involved in moving data between central storage and the channel.
ESCON
ESCON provides bidirectional serial bit transmission, in which the communication protocol is implemented through sequences of special control characters and through formatted frames of characters. The ESCON link data rate is 200 megabits per second (Mbps), which results in a maximum aggregate data rate of up to 17 megabytes per second (MBps). The maximum unrepeated distance of an ESCON link using multimode fiber optic cables is 3 km (1.87 miles) when using 62.5 micron fiber.
FICON
FICON provides all the strengths of ESCON, plus more. The link data rate has increased from 200 Mbps to 2 Gbps, with expected effective data transfer rates between 60 to more than 170 MBps. The FICON implementation enables full duplex data transfer, so data travels in both directions simultaneously, rather than
314
the ESCON half-duplex data transfer. In addition, multiple concurrent I/Os can occur on a single FICON channel, a fundamental difference between FICON and ESCON.
Chapter 20. IBM eServer zSeries and IBM System z hardware platform specifics
315
Disk drives are identified with the /dev/dasd prefix instead of /dev/sd (SCSI) or /dev/hd (IDE). The disk names are created in this order: /dev/dasda through /dev/dasdz, then /dev/dasdaa, and so on. Linux directories that contain disk drive information are /proc/scsi, proc/bus, and /proc/dasd. Disk drives can be accessed as full volumes or partitioned as z/VM minidisks. A special type of disk, the VDISK, is a non-persistent RAM disk that can be created in expanded storage. In many cases, the FICON implementation coexists with, and can reuse, a customers existing ESCON fiber cabling infrastructure. The FICON features on zSeries servers also support full fabric connectivity under the Linux operating system for the attachment of Small Computer System Interface (SCSI) devices using the Fibre Channel Protocol (FCP).
20.2.6 Network
Setting up real and virtual networking is described in Chapter 4 of Linux for IBM System z9 and zSeries, SG24-6694 and in Networking Overview for Linux on zSeries, REDP-3901. Red Hat and SUSE both provide specific instructions for identifying and configuring network connections.
HiperSockets
HiperSockets technology is available for IBM Eserver zSeries servers (z800, z890, z900, and z990) and IBM System z9 109. HiperSockets is an integrated any-to-any virtual TCP/IP network that provides interconnectivity between multiple LPAR or virtualized images under z/VM. With HiperSockets, you can connect any server running on the same zSeries and improve response time due to low latency. HiperSockets is a feature of the zSeries 800 and 900 processors. It provides a high-speed network connectivity method, which can be used to link operating systems running in logical partitions on a single zSeries processor. Note: Connectivity in a z/VM virtual network is limited to guests running in a single z/VM image. Virtual networks cannot be used for inter-LPAR communication.
Virtual networks
Three types of virtual networks are available to Linux guests: Virtual channel-to-channel (VCTC): VCTC networks provide point-to-point connectivity between guests without real channel allocation (as required for real channel-to-channel connectivity).
316
A real channel-to-channel (CTC) adapter is used to connect a real mainframe to another using the channel protocol. z/VM provides the ability to define virtual channel-to-channel adapters so that users can connect virtual machines using the CTCA protocol. On z/VM, this is useful for connecting Linux virtual machines to other virtual machines that do not support inter-user communication vehicle (IUCV), such as VSE/ESA, OS/390, and z/OS. Virtual VCTC networks can also connect Linux virtual machines. Inter-user communication vehicle (IUCV): Point-to-point TCP/IP connections between Linux guests can be established using IUCV. IUCV is a VM-unique, virtual machine-to-virtual machine communication protocol. The Linux for S/390 and zSeries kernels include an IUCV driver, enabling you to connect two Linux virtual machines. Linux treats IUCV connections as any other TCP/IP network connection. This results in memory-speed networking between the connected Linux servers. The speed of the IUCV line is a factor of processor speed. The faster your zSeries server is, the faster your IUCV network is. When you upgrade to a faster real processor, you automatically increase the speed of your virtual network. IUCV is also supported by the z/VM TCP/IP stack, so you can use IUCV to connect Linux images to the VM TCP/IP stack. z/VM guest LAN and virtual switch: This type of network enables local area network (LAN) connectivity between z/VM guests. With VM guest LAN and VSWITCH technology, you can connect a large number of Linux servers to a real network using fewer real network adapters, exploiting the virtual networking capabilities of z/VM to essentially share the real network connections among your Linux servers. IBM recommends that you to implement VM guest LAN over point-to-point for your network connectivity. It also recommends the VSWITCH architecture over router virtual machine.
Chapter 20. IBM eServer zSeries and IBM System z hardware platform specifics
317
Important: If you want the ability to move an OSA CHPID from LPAR to LPAR for recovery purposes, defining the CHPID as shareable is not a good idea. Doing so reduces the maximum usable capacity of the OSA by at least half, because you need to provide the same definitions on both the production and backup LPARs (to provide access for all the Linux guests that you recover). Defining the CHPID as reconfigurable is better in this case. If you must share the OSA with another LPAR and also use it for recovery, defining the CHPID as shareable is the only solution. You need to take into account the reduced capacity when designing your Linux guest connectivity. The candidate list is the list of LPARs that can have access to the CHPID. LPARs not defined in the candidate list cannot configure the CHPID online. The OSA-Express IP Assist function offloads the following protocol functions from the IP stack for processing in the adapter: Broadcast filtering ARP processing Building MAC and LLC headers Offloaded processing can reduce the cycles consumed by your Linux guests for network traffic, giving a slight performance improvement. In a single guest, the effect might not be significant, but in a z/VM LPAR with Linux guests generating a moderate-to-high volume of network traffic, we would expect an overall saving.
Stack-to-stack routing
When IP stacks are sharing an OSA, and one stack sends traffic destined to another stack sharing the same OSA port, the OSA sends the traffic directly to the destination stack. Network traffic processed in this way does not appear on the LAN. This action takes place transparently to the sending stack. This can provide a performance benefit when a number of guests send network traffic to each other, because it will be sent directly between the stacks rather than out across the network. If you are considering an OSA-sharing configuration for your large-scale Linux installation, you need to be aware of some points regarding this connection method. An IBM Technical Flash (document number Flash 10144) describes some considerations to be observed when sharing an OSA-Express port defined in QDIO mode. It details the number of LPARs or guests that can share an OSA (depending on the hardware type) and some zSeries code-level dependencies. In summary, a z900 with up-to-date microcode, or any z800, can support up to 80
318
IP stacks on an OSA-Express port in QDIO mode. Other combinations can support considerably fewer than that. What is not clear is the level of performance that can be expected when the OSA is configured to its peak. Performance testing to date has focussed on throughput from a single stack, rather than saturation across a fully-configured OSA. To access this Flash, enter the Flash number 10144 at the following site:
http://www.ibm.com/support/techdocs/
20.2.7 Printers
There are two specific considerations for creating print servers on Linux on zSeries. Printers attached to and directly managed by z/VM that you can connect locally with S/390 and zSeries hardware platforms are not supported by CUPS. On these platforms, network printing is required. For information about configuring network printers, see Printing with Linux on IBM Eserver zSeries Using CUPS and Samba, REDP-3864. In general, a root file system of a single 3390-3 does not leave sufficient disk space for a print server. There are many possible configurations for laying out file systems. One suggested configuration is three 3390-3s, one for each of / (root), /usr, and /var.
Chapter 20. IBM eServer zSeries and IBM System z hardware platform specifics
319
20.2.9 Virtualization
The z/VM Control Program controls the virtual machine environment. Control Program provides each z/VM user with a working environment referred to as a virtual machine. A virtual machine is the functional equivalent a real system. Virtual machines share real resources: processors, storage, console, and input/output devices. The real resources will be managed with a user directory provided by z/VM. There does not need to be an actual correspondence between physical and logical resources for virtualization to be used. A guest operating system such as Linux running in the virtual machine sees the virtual resources as real hardware. No modifications are required to the operating system to operate in a virtual machine; the mapping of these virtual resources to real resources is handled by the virtualization software. With z/VM, you can grow your server workload vertically or horizontally. Vertical growth is realized when you add more system resources such as additional processing power to an existing virtual machine. You can give a Linux virtual machine more processor capacity, more virtual memory, more I/O devices and bandwidth, plus more networking bandwidth. Horizontal growth is a typical way to grow workloads. It is easily accomplished by adding another virtual machine, or two, or three, or more on z/VM. There is an added benefit in the efficient use and sharing of system resources. This makes adding more Linux virtual servers a particularly attractive option when you consider the limited scalability of a single Linux instance. The added scalability of Linux workloads is realized when you choose to exploit data-in-memory and sharing techniques of z/VM. Virtual disks in storage and minidisk cache can boost the performance of Linux servers on z/VM by making disk I/O operations execute at processor memory speeds, avoiding trips to the I/O subsystem, and waiting on spinning disks of storage. By sharing data and programming on shared, read-only minidisks, server deployment time can be reduced, as well as the maintenance effort required to replicate changes to data and programming among multiple distributed servers.
320
Installation into a logical partition (LPAR). Linux in an LPAR is typically used when the single Linux server can process a large, critical workload. For example, SAP and IBM Lotus Domino servers are often run in an LPAR. Installation into a z/VM guest. Linux shares the LPARs resources with other z/VM guests. Virtualization techniques are available to Linux.
Chapter 20. IBM eServer zSeries and IBM System z hardware platform specifics
321
Mount directories, such as /home, /proc, /dev, /mnt, and /media, as read/write file systems. The root ( /, not to be mistaken for /root) directory should also be mounted in read/write mode. This particular approach incurs additional work for the system administrator. However, the benefit of mounting parts of the operating system in the read-only mode means that mistakes will impact a much smaller area of the system. On any given clone, a user can only damage the configuration of that users own applications.
Installation methods
The installation methods listed in Table 20-1 apply to both 31-bit and 64-bit versions of Red Hat and SUSE distributions. Both distributions recommend 512 MB RAM (minimum 256 MB) for the installation program.
Table 20-1 Installation techniques Installation technique Network installation into z/VM guest using ISO images on remote server Network installation into z/VM guest from remote directory Installation using tape LPAR installation using CD Red Hat Enterprise Linux NFS protocol is supported. SUSE Linux Enterprise Server NFS protocol is supported.
Requires access to the Hardware Management Console (HMC) or Support Element Workplace (SEW). CD images must be accessed through FTP. Disk must be formatted ext2 or ext3. Yes Yes Yes Yes Yes
Installation from S/390 hard drive Graphical installation Text mode installation SSH Telnet VNC
322
Perform the following steps: 1. First, you must log in to z/VM as the Linux guest account using a 3270 emulator program. Enter the Conversational Monitor System (CMS) mode with the following command:
ipl cms
The Red Hat Enterprise Linux installation requires the following files: kernel.img (the Linux kernel) initrd.img (the initial RAM disk) redhat.parm redhat.conf 2. Update the redhat.parm and redhat.conf files. 3. Load (punch) the files into the z/VM guests virtual reader queue and then boot (ipl) the guest using the files in the readers queue. The installation program starts. You will be notified when you can login through ssh, telnet, or vnc to continue with the installation.
Chapter 20. IBM eServer zSeries and IBM System z hardware platform specifics
323
You can manually enter the commands to start the installation, but most system administrators find it easier to create a script with the necessary commands. The z/VM editor is invoked with the xedit command. The editor is closed and the file saved with the save subcommand. For example:
xedit rhel4 exec a
Example 20-3 shows the contents of the rhel4 exec a file in REXX format. To execute this file after you have saved it, type the rhel4 command at the CMS prompt and the installation will begin.
Example 20-3 Example installation file: rhel4 exec a, in REXX format /* */ 'close rdr' 'purge rdr all' 'spool punch * rdr' 'punch kernel img a (noh' 'punch redhat parm a (noh' 'punch initrd img a (noh' 'change rdr all keep nohold' 'ipl 00c clear'
Notice that the redhat conf a (redhat.conf) file is not punched to the reader. You only need to punch the images and the parm file to begin the installation. The installation program will then read the contents of the configuration file when it is required. From this point on, you should refer to rhel-ig-s390-multi-en.pdf, Red Hat Enterprise Linux 4 Installation Guide for the IBM S/390 and IBM eServer zSeries Architectures, for details about the specific type of installation (CD, ISO image, NFS) and access mode (SSH, Telnet, VNC) that you have chosen.
324
SUSE Linux Enterprise Server installation requires the following files on the installation CD-ROM: vmrdr.ikr (the Linux kernel) initrd (the initial RAM disk) parmfile These files are usually saved on the z/VM guests minidisk with names such as: sles9.image sles9.initrd sles9.parm 2. Load (punch) the files into the z/VM guests virtual reader queue and then boot (ipl) the guest using the files in the readers queue. The installation program starts. You will be notified when you can login through ssh, telnet, or vnc to continue with the installation.
You can manually enter the commands to start the installation, but most system administrators find it easier to create a script with the necessary commands. The z/VM editor is invoked with the xedit command. The editor is closed and the file saved with the save subcommand. For example:
xedit sles9 exec a
Example 20-5 on page 326 presents the contents of the sles9 exec a file in REXX format. To execute this file after you have saved it, type the sles9 command at the CMS prompt and the installation will begin.
Chapter 20. IBM eServer zSeries and IBM System z hardware platform specifics
325
Example 20-5 Example installation file: sles9 exec a /**/ 'close rdr' 'purge rdr all' 'spool punch * rdr' 'punch sles9 image a (noh' 'punch sles9 parm a (noh' 'punch sles9 initrd a (noh' 'change rdr all keep nohold' 'ipl 00c clear'
From this point on, refer to sles-prep-zseries.pdf, SUSE Linux Enterprise Server Architecture-Specific Information, for details about the specific type of installation (CD, ISO image, NFS) and access mode (SSH, Telnet, VNC) you have chosen.
The Linux boot process displays the boot messages on the z/VM (3270) console. To automate the process of IPLing a Linux guest during logon, include the following statement in the PROFILE EXEC A of the Linux guest user ID:
ipl vdev clear
Before including this statement in PROFILE EXEC, ensure that Linux has been successfully installed. Otherwise, you might get into a situation where z/VM will go into a continuous CP READ state. The clear operand to the ipl command is optional. If specified, the content of the virtual machine in storage is set to binary zeros before the guest operating system is loaded.
326
ZIPL
The mainframe versions of Linux use the ZIPL bootloader. The configuration file is /etc/zipl.conf. If you make changes to /etc/zipl.conf you must run the zipl command to activate the changes. For example, you would run the zipl command when directed to after applying kernel updates or after you added different boot parameters such as additional disk drives.
Chapter 20. IBM eServer zSeries and IBM System z hardware platform specifics
327
There are two important items to note when using the hcp command: Do not enter the hcp command without any parameters; this will cause the virtual machine to enter the CP READ state. If this happens, you can log in using a 3270 emulator and enter the b command to return control of the guest to Linux. Remember to quote special characters (such as *) to prevent expansion by the bash shell. You can also download the cpint package from the following site:
http://www.linuxvm.org
linux041:~ # cat /proc/dasd/devices 0.0.0200(ECKD) at ( 94: 0) is dasda 600840 blocks, 2347 MB 0.0.0201(ECKD) at ( 94: 4) is dasdb 600840 blocks, 2347 MB 0.0.0202(ECKD) at ( 94: 8) is dasdc 600840 blocks, 2347 MB 0.0.0203(ECKD) at ( 94: 12) is dasdd 600840 blocks, 2347 MB 0.0.0204(ECKD) at ( 94: 16) is dasde 600840 blocks, 2347 MB
: active at blocksize: 4096, : active at blocksize: 4096, : active at blocksize: 4096, : active at blocksize: 4096, : active at blocksize: 4096,
328
3. The YaST2 GUI provides a graphical method for activating devices. We chose to use a command line utility to activate DASD 0500:
linux041:~ # dasd_configure 0.0.0500 1 0 Configuring device 0.0.0500 Setting device online
4. We listed the z/VM virtual DASD and Linux DASD devices again and found these additional entries:
linux041:~ # hcp q v dasd ... DASD 0500 3390 LIC158 R/W
linux041:~ # cat /proc/dasd/devices ... 0.0.0500(ECKD) at ( 94: 20) is dasdf : active at blocksize: 4096, 600840 blocks, 2347 MB
At this point, we can access the device as /dev/dasdf. Any DASD operations, such as partitioning and formatting, are now available for use with this drive. 5. We wanted our new DASD device to be found during subsequent boots or IPLs, so we performed addition (optional) operations, as shown in Example 20-7, using mkinitrd and zipl.
Example 20-7 Using mkinitrd and zipl to make new DASD devices persistent linux041:~ # mkinitrd Root device: /dev/system/sysvol (mounted on / as ext3) Module list: jbd ext3 dm_mod dm-mod dm-snapshot dasd_eckd_mod Kernel image: Initrd image: /boot/image-2.6.5-7.191-s390x /boot/initrd-2.6.5-7.191-s390x
Chapter 20. IBM eServer zSeries and IBM System z hardware platform specifics
329
Shared libs: lib64/ld-2.3.3.so lib64/libacl.so.1.1.0 lib64/libattr.so.1.1.0 lib64/libblkid.so.1.0 lib64/libc.so.6 lib64/libdevmapper.so.1.01 lib64/libdl.so.2 lib64/libpthread.so.0 lib64/librt.so.1 lib64/libselinux.so.1 lib64/libuuid.so.1.2 Modules: kernel/fs/jbd/jbd.ko kernel/fs/ext3/ext3.ko kernel/drivers/md/dm-mod.ko kernel/drivers/md/dm-snapshot.ko kernel/drivers/s390/block/dasd_mod.ko kernel/drivers/s390/block/dasd_eckd_mod.ko DASDs: 0.0.0200(ECKD) 0.0.0201(ECKD) 0.0.0202(ECKD) 0.0.0203(ECKD) 0.0.0204(ECKD) 0.0.0500(ECKD) Including: udev dm/lvm2 initrd updated, zipl needs to update the IPL record before IPL!
linux041:~ # zipl -V Using config file '/etc/zipl.conf' Target device information Device..........................: 5e:00 Partition.......................: 5e:01 Device name.....................: dasda DASD device number..............: 0200 Type............................: disk partition Disk layout.....................: ECKD/compatible disk layout Geometry - heads................: 15 Geometry - sectors..............: 12 Geometry - cylinders............: 3338 Geometry - start................: 24 File system block size..........: 4096 Physical block size.............: 4096 Device size in physical blocks..: 22476 Building bootmap in '/boot/zipl' Adding IPL section 'ipl' (default) kernel image......: /boot/image at 0x10000 kernel parmline...: 'root=/dev/system/sysvol selinux=0 TERM=dumb elevator=cfq' at 0x1000 initial ramdisk...: /boot/initrd at 0x800000 Preparing boot device: dasda (0200). Syncing disks... Done.
6. After rebooting the Linux guest, our new DASD device became available at /dev/dasdf.
330
Chapter 20. IBM eServer zSeries and IBM System z hardware platform specifics
331
What's new in Performance Toolkit for VM in Version 5.1.0, gm130637.pdf, provides a high-level overview of setting up and using the Performance Toolkit for VM and RMF PM.
332
Linux on IBM Eserver zSeries and S/390: Performance Measurement and Tuning, SG24-6926 Implementing Linux on IBM Eserver zSeries and S/390: Best Practices
http://www.ibm.com/servers/eserver/zseries/library/whitepapers/pdf/gm130647.pdf
Chapter 20. IBM eServer zSeries and IBM System z hardware platform specifics
333
Configure the CP scheduler. Tune DASD: Use more, smaller disks and appropriate stripe sizes. Reduce channel subsystem contention. Configure minidisk caching (for some workloads). Tune network: Virtual LAN or direct attachment to OSA adapter.
334
V5.1 includes high-level Linux reports based on application monitor records from Linux guests. The Performance Toolkit for VM processes Linux performance data obtained from the Resource Management Facility (RMF) Linux performance gatherer, rmfpms. Performance monitor data can be viewed from Web browsers or PC-based 3270 emulator graphics. For information concerning the rmfpms application and the Performance Toolkit for VM, see:
http://www.ibm.com/servers/eserver/zseries/zos/rmf/rmfhtmls/pmweb/pmlin.html http://www.vm.ibm.com/related/perfkit/
Chapter 20. IBM eServer zSeries and IBM System z hardware platform specifics
335
If the cpint package is installed, the #cp and hcp commands are available. Table 20-2 does not list the commands because the cpint package is not included in the default distribution.
Table 20-2 S/390 and zSeries-specific commands Task Send CP commands to the controlling VM from a 3270 session. The command prefix depends on your 3270 emulator settings. Modify generic attributes of channel attached devices. Read files from CMS volumes. Check a CMS formatted volume. Copy files from CMS volumes to Linux on S/390 file systems. List files on CMS formatted volumes. Report CMS formatted volume status. chccwdev cmsfscat cmsfsck cmsfscp cmsfslst cmsfsvol RHEL SLES #cp $cp
chccwdev
336
Task Format disk drive. Display DASD and VTOC information. Create output similar to siga and sysreport (which are also available). Write a partition table to a DASD in the form of a VTOC (volume table of contents). Send CP commands to the controlling VM from a Telnet session. List channel subsystem devices. List channel attached direct access storage devices (DASD). List all qeth-based network devices with their corresponding settings. List channel-attached tape devices. Prepare a device for use as S/390 dump device. Get MAC and IP addresses from OSA and HiperSockets. Flush the ARP table. Configure IBM QETH function IPA, VIPA, and Proxy ARP. Create a 32-bit S/390 environment on S/390x. Create a 64-bit S/390 environment on S/390x. Display messages on a zSeries tape device. Adjust tunable parameters on DASD devices. Convert VMDUMPs into lkcd dumps. Copy dumps. Boot loader for S/390 and zSeries architectures.
fdasd
fdasd hcp
qetharp qethconf
tape390_display tunedasd
zgetdump zipl
zgetdump zipl
Chapter 20. IBM eServer zSeries and IBM System z hardware platform specifics
337
20.9.1 Hardware HA
The mean time between failures (MTBF) on mainframe hardware is now measured in decades, and all mainframes are shipped with at least one hot spare processor that can be instantaneously substituted for a failing CPU. The mainframe hardware is able to detect CPU errors and transparently switch to another processor for continuous operation (CPU sparing). This function is transparent to the operating system. The zSeries memory is also self-checking and self-repairing, as is the I/O subsystem. Practically speaking, in the vast majority of cases, the only way a hardware failure can occur that will disrupt the entire environment is if the power supply to the mainframe CEC is somehow interrupted, or if all of the physical cable paths (I/O, network, or both) leading into the Linux LPAR or guest were cut. An additional hardware exposure to the mainframe environment occurs when a disruptive maintenance microcode patch has to be applied. In this case, the entire machine must be brought down. This type of maintenance is relatively rare, but does occur. In the event of a failure such as those just described, you need a backup mainframe with a similar configuration to provide HA.
20.9.2 z/VM HA
z/VM is designed using address spaces, memory protection, and fault-tolerant code. In an HA environment, z/VM can be configured to run in another LPAR: As a hot-standby, IPLed with backup guests but no work being processed. Cold-standby, defined but not IPLed.
338
In a parallel processing configuration for high availability. IPLed with some guests active and processing work, and with some non-IPLed guests defined to serve as a warm standby for other operational z/VM systems.
Error recovery
The zSeries microcode and z/VM try to recover most errors, including such things as intermittent and permanent machine errors and system I/O errors, without manual intervention. When an error occurs, CP records it and sends a message to your z/VM primary system console. If the error condition does not damage system integrity and can be assigned to a single guest, z/VM makes a soft abend of the guest and operation continues. This means that in almost all cases a crash of a guest system does not affect CP operation, and other guests can operate without disruption.
Network HA
A critical component that might be overlooked when designing connectivity in a large-scale Linux installation is the z/VM TCP/IP stack itself. There can be many times when, as a result of misconfiguration or failure in a Linux system, you cannot get access through the network to a Linux guest. On these occasions, being able to obtain a connection through z/VM TCP/IP to the Linux console lets us do enough to get network connectivity again, log on, and fix the problem. Being able to get reliable access to the z/VM TCP/IP stack is, therefore, very important. The z/VM TCP/IP stack supports the VIPA function. We suggest that you look at using multiple interfaces to the z/VM stack, and use VIPA to address z/VM. The IBM Redbook Linux on IBM Eserver zSeries and S/390: ISP/ASP Solutions, SG24-6299, discusses a method of using multiple attachments in combination with a virtual IP address configured on a dummy interface. This still can form the basis of a high availability connectivity solution. As an alternative to using a dummy interface, you can configure additional addresses against the IP loopback interface (lo). This means you do not need to have another module installed. The way that the Linux kernel processes incoming IP traffic does not require the virtual IP address to be associated with a dummy or loopback interface. Your virtual address can be just as easily defined against one of your real interfaces.
Chapter 20. IBM eServer zSeries and IBM System z hardware platform specifics
339
logs on (starts) user AUTOLOG1. AUTOLOG1 can automatically start other virtual machines when issuing the AUTOLOG command in the PROFILE EXEC of AUTOLOG1. If a certain start order is necessary due to application dependencies, you can implement a startup procedure for the guest systems. This startup procedure is called within the PROFILE EXEC of user AUTOLOG1. The procedure is written in the script language REXX.
20.9.4 Linux-HA
Linux high availability functions specific to the zSeries platform include the Linux Virtual Server and the Heartbeat option.
340
The backup strategy that is least used currently, but is growing the fastest, is to use tools that run on Linux to back up Linux volumes and files. The most attractive argument for this option is that these backup tools provide easy access to both file-level and volume-level backups.
20.10 Security
Linux running in native mode in an LPAR can only rely on the security measures provided by the Linux distribution. Linux running as a z/VM guest, however, has access to several additional security features provided by the mainframe hardware and z/VM or z/OS: Consider HiperSockets, guest LANs, and virtual switches. These networking options are implemented either in memory or directly through the host systems network adapters. Network communication between operating systems running on the mainframe never need to leave the mainframe. That means there is nothing on the physical network to be sniffed or captured by other programs. The security provided by LPAR isolation is certified by Evaluation Assurance Levels (EAL) 5 Common Criteria. Linux can access zSeries specialized cryptographic hardware. Each z/VM guest has its own user ID and password. Each guests runs in its own virtual address space and cannot access another guests memory. Linux guests can use z/OS LDAP and RACF facilities for authentication. The following publications describe the concepts and techniques for implementing these interfaces between Linux, z/VM, and zSeries hardware: Linux on IBM zSeries and S/390: Securing Linux for zSeries with a Central z/OS LDAP Server (RACF), REDP-0221 Linux on IBM Eserver zSeries and S/390: Best Security Practices, SG24-7023 For documentation concerning z/VM security and integrity resources such as the z/VM Common Criteria, refer to:
http://www.vm.ibm.com/security
This Web site also provides links to more information about zSeries, z/VM, and Linux security features. The standard Linux system administration facilities such as PAM, OpenSSL, OpenSSH, and OpenLDAP are available, too. Linux guests can secure communications using scp, sftp, and iptables. User authentication can be
Chapter 20. IBM eServer zSeries and IBM System z hardware platform specifics
341
through /etc/passwd, Kerberos and sudo. Linux security is Linux security, even on the mainframe.
20.11 References
For more information, refer to the following publications: Linux on IBM zSeries and S/390: Server Consolidation with Linux for zSeries, REDP-0222 z/VM and Linux on zSeries: From LPAR to Virtual Servers in Two Days, SG24-6695 Linux for S/390, SG24-4987 Linux on IBM Eserver zSeries and S/390: Large Scale Linux Deployment, SG24-6824 Linux on IBM zSeries and S/390: High Availability for z/VM and Linux, REDP-0220 Linux on IBM Eserver zSeries and S/390: Building SuSE SLES8 Systems under z/VM, REDP-3687 Printing with Linux on zSeries Using CUPS and Samba, REDP-3864 Linux with zSeries and ESS: Essentials, SG24-7025 IBM System z9 and Eserver zSeries Connectivity Handbook, SG24-5444 Linux on IBM Eserver zSeries and S/390: Best Security Practices, SG24-7023 Accounting and Monitoring for z/VM Linux guest machines, REDP-3818 Linux on IBM Eserver zSeries and S/390: Performance Measurement and Tuning, SG24-6926 Linux on IBM zSeries and S/390: Securing Linux for zSeries with a Central z/OS LDAP Server (RACF), REDP-0221 Linux on IBM Eserver zSeries and S/390: Best Security Practices, SG24-7023 Linux for IBM System z9 and zSeries, SG24-6694 Networking Overview for Linux on zSeries, REDP-3901 IBM Eserver zSeries 900 Technical Guide, SG24-5975 IBM Eserver zSeries 890 Technical Introduction, SG24-6310 Technical Introduction: IBM Eserver zSeries 800, SG24-6515 IBM Eserver zSeries 990 Technical Guide, SG24-6947 IBM System z9 109 Technical Guide, SG24-7124 What's new in Performance Toolkit for VM in Version 5.1.0
http://www.vm.ibm.com/library/gm130637.pdf
342
Part 4
Part
Appendixes
Appendix A, Tasks reference on page 345 provides quick reference tables that present methods for accomplishing equivalent tasks between Solaris and Linux. Appendix B, Commands and configuration files reference on page 365 provides quick reference tables for the comparison of configuration files, comparable commands, and common commands. Appendix C, UNIX to Linux Porting: A Comprehensive Reference (table of contents and sample chapter) on page 371 provides sample content from a related publication: Mendoza, et al., UNIX to Linux Porting: A Comprehensive Reference, Prentice Hall, 2006, ISBN 0131871099. Appendix D, Example: System information gathering script on page 397 provides a description of the getsysinfo sample diagnostic scripts, used to gather detailed system configuration information. Appendix E, Additional material on page 401 provides information about how to access the additional material provided with this IBM Redbook, available on the Internet.
343
344
Appendix A.
Tasks reference
This appendix contrasts common tasks between the Solaris and Linux operating systems. Tasks are grouped according to the following major categories. Each major category is contained within a table. Tables can also include file location information or pertinent information that is related to the category they contain. This reference provides information about Linux and Solaris in the following categories: Packaging Installing and upgrading tasks Booting and shutting down User management tasks Device management and configuration Network management and configuration Managing system resources Printer management and configuration Disk and file system management Logical volume management Network troubleshooting
345
Packaging
Table A-1 provides information that shows differences in Linux and Solaris packaging-related tasks.
Table A-1 Packaging comparison Units Smallest installable unit. Single installable image; must be distributed and installed as a unit. Logical grouping of packages. Logical grouping of packages and software clusters. Solaris Package Patch Package Software cluster Patch cluster Software configuration clusters, for example: Core: Required operating system files End-User System Support: Core plus window environment Developer System Support: End-User plus the development environment Entire Distribution: Developer System plus enhanced features Entire Distribution Plus OEM: Entire Distribution plus third-party hardware drivers (on SPARC only) Linux Package Package Package Workstation install (stand-alone client) Developer install (above, including developer tools, compiler) Server install (server services and software) Full Install (all software/services) Custom (choose packages manually)
346
Task Display installed packages Remove software package Upgrade/install a package Verify correct installation Install a patch List content of installed package Check which file belongs a package Check package information Remove a patch Display installed patches Install OS on another disk (alternate disk installation) Create an installation server for network installation Create a boot server for network installation Set up a client for network installation
Solaris pkginfo or pkgparam pkgrm pkgadd pkgchk patchadd Look in /var/sadm/install/ contents Look in /var/sadm/install/ contents Look in /var/sadm/pkg/ PKGNAME/pkginfo patchrm showrev -p Live Upgrade
Red Hat
rpm -qf
rpm -qi N/A N/A Install different OS on different disk/partition, dual boot using GRUB anaconda (see http://www.tldp.org/H OWTO/Network-InstallHOWTO.html) grub (see http://www.tldp.org/H OWTO/Clone-HOWTO/) anaconda (see http://www.tldp.org/H OWTO/Network-InstallHOWTO.html) autoyast (see http://www.tldp.org/H OWTO/Network-InstallHOWTO.html) grub (see http://www.tldp.org/H OWTO/Clone-HOWTO/) autoyast (see http://www.tldp.org/H OWTO/Network-InstallHOWTO.html)
setup_install_server install_dir_path
347
/kernel - Contains common components. /platform/platform-name/kernel - Contains the platform-specific kernel components. /platform/hardware-class-name/ke rnel - Contains kernel components specific to this hardware class. /usr/kernel - Contains kernel components common to all platform within a particular CPU set.
348
Solaris In each of the subdirectories mentioned in the proceeding cell, they might contain the following subdirectories: drv - Contains loadable device drivers. exec - Contains modules that run programs stored in different file formats. fs - Contains file system modules. misc - Contains miscellaneous system-related modules. sched - Contains operating system schedulers. strmod - Contains loadable System V STREAMS modules. sys - Contains loadable system calls. cpu - Contains CPU type-specific modules. tod - Contains time-of-day hardware modules. sparcv9 - Contains 64-bit versions of specific modules.
System run levels Run level S or s Single user level (boot -s). Only some file systems are mounted as opposed to run level 1. Shuts down the operating system. Does not attempt to turn off the power. Returns to OpenPROM ok prompt. Administrative single user mode. Can access all available file systems. User logins disabled. Multiuser without NFS resources shared. Minimal single user mode on SUSE. In Red Hat, it is same as initlevel 1. Power-down state, shuts down the operating system and tries to turn power off if supported by the system. Equivalent to Solaris run level 5. Single user mode.
Run level 0
Run level 1
Run level 2
349
Solaris Multiuser with NFS resources shared (default run level for Solaris). The login is text or graphical depending on the console capabilities. N/A (alternate multiuser). Power-down state, shuts down the operating system and tries to turn power off if supported by the system. Reboot. N/A who -r telinit run-level-number init run-level-number /sbin/rc run-level-number
N/A (alternate multiuser). Full multiuser, NFS resources shared, and graphic login with X display manager. Reboot. Same as in Solaris. Ignore the /etc/inittab file and launch the default shell. who -r runlevel telinit run-level-number init run-level-number In RHEL: /etc/rc.d/rc run-level-number In SLES: /etc/init.d/rc run-level-number grub cat /boot/grub/menu.lst BIOS
Run level 6 Emergency run level Determine a system's run level Change a system's run level Startup script
Use new kernel Display boot loader information Display or alter the list of boot devices Boot methods Default boot mode
boot or if auto-boot is set to true, it is automatic. Note: The commands listed in this column is assumed that you are at the OpenPROM prompt.
Automatic or press Enter at grub prompt. Note: The commands listed in this column assume that you are at the GRUB prompt. Add -s, single, S, or 1 at the end of boot line. Not needed.
boot -s boot -r
350
Solaris boot -v
Linux In RHEL, remove rhgb quiet from the boot command line; in SLES, press Esc when booting. Edit grub boot line to specify other kernel and options. Boot from a rescue CD-ROM or from network. Possible but vendor dependent.
Interactive boot mode Recovery boot mode Interactive start of services while booting Emergency boot mode Shutdown and reboot Shutdown
Add emergency or -b option at the end of boot line. reboot shutdown -r now halt poweroff shutdown
351
Task/locations Process resource limits for users System-wide environment file Configuration information for user authentication Profile templates
Configure a device Define a device Remove a device List devices Install a device driver kernel module List installed device driver kernel modules Remove a device driver kernel module
/dev/MAKEDEV hwinfo mknod hwinfo /dev/MAKEDEV ls /sys/devices cat /proc/devices insmod lsmod rmmod
352
Display interface settings Display interface status and statistics Configure interface Check various network statistics Change resolver Configure name services Display kernel network parameters Configure kernel network parameters Check for network link Rename a network interface Check routing table Testing for connectivity Check IP path
ip ifconfig netstat -i ifconfig ip ifconfig netstat vi /etc/resolv.conf vi /etc/nsswitch.conf sysctl -a | grep ^net sysctl -w variable=value ethtool mii-tool ip netstat -r route ping traceroute
353
Solaris snoop
Mount a resource on a NFS client NFS server general config file NFS logging options config file Share all exported file systems Share a new file system Config file of shared file systems
354
Task List system memory size List disk space usage List file space usage List physical disks Show the systems host name List systems network configuration List active processes List system configuration List system diagnostic information
Solaris prtconf | grep Memory df du format hostname ifconfig prstat prtconf prtdiag
Linux cat /proc/meminfo | grep MemTotal df du fdisk -l hostname ifconfig ps -e Red Hat: lshal SUSE: hwinfo Red Hat: lspci and /proc/* files SUSE: hwinfo
355
Solaris Rename the service start script to a name that does not start with S (typically lowercase s).
Managing quota
Table A-11 provides information that shows differences in Linux and Solaris quota management and configuration tasks.
Table A-11 Quota tasks Task Display disk usage and limits Edit users quotas Check consistency between a file system and the disk quota file Solaris quota edquota quotacheck Linux quota edquota quotacheck
356
357
Table A-15 File system management tasks Task Run multiple tasks in a GUI environment Format a disk Check a file system Mount a file system Display available file system space Partition a disk List a volume's table of contents Format a file system Unmount a file system Back up file systems, files, directories Restore file systems, files, directories Change a file system Display file system information Display file system mount table Solaris N/A format fsck mount df format prtvtoc newfs or mkfs umount ufsdump ufsrestore tunefs cat /etc/vfstab /etc/mtab Linux N/A fdisk fsck mount df fdisk fdisk mkfs umount dump restore RHEL and SLES: resize2ext SLES: resize_reiserfs cat /etc/fstab /etc/mtab
358
Swap management
Table A-16 provides information that shows differences in Linux and Solaris swap management and configuration tasks.
Table A-16 Swap tasks Task Create a swap space Enable a swap space Enable all swap spaces Disable a swap space Disable all swap spaces Delete a swap space Display the swap space usage Display the swap space status Set swap priority level Solaris swap -a swap -a N/A N/A N/A swap -d swap -s swap -l N/A Linux mkswap swapon swapon -a swapoff swapoff -a N/A swapon -s N/A swapon -p
Create a volume or volume group (VG) Enable the volume or volume group
359
Volume management task Disable the volume or volume group Delete the volume or volume group Add a device to the volume or volume group Delete a device from the volume or volume group Create a soft partition or logical volume (no RAID) Create a soft partition or logical volume (RAID 0) Create a soft partition or logical volume on a specific device
Solaris N/A
Linux lvchange -a n LVname vgchange -a n VGname raidstop, mdadm lvremove LVname vgremove VGname lvextend LVname vgextend VGname newdevname lvreduce LVname vgreduce VGname devicename raidreconf lvcreate -Lsize -nLVname VGname lvcreate -iNumOfStripes -IStripeSize -nLVname VGname mdadm, mkraid Same as above, but add the devicename to the end of the command line. lvremove /dev/VGname/LVname raidreconf lvextend -Lsize /dev/VGname/LVname raidreconf Red Hat - ext2/ext3: resize2fs SUSE - ext2: resize2fs Red Hat - reiser: resize_reiserfs Note: View the man pages for unmount requirement, and check if online version is available. ext2: resize2fs lvreduce reiser: resize_reiserfs lvreduce Note: View the man pages for unmount requirements.
metainit -p metainit with RAID 0 on devices first, and then metainit -p to create the soft partition volume. Same as above, but the second metainit -p will have the devicename at the end of the command line. metaclear metattach volume [size or devicename] growfs
Delete a soft partition or logical volume Extend a volume or logical volume Extend a file system after volume has been grown
360
Table A-18 Volume management commands Volume management task Set up or display metadb Display metadevice status Initialize raw devices to metadevices Attach metadevices Detach metadevices Clear and remove metadevices Replace a metadevice Rename a volume Check metadevice ID configuration Manage hot spares Set submirrors offline Set submirrors online Change volume parameters Back up volume group metadata Recover soft partition configuration information Set up root file system for mirroring Administer disk sets for sharing Resynchronize volume during reboot Expand a file system size Start up the kernel metadevice modules Set the default number of available volumes Solaris metadb metastat metainit metattach metadetach metaclear metareplace metarename metadevadm metahs metaoffline metaonline metaparam N/A metarecover metaroot metaset metasync growfs /etc/system /kernel/drv/md.conf Linux vgdisplay, lvdisplay, lsraid vgdisplay, lvdisplay cat /proc/mdstat pvcreate vgchange, lvchange vgchange, lvchange vgremove, lvremove raidreconf raidreconf mdadm mdadm, raidhotadd, raidhotremove mdadm mdadm vgchange, lvchange vgcfgbackup vgcfgrestore N/A N/A N/A vgextend, lvextend, resize2fs, resize_reiserfs, raidreconf N/A /etc/sysconfig/lvm /etc/raidtab
361
General troubleshooting
Table A-19 provides general troubleshooting information highlighting differences between methods and configuration file locations between Solaris and Linux (RHEL, SLES).
Table A-19 General troubleshooting Task/location Change a host name Solaris Minimum change required for the following files: /etc/nodename /etc/hosts /etc/hostname.* /etc/net/*/hosts /etc/services Red Hat hostname (while running) or edit /etc/sysconfig/network (for permanent change after network restart) SUSE /etc/HOSTNAME and /etc/hosts
List of well-known networking services and port numbers List of well-known protocols Display NFS and RPC statistics Display a snapshot of virtual memory Display virtual memory statistics Display I/O statistics Report system activity Display simple and complex lock contention information Report CPU usage Display system error log Display paging/swapping space Disk crash dump utilities
/etc/services
/etc/protocols nfsstat cat /proc/meminfo vmstat iostat sar View /var/lock directory
362
Task/location Disk crash config files Network crash dump utilities Network crash config files Crash analyzing tools Crash dump default store directory Specify users who have access to cron (every user has access to cron if the access file does not exist.) Specify users who have no access to cron Specify remote users and hosts that can execute commands on the local host Default superuser log Configure syslogd logging Display physical RAM Start or stop scripts directory Devices directory
Red Hat /etc/sysconfig/ diskdump /etc/init.d/netdump /etc/init.d/netdump -server /etc/sysconfig/netdump /etc/netdump.conf crash /var/crash
/etc/cron.d/cron.allow
/etc/cron.d/cron.deny /etc/hosts.equiv
/etc/cron.d/cron.deny /etc/hosts.equiv
Network troubleshooting
Table A-20 on page 364 provides network troubleshooting information highlighting differences in methods and configuration file locations between Solaris and Linux (RHEL, SLES).
363
Table A-20 Troubleshooting network problems Tasks Display interface settings Display interface status and statistics Configure interface Check various network statistics Check DNS resolver Check name services config Display kernel network parameters Configure kernel network parameters Check for network link Query DNS Check routing table Check ARP entries Testing for connectivity Check IP path Capturing network packets Solaris ifconfig netstat -i ifconfig netstat more /etc/resolv.conf more /etc/nsswitch.conf ndd /dev/ip (\?)parameter ndd /dev/tcp (\?)parameter ndd -set driver parameter ndd driver link_status nslookup dig netstat -r arp -a ping traceroute snoop Linux ip ifconfig netstat -i ifconfig ip ifconfig netstat more /etc/resolv.conf more /etc/nsswitch.conf sysctl -a | grep ^net sysctl -w variable=value ethtool mii-tool nslookup dig netstat -r route arp ping traceroute tcpdump tethereal ethereal
364
Appendix B.
365
/etc/exports /etc/vsftpd.ftpusers(vsftpd) /etc/ftpusers (wu-ftpd) /etc/hosts, /etc/HOSTNAME, /etc/sysconfig/network (directory) /etc/services /etc/xinetd.conf, /etc/xinetd.d (directory) /etc/krb5.conf N/A /etc/logindevperm /etc/mime.types /etc/mtab /etc/nscd.conf /etc/pam.d (directory) /etc/cups/printers.conf Different format (see Chapter 10, Printing services on page 151). Cache names different. Different format. See Chapter 12, Monitoring and performance on page 173. Different formats. Different format.
/etc/inet/services /etc/inetd.conf /etc/krb5/krb5.conf /etc/logadm.conf /etc/logindevperm /etc/mime.types /etc/mnttab /etc/nscd.conf /etc/pam.conf /etc/printers.conf
366
Solaris /etc/rmmount.conf /etc/security/policy.conf /etc/syslog.conf /etc/system /etc/vfstab /etc/vold.conf /usr/share/lib/zoneinfo/* /var/adm/messages, /var/log/syslog
Linux N/A N/A /etc/syslog.conf /etc/sysctl.conf /etc/fstab N/A /usr/share/zoneinfo/* /var/log/messages, /var/log/syslog, /usr/adm/messages, /var/log/maillog /etc/crontab, /var/spool/cron
Comments See Chapter 6, Device management on page 85. See Chapter 11, Users and groups on page 159. Slightly different format.
/var/spool/cron/crontabs/root
Comparable commands
Table B-2 provides a quick reference for comparable commands between Solaris and Linux.
Table B-2 Comparable commands Solaris /sbin/swapadd adb admintool apptrace arch -k cc devfsadm Linux /sbin/swapon gdb yast2 (SUSE) /usr/bin/system-* (Red Hat) strace and ltrace uname -m gcc modprobe, kerneld, insmod, hotplug, cardctl Usage Enable swap devices Debugger Admin GUI Application API tracing List machine type C compiler Add device without reboot
367
Solaris df -k getfacl, setfacl gzcat file | tar -xvf lpsched modinfo mountall mvdir nawk patchadd patchrm, pkgrm pkgadd pkgchk pkginfo, pkgparam priocntl -e, nice priocntl -s, renice prstat prtdiag prtvtoc ps -ef snoop tip truss, sotruss umountall useradd who -r
Linux df getfacl, setfacl tar -xzvf file lpd lsmod modinfo mount -a mv gawk rpm -U rpm -e rpm -i rpm -V rpm -qa nice renice top dmesg fdisk -l ps [-]aux tcpdump, ethereal minicom strace, ltrace umount -a adduser /sbin/runlevel
Usage File system allocation in units of kilobytes Get, set ACLs Unbundle compressed TAR file Printer daemon List loaded kernel modules Mount all entries in fstab Move a directory Awk scripting language Update package Remove package Add package Verify package Query packages Start a process with a given priority Change the priority of a running process Report process statistics Error reporting tool Read disk label List all system processes Network packets sniffer Serial port access program Tracing Unmount entries in mtab Add a user account Show run level
368
Solaris xterm/dtterm
Linux konsole/gnome-terminal
369
localedef lp mail mknod mt nice paste ping pushd read rm script sftp split strace sync time trap typeset unexpand users whatis xargs ypwhich
logger lpq man mktemp mv nl patch pkill pwd readonly rmdir sdiff sh ssh strings syslogd timeout troff ul uniq vi whereis yacc zcat
login lpr mesg modinfo neqn nroff pathchk popd quota red rpcinfo sed shift ssh-add sty tar times true ulimit units view which ypcat zipinfo
logname lprm mkdir more netstat nslookup pax printenv ranlib renice rsh select sleep ssh-agent su tbl touch tset umask unlink vmstat whoami ypinit
logout lpstat mkfifo mount newgrp nsupdate perl profiles rcp return rup set sort sshd sum tee tput tsort umount unset wall whois ypmatch
look ls mkisofs mpstat nfsstat passwd pgrep ps rdist rlogin scp setfacl source ssh-keygen suspend tic tr tty uname uptime wc write yppasswd
370
Appendix C.
UNIX to Linux Porting: A Comprehensive Reference (table of contents and sample chapter)
This appendix contains the Table of Contents and Chapter below, excerpted from UNIX to Linux Porting: A Comprehensive Reference (ISBN 0131871099), reprinted courtesy of Pearson Education , Inc., Pearson Education, Inc., 2006. We provide this content to provide you with some technical perspective on the subject of application porting. Porting of applications and programs from the Solaris operating system platform to Linux is a broad technical topic that is outside the scope of this book. Nonetheless, completing required porting tasks will be a key part of any successful migration project. We are pleased to provide you with this introductory content about the subject of porting. The sample content is presented in this appendix in two parts: Table of contents Chapter 1 Porting Project Considerations
371
Note: If you are interested in obtaining a copy of UNIX to Linux Porting: A Comprehensive Reference, you can receive a 35% discount on the publisher price by using the following URL and coupon code to order:
http://www.prenhallprofessional.com/mendoza
Table of contents
UNIX to Linux Porting: A Comprehensive Reference (ISBN 0131871099)
Authors:
Alfredo Mendoza Chakarat Skawratananond Artis Walker
Preface Chapter 1: Porting Project Considerations Chapter 2: Scoping Chapter 3: Analysis Chapter 4: Porting Solaris applications Chapter 5: Porting AIX applications Chapter 6: Porting HP-UX applications Chapter 7: Testing and Debugging Appendix A: Solaris to Linux Reference Tables Appendix B: AIX to Linux Reference Tables Appendix C: HP-UX to Linux Reference Tables Appendix D: Linux on POWER Appendix E: gprof helper
372
Appendix C. UNIX to Linux Porting: A Comprehensive Reference (table of contents and sample chapter)
performance tools, third-party applications needed by the application to be ported, and performance tools. Customer support. Within the customer support organization, support personnel must be trained on Linux system administration, third-party applications needed by the ported application, installation and administration procedures, package maintenance options in the Linux environment, debugging tools and procedures, and anything else that needs to be learned to provide customer support for the ported application. Software application distribution. Within the software application distribution organization, sales and consultants must be trained in overall Linux features and capabilities.1 Personnel in the software distribution channels must be trained as trainers of the software application in a Linux environment. From a customer's perspective, they will also look for integration skills to integrate Linux within their IT infrastructure. Porting an application to Linux means modifying business organization processes that can be affected by a newly ported application. The three main areas should be considered and included in the overall project plan before starting the porting process.
Different Linux distributions exist that may require separate training sessions for each.
374
Scoping
Scoping is the step in which the project manager asks the porting expert2 and a domain expert3 to get together to identify the products, development, and test environment the application to be ported relies on. The key areas to identify during the scoping process include product dependencies, development environment components, build environment components, and test environment components: Product/software dependencies. Identifying which products the application to be ported relies on means determining which versions of database, middleware, and third-party libraries it uses. By knowing the products and versions, the porting expert can assess whether those products and versions are available for the Linux platform. Development environment components. Assessing the development environment includes identifying what programming language the application is written in. Applications written in a more recent programming language such as Java tend to port more easily, whereas applications written in C or C++ usually require more analysis and porting effort. Build environment components. Assessing the build environment includes making sure the build tools are available on Linux. Platform-dependent compiler and link flags used on the source platform must be investigated to determine whether equivalent flags exist on Linux. Some build environments may have dependencies on the source platform that it will require a little more effort to port to Linux. Test environment components. Identifying the test environment for the ported application leads to questions pertaining to the ownership of testing after the application is ported. Usually porting engineers will do unit testing for the part of the application they port and then hand it off to a testing group for more verification and systems tests. But who is the testing group? In most cases, the scoping step leads to identifying associated risks that will be assumed by the project as a whole when it begins. Some risks that can be identified in the scoping step are included in the following scenarios: Versions of the database, middleware, or third-party libraries are not available for the Linux platform. The application has some assembler routines that need to be translated to assembly language instructions on the Linux platform.
2 A software developer who is experienced in porting applications and has knowledge of source and target platforms as well as other third-party products the application uses. We also refer to this person as a porting engineer in this book. 3 A person who is knowledgeable about the application to be ported. This could be the application architect or the chief developer of the application.
Appendix C. UNIX to Linux Porting: A Comprehensive Reference (table of contents and sample chapter)
The application was written using a set of APIs or a programming model unique to the source platform. This also includes assumptions about such things as word size or endian-ness. The application was written to draft-standard C++ semantics that relied on the source platform's native compiler framework. The test environment requires complicated client/server framework. The development environment requires third-party tools that need to be compiled or ported to the Linux platform. The distribution or installation method of the application requires facilities or tools unique to the source platform. Scoping is an involved step in the porting process that takes into account every new piece of information that can be learned from asking the right questionsquestions about documentation, packaging, and performance tuning, to name a few. These and others are mentioned in the sample porting questionnaire at the end of this chapter.
Analysis
There are two views in the analysis step of the porting process: a project management point of view, and a porting point of view. From a project management point of view, analysis is the step that assesses the various porting issues and risks identified in the preceding step and what impact they bring to the porting project as a whole. The analysis step involves the formulation of the project plan, which includes identifying scope and objectives, creating work schedules, procuring resources needed, and assigning roles within the project. Identification of scope and objectives defines the boundaries and responsibilities of the project manager and the members of the project team. Boundaries are clearly identified sets of work that need to be done for the project. For example, a simple statement such as Module A in application XYZ needs to be ported and tested on platform B can be a good start to defining the boundaries of the work. After boundaries have been identified, tasks for the porting work can be defined, leading to a work breakdown schedule.4 The work breakdown schedule helps define which tasks need to be done and whether those tasks can be done in sequence or in parallel. In addition, the work breakdown schedule identifies the resources needed. An overall schedule for the entire porting project results from identifying tasks and resources needed. From a porting point of view, analysis is a step in the porting process during which a porting engineer examines the application architecture in more detail.
4
A project management term used to denote work as an activity arranged in a hierarchical order that has tangible results otherwise referred to as a deliverable.
376
The porting engineer begins to identify the APIs and system calls used in the application. In addition, the application is assessed as to its use of dynamic linking and loading, networking, threads, and more. This analysis feeds information back to the project manager that can be used to formulate more detailed tasks and accurate schedules.
Porting
Porting is the step in the process during which the porting engineers perform their assigned tasks. Depending on the application and the work breakdown schedule that resulted from the preceding step, porting engineers may only be able to work their assigned tasks in a serial fashion. Serial tasks are a product of tightly coupled applications. This means that some modules of the application are highly dependent on other parts of the application and that these modules can be worked on only when the part it depends on is ported. A prime example of this is the build environment. If the build environment was designed to build the whole application as a monolithic procedure, chances are all modules depend on common configuration files that need to be modified before any porting work can be performed. If the porting tasks are independent of each other, however, the work effort can be parallelized. Loosely coupled modules can be worked on separately and simultaneously by different porting engineers. A key example of this are shared libraries that can be built independently of each other, do not have common components, and exist for other modules to build on. Identifying which tasks can be done in parallel is important and should be done as part of the analysis step of the process. The porting engineers' task of compiling the code on the Linux platform includes identifying and removing architectural dependencies and nonstandard practices if possible. Identifying and removing architectural dependencies means heeding compiler errors and warnings produced at compile time and correcting them as needed. Removing architectural dependencies and nonstandard practices involves examining and changing the code to use more portable structures or coding standards. Experienced and quality-conscious porting engineers usually do the latter as they correct compiler errors and warnings. The porting effort includes porting the build environment to the Linux platform, too. This task should be identified during the scoping step. Although some build environments are portable, some are not. Making sure the build environment does not create any potential problems is a task easily overlooked and needs to be scoped and analyzed with extreme caution. After the application has been portedmeaning it compiles on the Linux platform without errorsthe porting engineer is expected to run unit tests on the application. The unit tests can be as simple as executing the application to
Appendix C. UNIX to Linux Porting: A Comprehensive Reference (table of contents and sample chapter)
determine whether it produces any runtime problems. If runtime problems are detected, they are debugged and fixed before the application is handed to the testing group; the test group then runs more thorough tests on the ported software.
Testing
During testing, the assigned testers run the ported application against a set of test cases, which vary from simple execution of the application to stress-type tests that ensure the application is robust enough when run on the Linux platform. Stress testing the application on the target platform is where most porting problems related to architectural dependencies and bad coding practices are uncovered. Most applicationsespecially multithreaded applicationswill behave differently during stress testing on a different platform, in part because of different operating system implementations, especially in the threading area. If problems are found during testing, porting engineers are called in to debug and fix them. Some application porting may also include porting a test harness to test the application. Porting this test harness is a task that is also identified during scoping and analysis. Most of the time, the testers need to be trained on the application before they can test it. Learning about the application is a task that is independent of the porting tasks and can be performed in parallel. If bugs are found, they are fixed and the source recompiled; the testing process repeats until the application passes all testing requirements.
Support
When the port is complete, the development phase ends, and the support phase begins. Some of the porting engineers are retained to help answer any porting-specific questions the customer may have. In addition, the developers are expected to train the customer on configuring and running the application on the Linux platform. The typical support phase lasts from between 60 to 90 days after the portin which time, the porting engineers train and answer technical support and sales personnel questions regarding the newly ported application on the Linux environment. After the technical support and sales personnel have been trained in the newly ported product, the porting engineer's task is done.
378
defined project scope ensures all stakeholders (individuals and organizations involved in or that might be affected by project activitiesproject team, application architect, testing, customer or sponsor, contracts, finance, procurement, contracts and legal) share a common view of what is included as the objectives of the project. Clear project objectives/requirements lead to a better understanding of the scope of the project. During the analysis step in the porting process, customer objectives and requirements are gathered, and these objectives transform themselves to work breakdown structures and eventually project deliverables. Project objectives and requirements provide a starting point for defining the scope of the project. After all project objectives have been laid out, the project scope becomes more defined. One way to define the scope of a project is to list objectives that will and will not be included in the project. A requirements list from the customer is a good start. After the requirements have been gathered, the project manager and the technical leader review the list in detail. If there are questions about the requirements list, they should appear in the not to be included list of objectives, at least initially. The list is then reviewed by the customer, who may make corrections to the list. The list is revised until all parties agree that the requirements list presents the true objectives of the project. Again, it should be sufficiently detailed so that it lists requirements that will and will not be included in the project. Yes, it is really that important to include details that are beyond the scope of the project. Objectives that do not provide enough definition to the scope of the project may turn out to be a point of contention as the project draws closer to its release date. An example of this might be listing how pieces of the porting work will be delivered to the porting teamwill it be in phases or will it be in a single delivery? Will each delivery be considered a phase, or will there be smaller pieces of work within a phase? How many phases will make up the entire project? The list not only defines the project itself, it also sets the expectations for all stakeholders in the project. Here are the basic rules to follow when creating the project objectives list: 1. Define project scopes with as much detail as possible. 2. Confirm that all stakeholders agree to project scopes. 3. List unresolved items on the not-included/not-in-scope list until they are resolved. Table C-1 on page 380 shows an example of a simple in-scope and not-in-scope table for a sample porting project.
Appendix C. UNIX to Linux Porting: A Comprehensive Reference (table of contents and sample chapter)
Table C-1 In-Scope and Not-in-Scope Objectives Project: Customer X Application Port to Linux In Scope Port Directory, Mail, and Order Entry modules to Linux to be divided up in three phases. Each module will be one phase. Functional verification tests on these modules will be conducted by porting team. Definition of functional verification tests and acceptance criteria will be defined in another section. Provide debugging assistance to customer developers during system verification tests. Not in Scope System tests of in-scope modules are not included in the porting project. Customer will be responsible for systems test. Packaging of application is not in scope. Fixing bugs found to be present in the original source code are not in scope. External customer documentation of ported modules is not in scope. Customer to produce external customer documentations.
Part of defining the objectives is listing the acceptance or success criteria. A consensus regarding the porting project success criteria must be reached by all stakeholders. Project success may mean passing a percentage of system tests on the Linux platform or passing a level of performance criteria set out by the systems performance groupthat is, if the project objectives are to run a specific set of tests or performance analysis, respectively. Regardless of how the project success is defined, all stakeholders must understand and agree on the criteria before the porting effort starts, if possible. Any changes to the criteria during the course of the porting cycle must be communicated to all stakeholders and approved before replacing the existing criteria.
Estimating
Many porting projects go over budget and miss schedules because risks were not managed properly. Risks play a major part in estimating the schedule as well as resources needed for porting projects. In an application porting project, such risks will come from different aspects that relate to application porting, including the following: Skill levels and porting experience Compiler used Programming language used Third-party and middleware product availability Build environment and tools Platform-dependent constructs
380
Platform- and hardware-dependent code Test environment setup needed User interface requirements Depending on the application to be ported, each of these aspects will present varying levels of complexity and risks to the project. Assessing complexity and risk level help you determine whether they are manageable.
Compiler
The compiler and compiler framework used by the source platform makes a big difference when porting applications to the Linux environment. If the compiler used in both the source and target platforms are the same, the task becomes easier. An example in this case is when the GNU compiler is used in both the source and the target platform. Besides the --g and --c flags, different brand of compilers use flags differently. Compiler differences become more difficult if the programming language used is C++. Another thing to consider is the version of the compilers. Source code compiled a few years back with older versions of compilers may have syntax that does not conform to present syntax checking by compilers (because of standards conformity). This makes it more difficult to port on different compilers because these compilers may or may not support backward compatibility for standards.
Appendix C. UNIX to Linux Porting: A Comprehensive Reference (table of contents and sample chapter)
Even if the compilers support older standards, different compilers may implement support for these standards differently.
382
platforms is syntax that gmake can understand or has an easy equivalent to. Architecting applications around the gmake6 facility is the most accepted and widely used method in build environments today. Source code control is another aspect that must be considered. In the Linux environment, CVS is the most frequently used source code control environment. Other source code control environments are Subversion7 and Arch.8 A porting project needs to have source code control if there is a possibility of several porting engineers working on the same modules at the same time.
Platform-Dependent Constructs
When porting from UNIX platforms based on RISC architecture to x86-based platforms, a chance exists that application code needs to be assessed for byte-endian dependencies. For example, the application implements functions that use byte swapping for calculations or data manipulation purposes. Porting the code that uses byte-swapping logic to an Intel-based machine, which is little-endian architecture, requires that code be modified to adhere to little-endian semantics. In cases where byte-swapping logic is not changed between platforms, debugging becomes a chore because it is difficult to track where data corruption takes place when it happens several instructions before the application fails. Make sure to identify platform-dependent constructs in the scoping and analysis steps.
Some may favor Autoconf even though it may add some level of complexity compared to using just plain old Makefiles. 7 http://subversion.tigris.org 8 http://www.gnu.org/software/gnu-arch/
Appendix C. UNIX to Linux Porting: A Comprehensive Reference (table of contents and sample chapter)
Testing may also include performance testing. Normally, performance tests require the maximum configuration setup one can afford to be able to load up the application to see how it scales in big installations. Porting of the application test harness needs to be included in the porting schedule. A test harnesses that includes both software tests and specialized hardware configurations need to be assessed as to how much time it will take to port and configure.
384
High Complexity Use of noncommon build tools such as imake, multiple pass builds, on-the-fly-generated code modules Extensive use of kernel extensions and device driver code
Platform/hardwaredependent code comes from third-party products already ported to target platform Client/server setup
Stand-alone
Networked, high availability, clustered Needs external peripherals to test such as printers, Fibre Channel-attached disks
User interface
Java based
Experience shows that real efforts needed to port the application are uncovered during the first two or three weeks of the porting project. This is the time when the code is delivered to the project team and porting engineers get a first glimpse of the software application. In other cases, this will be the first time porting engineers will work on the application in a Linux environment. They begin to dissect the application components and start preliminary build environment setups. Within the first two to three weeks, the porting engineers will have configured the build environment and started compiling some modules using GNU-based tools and compilers. After two to three weeks, it is good to revisit the estimated time schedules to determine whether they need to be adjusted based on preliminary real experiences of porting the application into the Linux platform.
Appendix C. UNIX to Linux Porting: A Comprehensive Reference (table of contents and sample chapter)
resource availability, hardware availability, third-party support, and Linux experience need to be considered. On the business side, issues such as reorganizations, relocations (moving offices), customer release dates, and business objective changes may affect the porting schedule as a whole. These technical and business issues will create several dependencies external to the porting project that may not be controlled; therefore, it is advisable to consider each external issue to mitigate risks accordingly. Creating schedules for porting projects is just like creating schedules for software development projects. Figure C-2 is an adaptation of a diagram from Radical Project Management by Rob Thomsett (Prentice Hall, 2002, p. 191). The figure shows that the average estimation error made before the project scopes and objectives are cleared up is +400 percent and 400 percent. As the objectives, scope, risks, and other technical and business issues are clarified, the estimated porting schedule comes closer to the real schedule.
+400%
Scoping
Analysis
Porting
Testing
Estimation Point #1
Figure C-2 Average estimation error made before scopes and objectives are cleared
Each transition to the next step in the porting process allows the project team to reassess the project estimates in terms of the schedule and resources. In essence, these transitions can and should serve not only as milestones for the project but also as checkpoints to reexamine the original estimates.
386
Appendix C. UNIX to Linux Porting: A Comprehensive Reference (table of contents and sample chapter)
Platform-Specific Information
1. What is your current development platform for the application? The question is about the development platform used to develop the application. It does not assume that the development platform is the same platform the application is deployed on. This is asked in the next question. 2. What platform does the application currently run on? Porting engineers need to know the source or reference platform the application to be ported is using. 3. Has this application been deployed on any other platform than the development one? If yes, which version of the platform is it running on? Asking this question gives you a sense of the portability of the application if it has been ported to other platforms. A word of caution: Although an application may have been ported to other platforms, it may have been done on older versions of the platform. 4. Describe any hardware (that is, graphics adapters, or cards) used by your application and whether the required drivers are available on the Linux platform. Make sure any platform dependencies are available on Linux.
Application-Specific Information
1. Please describe your application and its architecture in detail. This is where the customer describes the application architecture. Have them include an architectural diagram if possible. All components in the application need to be described. This should also give you what type of application framework, if any, the application runs on. Most Java applications run on product-specific frameworks such as WebSphere or Weblogic. If they are written in C++, they may run on a CORBA framework, which means you may have to deal with a specific CORBA framework that may or may not exist on Linux. 2. What are the different components of your software? Please provide name and version numbers for each component. This will give you a sense of the breakdown of their applications. Being able to break down the application into different discrete components can mean that the porting work can be broken down into smaller independent tasks.
388
3. Which of these pieces will need to be ported or not ported? Please include the version number? The customer needs to tell you what is in scope and what is not in scope. 4. What percentage of the application(s) to be ported is written in the following programming languages? a. Java b. C# c. C d. C++ e. Assembler f. Visual Basic (Microsoft) g. Shells (ksh, csh, perl, awk, others) Ascertains the complexity of the application by asking what languages they are using and what percentage of those are in use. 5. Please provide a rough estimate of the number of lines of code in the software, listed by language types. This is another way of asking Question 4. Asking questions in different light often brings up data points that contradict each other. This opens the door for open discussions that can result in better project scoping. 6. For Java apps: Does the application use the JNI9 to link native libraries? Please describe. Ascertains the complexity of the application to be ported. Most of the time, Java applications that are not 100 percent pure Java need platform-dependent routines that can only be handled in native language such as C. Be aware of such platform-dependent code because they take more time to port. 7. Does the application use kernel modules? If yes, please describe. Ascertain complexity of the application to be ported. Kernel modules and routines used by the application are nonportable. These will take more time to convert to equivalent routines in Linux. 8. Is it a 2D/3D graphics application? Please describe. Ascertains complexity of the application to be ported. Make sure compatible graphics toolkits and development tools are available in Linux, whether they are supplied in Linux by default or by other third-party vendors.
9
Appendix C. UNIX to Linux Porting: A Comprehensive Reference (table of contents and sample chapter)
9. Does the application use UNIX pipes, message queues, shared memory, signals, or semaphores? Please describe. Most of these have standard UNIX interfaces that can be easily ported to Linux. Although the interfaces may be standard, implementation underneath the covers will differ. The catch is to make sure that the intended behavior remains the same when ported to Linux. 10.Is the application, or any of its components, multithreaded? If yes, which threads library is currently being used? Does the application rely on any proprietary threading priorities on your development platform? Depending on the source platform, multithreading interfaces can vary from standard to nonstandard. Linux supports several threading libraries, but the one that is standard in present and future Linux distributions is the Native Posix Threads Library (NPTL) implementation. NPTL is discussed in other sections of this book. The point is the closer the source implementation is to NPTL, the easier it is to port. 11.Does the application perform operations that assume specific byte storage order? Is this likely to be an issue during the port? This question relates to the endianess of the application. Most Linux ports will target the Intel platform, which is small endian, whereas most source platforms will be big endian. Nonportable code that assumes endian-specific characteristics will break when not ported correctly. Worse yet, the ported code will not exhibit errors during the porting phase. The problem usually crops up during system testing where it is harder to find. 12.Which compiler(s) and version is used in the development platform? a. GNU b. Java (what version) c. Platform (HP, AIX, Sun, Microsoft, NCR, AS/400, S390, True64) compiler? Which platform? d. Others (please specify) Ascertains complexity of the application to be ported. If the source application uses the GNU gcc or g++ compiler, it becomes easier to port to Linux because the native compiler for Linux is GNU gcc or g++. Applications that are developed on other platforms and are compiled in their native compilers tend to use native compiler semantics, which must be converted to GNU compiler semantics. C++ applications become harder to port than C applications when the application starts to use C++ features such as templates. Because some C++ standards are implemented differently by different compiler vendors, porting this type of code will take more time than simpler C++ code.
390
13.In addition to the development environment, are there any dependencies on debugging tools such as memory leak debuggers, performance analysis tools, exception handling, and so forth? This goes back to scoping and dependencies. Third-party tools that may or may not exist in Linux need to be assessed. Who needs to provide for the license? Who is responsible for obtaining the tools? What will be the support structure if third-party support is needed? 14.Is it a socket-based application? If yes, does it use RPC? Please describe. Although Linux supports standard-based socket and RPC semantics, the intent is ascertain portability. Asking this question may bring to light nonportable architecture the customer may have implemented in the application. This question can also lead to questions on what setup is needed at the testing phase. 15.Does the application use any third-party software components (database tools, application server, or other middleware)? If yes, which ones? Every third-party software component adds complexity to the port. If any third-party software components are used, ask what version of the component is used and whether it is available on Linux. Third-party components may require extra time to learn and even configure or build if necessary 16.How is the application delivered and installed? Does it use standard packaging? Will the installation scripts need to be ported, too? A Linux standard packaging mechanism is RPM. RPM is discussed in other parts of the book. Ascertain whether the customer will need the packaging part of the application ported, too. 17.Is the application or any of its components currently in 64 bit? Will any component need to be migrated to 64 bit? With the advent of 64-bit platforms and operating systems, this question pertains to the level at which the application needs to run or be ported. Most 32-bit applications will port to a 64-bit environment without problems through the use of modern compilers. Today's compilers have become efficient at flagging syntax and semantic errors in the application at compile time, allowing the porting engineer to make necessary changes. The one consideration here is that it will require additional time for porting and debugging.
Appendix C. UNIX to Linux Porting: A Comprehensive Reference (table of contents and sample chapter)
Database Information
1. What databases are currently supported? Please include version numbers. Almost all enterprise applications today require a database back end. Making sure the database for the application is available on Linux is important. Differences in database products and versions can add substantial porting effort to the project. 2. What database is the ported application expected to run with? In addition to Question 1 in this section, what database does the customer expect the ported application to run with on the Linux platform? 3. Does the application use any nonrelational or proprietary databases? Any proprietary database needs to be ported to Linux. Make sure the code to run the database is available and is part of the scoped porting work. 4. How does the application communicate with the database? a. Programming language(s) (for example, Java, C/C++, other) b. Database interface(s) (for example, ODBC, OCI, JDBC, etc.) Ascertains that programming languages and interfaces are available on Linux, whether or not supplied by third-party vendors. 5. Does the application require the use of extended data types (XML, audio, binary, video, and so on)? This information can be used to assess the skills needed by the porting group for porting the application.
392
4. What factors were considered in this complexity ranking? Any information from previous porting efforts needs to be assessed and compared to future porting efforts on the Linux platform. 5. If the application has been ported to another platform, how long did that port take? How many resources were dedicated to it? What problems were encountered? This question attempts to compare previous porting efforts to the Linux port. This is only useful if the porting engineer technical lead has previous porting experience on other platforms as well as Linux. 6. What is your rough estimate of the project porting time and resources required? The application or parts of it may have already been ported to other platforms, and knowing the time it took to port to those other platforms may be of some use. Experience and lessons learned from previous ports may come in handy. Knowing some of the lessons learned may help in avoiding problems when porting to Linux.
Testing-Specific Information
1. Please describe the acceptance testing setup. 2. What kind of networking and database setup would be required for unit testing? 3. How much testing will be required after porting (number of days, number of resources)? 4. Do you have established test scripts and application performance measurements? 5. Will benchmarks need to be run for comparison testing? 6. Is performance data available on current platforms? 7. When were the performance tests last executed? All testing-specific questions pertain to application software testing on the Linux platform. Asking these questions may bring out other issues related to porting test scripts and the software application test harness, which will add risks and time to the whole project. Pay close attention to the response to Question 1 of this section. Question 1 relates to the type of acceptance criteria that needs to be agreed on before porting starts. The acceptance criteria can be something like passing all tests suites from tests scripts or test programs that tests the newly ported application. When the acceptance criteria are met, the port is considered complete and formal QA tests can then be performed on the application.
Appendix C. UNIX to Linux Porting: A Comprehensive Reference (table of contents and sample chapter)
Summary
Project managers and porting technical leads need to consider multiple aspects of a porting project before embarking on the actual port itself. Careful investigation of these aspects has led us to many successful porting projects in the past. Because every porting project is different, these aspects may take on different shapes and forms. Even so, the underlying concepts and descriptions will remain the same. A porting project can be summarized as follows: Scoping. Ask questions, inspect the code if available, ask more questions and investigate the risks, and develop the schedule. Analysis. Ask more questions, investigate the risks, and create the schedule based on technical and business issues. Porting. Set up the build environment, compile, and unit test. Testing. Set up the test environment, test, and analyze performance. Go back to porting process if bugs are found.
394
Training. Train support and sales personnel on the application and operating environment. Because complexities and risks associated with different technical aspects of the porting project may affect the overall schedule and budget, the transition point between each step of the porting process allows the project team to reassess its original estimates. Reassessing the original estimates helps set the proper expectations of all stakeholders early on before the real work of porting begins. As in all projects, the success of the project is not only defined by the successful delivery of the final product; it is also defined by how well the project was managed to the satisfaction of all parties involved. In the next chapters, we go through each step of the porting process. We present information about Linux that porting engineers can use as they go through the scoping, the analysis, the porting, and the testing phases of a porting project.
Appendix C. UNIX to Linux Porting: A Comprehensive Reference (table of contents and sample chapter)
396
Appendix D.
397
Number of CPUs Memory size And so on Kernel configuration information (for Linux only): Current kernel runtime settings Boot command line used Device and driver files Memory information and statistics Kernel modules And so on Operating system configuration information: Boot loader type and configuration (Linux only) Password and group files System-wide profile setting PAM configuration Inittab file RC files Default configuration files for various software components Syslog configuration Print queues Cron settings Packages and patches And so on Disk configuration information: Disk usage information Mount point ownership and permission settings File system table file Swap devices Physical disk information Disk partitions If SVM or LVM is used, display configuration information
398
Network configuration information: NIC settings Host files Routers Name resolver configuration Services NFS exports Remote mounts Automounter configuration And so on System configuration information: For Solaris: prtdiag, prtconf, eeprom For Red Hat: hwconf file For Novell SUSE: hwinfo output Other software configurations: SSHD server configuration file SSH client configuration file sudo configuration Sample listing of processes that are currently running Not all available software components are included in the sample scripts. However, these samples should cover most of the common system components about which you might want to gather information. If you have other software components that you use and want to monitor using a tool such as this, you can adapt these samples as necessary. These scripts were originally designed for two purposes: As a snapshot tool for documenting the server configuration As a source of information for emergency purposes (system recovery) The scripts are designed to provide output in two types of file formats: Plain text format HTML format Key command line parameters for the script are: h, H, html, or HTML: Output in HTML format only
399
t, T, text, or TEXT: Output in text format only b, B, both, or BOTH: Output in HTML and text format -h or -?: Display usage information The default output format is text. The output location is the present working directory. These scripts need to be run with root authority in order to be able to access certain portions of the operating system information. The output file naming convention works as follows: <hostname>.sysinfo.YYYYMMDD.<output-type> An example set of output files is: fred.sysinfo.20051116.html fred.sysinfo.20051116.txt bart.testlab.com.sysinfo.20051116.html bart.testlab.com.sysinfo.20051116.txt After these output files have been generated, you might want to copy them to another system for safe keeping in the event that the system that generated the files needs to be recovered (using information saved in these files as a guide).
400
Appendix E.
Additional material
This redbook refers to additional material that can be downloaded from the Internet as described here.
401
Select Additional materials and open the directory that corresponds with the redbook form number, SG247186.
402
Related publications
The publications listed in this section are considered particularly suitable for a more detailed discussion of the topics covered in this redbook.
IBM Redbooks
For information about ordering these publications, see How to get IBM Redbooks on page 411. Note that some of the documents referenced here may be available in softcopy only. Accounting and Monitoring for z/VM Linux guest machines, REDP-3818 Advanced POWER Virtualization on IBM System p5, SG24-7940 IBM Eserver BladeCenter, Linux, and Open Source: Blueprint for e-business on demand, SG24-7034 IBM Eserver xSeries and BladeCenter Server Management, SG24-6495 IBM Eserver zSeries 890 Technical Introduction, SG24-6310 IBM Eserver zSeries 900 Technical Guide, SG24-5975 IBM Eserver zSeries 990 Technical Guide, SG24-6947 IBM System z9 109 Technical Guide, SG24-7124 IBM System z9 and Eserver zSeries Connectivity Handbook, SG24-5444 Linux Client Migration Cookbook A Practical Planning and Implementation Guide for Migrating to Desktop Linux, SG24-6380 Linux for IBM System z9 and zSeries, SG24-6694 Linux for S/390, SG24-4987 Linux Handbook A Guide to IBM Linux Solutions and Resources, SG24-7000 Linux on IBM Eserver i5 Implementation Guide, SG24-6388 Linux on IBM Eserver zSeries and S/390: Best Security Practices, SG24-7023 Linux on IBM Eserver zSeries and S/390: Building SuSE SLES8 Systems under z/VM, REDP-3687 Linux on IBM Eserver zSeries and S/390: Cloning Linux Images in z/VM, REDP-0301 Linux on IBM Eserver zSeries and S/390: Distributions, SG24-6264
403
Linux on IBM Eserver zSeries and S/390: ISP/ASP Solutions, SG24-6299 Linux on IBM Eserver zSeries and S/390: Large Scale Linux Deployment, SG24-6824 Linux on IBM Eserver zSeries and S/390: Performance Measurement and Tuning, SG24-6926 Linux on IBM Eserver zSeries and S/390: System Management, SG24-6820 Linux on IBM zSeries and S/390: High Availability for z/VM and Linux, REDP-0220 Linux on IBM zSeries and S/390: Securing Linux for zSeries with a Central z/OS LDAP Server (RACF), REDP-0221 Linux on IBM zSeries and S/390: Server Consolidation with Linux for zSeries, REDP-0222 Linux System Administration and Backup Tools for IBM Eserver xSeries and Netfinity, SG24-6228 Linux with zSeries and ESS: Essentials, SG24-7025 Networking Overview for Linux on zSeries, REDP-3901 Printing with Linux on IBM Eserver zSeries Using CUPS and Samba, REDP-3864 Technical Introduction: IBM Eserver zSeries 800, SG24-6515 The IBM Eserver BladeCenter JS20, SG24-6342 Tuning Red Hat Enterprise Linux on IBM Eserver xSeries Servers, REDP-3861 Tuning SUSE LINUX Enterprise Server on IBM Eserver xSeries Servers, REDP-3862 Up and Running with DB2 for Linux, SG24-6899 z/VM and Linux on zSeries: From LPAR to Virtual Servers in Two Days, SG24-6695
Other publications
These publications are also relevant as further information sources: Mendoza, et al., UNIX to Linux Porting: A Comprehensive Reference, Prentice Hall, 2006, ISBN 0131871099 Johnson, S., Performance Tuning for Linux Servers, IBM Press, 2005, ISBN 013144753X
404
Kuo, P. and N. Rahimi, SUSE LINUX Enterprise Server 9 Administrator's Handbook, Novell Press, 2005, ISBN 067232735X Linux Standard Base Team, Building Applications with the Linux Standard Base, IBM Press, 2004, ISBN 0131456954 Nemeth, E. and G. Snyder, Linux Administration Handbook (2nd Edition), Prentice-Hall PTR, 2006, ISBN 0131480049 Petersen, R., Red Hat Enterprise Linux & Fedora Core 4: The Complete Reference, McGraw-Hill Osborne Media, 3 edition, 2005, ISBN 0072261544 Siever, E., et al., Linux in a Nutshell, O'Reilly Media, Inc., 5 Edition, 2005, ISBN 0596009305
Online resources
These Web sites and URLs are also relevant as further information sources: IBM developerWorks open source section
http://www.ibm.com/developerworks/opensource
Cisco Systems Intelligent Gigabit Ethernet Switch Module for the IBM Eserver BladeCenter Installation Guide
http://www.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-57858
Related publications
405
IBM Director
http://www.ibm.com/pc/support/site.wss/MIGR-57057.html
z/VM publications
http://www.vm.ibm.com/pubs/
Linux Documentation Project, a collection of Linux documentation and How-To guides about almost every topic related to installing, configuring, or using Linux
http://www.tldp.org
406
Linux Assigned Names And Numbers Authority (LANANA), which maintains the Linux Device List
http://www.lanana.org
Web-Based Enterprise Management (WBEM) and the Common Information Model (CIM)
http://www.dmtf.org
Linux Assigned Names And Numbers Authority (LANANA), which maintains the Linux Device List
http://www.lanana.org
Knoppix
http://www.knoppix.com
SYSLINUX
http://syslinux.zytor.com
Related publications
407
Mochel, P., The sysfs file system paper, presented in Volume 1 of the 2005 Ottawa Linux Symposium proceedings
http://www.linuxsymposium.org/2005/
OpenWBEM
http://www.openwbem.org
Net-SNMP package
http://www.net-snmp.org/
SNMP tutorials
http://www.simpleweb.org/
408
OpenLDAP
http://www.OpenLDAP.org/
Bastille Linux
http://www.bastille-linux.org
OpenSSH
http://www.openssh.com
Linux hotplugging
http://linux-hotplug.sourceforge.net
Related publications
409
K3b application
http://k3b.sourceforge.net
Driver matrixes
http://www.ibm.com/pc/support/site.wss/DRVR-MATRIX.html
YaBoot
http://penguinppc.org/bootloaders/yaboot/
410
Related publications
411
412
Index
Symbols
#cp 327, 336 $cp 336 /bin/ash.static 212 /dev/hvcs0 299 /etc/auto.master 63 /etc/auto_master 63 /etc/ftpd/ftpusers 192 /etc/ftpusers 192 /etc/group 160 /etc/inetd.conf 189 /etc/inittab 133 /etc/issue 202 /etc/ldap.conf 164 /etc/motd 202 /etc/nsswitch.conf 164 /etc/printcap 155 /etc/racoon/racoon.conf 199 /etc/securetty 31, 196 /etc/skel/* 163 /etc/sysctl.conf 192 /etc/xinetd.d/ 190 /home 163 /lib/libipsec.so 198 /media/cdrom 94 /media/floppy 94 /proc 57, 89 /proc/mdstat 227 /sbin/init 133 /sbin/racoon 198 /sbin/setkey 198 /sys 90 adding a device 92 Advanced Intelligent Tape 99 Advanced Maryland Automated Network Disk Archiver 185 advanced system installation 29 Advanced System Management (ASM) 243 Advanced System Management Interface 259 agetty 104 AIT 99 AMANDA 185 Apache Web Server 5 arp 231 ASET 189 ASMI 259 AutoFS 62 AutoFSCK 62 automated restart 339 automated software management 81 automount 6263 automountd 6263 autoyast 37
B
backup 182 badblocks 225 Baseboard Management Controller 239 bash 212 bash parameters 335 basic system installation 24 Bastille Linux 188 best practice 309, 311, 321, 331, 333 bgpd 115 BIOS 127, 238 blade 239 BladeCenter 237, 244, 247 BladeCenter boot sequence 272 BladeCenter LAN Switch I/O Modules 268 BladeCenter Management Module 239, 244, 264 configuring 265 BladeCenter naming 271 block device 89 BMC 240 bonding 117
Numerics
8 mm tape 99
A
accept (print jobs) 154 access control list 60 access control list (ACL) 194 acl 60 addbadsec 55
413
boot command 277, 326 boot configuration files 132 boot loader 128 boot loaders 126 boot source 127 cdrom / dvd 127 floppy and various USB devices 127 hard disk 127 network 127 boot troubleshooting 216 booting 126 default boot 126 emergency boot 127 interactive boot 126 interactive start of services 127 reconfiguration boot 126 recovery boot 127 single user 126 verbose boot 126 Bootparams 136 br0 298 brctl 298 bridge-down.sh 297 bridge-up.sh 297 bridge-utils 296297 bridging 117 BSM 189 bunzip2 182 business intelligence 16 bzcat 182 bzip2 182 bzip2recover 182 bzless 183
C
CacheFS 5657 cancel (print jobs) 154 Capacity on Demand 249 CD 96 cda 98 cdda2wav 98 cdparanoia 98 cdrecord 97 CD-ROM 94 bootable 18 cdrw 97 central processing units (CPUs) 312 central processor (CP) 312
central storage 313 cfgadm 93 chacl 194 channel 313, 319 channel path 314 channel-path identifier (CHPID) 314 character device 88 chccwdev 336 chgrp 223 chmod 223 chown 223 CHPID 314, 318 chroot 230 CIM object manager 147 CIM server 147 Cisco Systems Intelligent Gigabit Ethernet Switch Module 271, 274 CKRM 141 Class-based Kernel Resource Management 141 client partition profile 291 configuring Linux 302 cluster 206 cmsfscat 336 cmsfsck 336 cmsfscp 336 cmsfslst 336 cmsfsvol 336 commercial distributions 6 Common UNIX Printing System (CUPS) 152 Companion CD 183 compiling patches 82 compress 182 compression tools 182 console command 277 console for the JS20 blade 273 Control Program (CP) 320 control unit 313 core files 216 cpint 336 cpio 182 crash 219 crash dumps 218 cryptographic hardware 341 csh 212 cupsd 155
D
DASD 310, 334
414
DASD Dump/Restore (DDR) Facility 340 dasdfmt 337 dasdview 337 DAT 99 database serving 15 dbginfo.sh 335, 337 dd 182 Debian 6 debugging tools 335 Dedicated Service Tools 251 dependencies 79 dependency 80 developerWorks 83 devfsadm 52 device access 89 device configuration information 89 device drivers 92 install 92 DFSMSdss 340 DHCP 119, 136 Linux 119 /etc/dhcpd.conf 119 /etc/init.d/dhcpd 119 /etc/sysconfig/dhcpd 119 /var/lib/dhcpd.leases 119 Solaris 119 /etc/inet/dhcpsvc.conf 119 dhcpconfig 119 dhcpmgr 119 dhtadm 119 in.dhcpd 119 pntadm 119 dhcpconfig 119 dhcpmgr 119 dhtadm 119 diagela 303 dig 231 Digital Audio Tape 99 Digital Linear Tape 99 disable (printers) 154 disabling rc scripts 134 disk drives 315 disk partition 59 disk partitioning 53 disk recognition 52 disk slice 59 Disk-Based File System Management 55 diskdump 219 diskdumpctl 219
diskdumpfmt 219 diskettes 94 disks 52 disks and disk partitioning 52 displaying tape drive status 101 Distributed Data Server (DDS) 331332 Distributed Management Task Force 147 distribution 4 distributions 5 DLT 99 dmesg 91, 221, 232 DMTF 147 DNS 120 DST 251 dump 183, 185 dumpadm 218 DVD 94, 96 dvd+rw-tools 97 dvdrecord 98 dynamic logical partitioning 253
E
e2fsck 5556 eject 96 enable (printers) 154 Enterprise Resource Planning (ERP) 15 env -T command 277 Epson 157 ESC/P printers 157 ESCON 314 ethereal 231 ethtool 231 expanded storage 313 ext2 54, 62 ext3 5556, 59, 62 extended user attributes 60
F
FCON/ESA 332 FCP 315 fdasd 337 fdformat 96 fdisk 5355 Fibre Channel Protocol (FCP) 315 FICON 314 file system dump and restore 183 file system journaling 59 file system snaphot 185
Index
415
file systems 178 file/print infrastructure 14 Filesystem Hierarchy Standard 60 find 222 firewall 203 chains 203 policies 203 firewalls 202 firmware 238 floppy diskette 96 fmthard 53 format 53 free 332, 335 free command 59 Free Software Foundation 5 fsck 5556 fsck -f 225 fsck -y 225 fsck.ext3 5556 fsck.reiserfs 56 fssnap 184185 FTP 191 fuser 232
H
halt 135 Hardware Management Console 249 hcp 327329, 337 Heartbeat 207, 340 Helsinki University of Technology 197 high availability 206, 338 HiperSockets 316, 341 HMC 249 hosted installation 248 hot-plug 52, 93, 328 hotplug command 90, 93 hot-plugging 93 HP printers 157 HSFS 55 hsfs 56 hvcs 299 hwbrowser 92, 233 hwconf 91 hwinfo 92 Hypervisor Virtual Console 299
I
IA32 238 IBM Director 240 IBM Machine Reported Product Data database 303 IBM VIO Server 285 IBM virtual SCSI server module 300 ibmvscsis 300 IDE 52 IEEE POSIX 10 IEEE POSIX 1003.1-2001 7 ifconfig 111, 335 ifenslave 117 IFL 310, 312 IKE 198 imap4 122 inetd 117 /etc/default/inetd 118 /etc/inetd.conf 118 /etc/services 118 ENABLE_CONNECTION_LOGGING 118 ENABLE_TCPWRAPPERS 118 info 8 init 135 initrd 128 inittab 102 insmod 86
G
gdb 233 General Public License (GPL) 45 getfacl 194 gfloppy 96 gfxmenu 30 GID 165 GNOME desktop 5 GNU 45 group administration 160 growfs 6667 growisofs 97 GRUB 126 config file 128 guest LAN 317 guest operating system 320 gunzip 182 gzcat 182 gzexe 182 gzgrep 182 gzip 182 gznew 182
416
install automation 29 Linux client from Solaris server 47 PXE 47 Red Hat Kickstart 32 remote display 31 serial console 29 software bundles 26 Solaris client from Linux server 50 Solaris Jumpstart 32 SUSE AutoYaST 37 vnc 31 installation automation 29 installation methods 320 Integrated Virtualization Manager 249 Internet Engineering Task Force 147 Internet Printing Protocol (IPP) 152 inter-user communication vehicle 317 iostat 232, 332, 335 ip 231 IP masquerading 202 IP redirects 193 IP routing 114 Linux 115 /etc/sysctl.conf 115 bgpd 115 net.ipv4.ip_forward 115 ospf6d 115 ospfd 115 quagga 115 radvd 115 ripd 115 ripngd 115 Solaris 114 /etc/defaultrouter 115 /etc/gateways 115 /etc/notrouter 115 /usr/sbin/in.rdisc 115 ndpd 115 RDISC 114 RIP 114 ripngd 115 IP stateful firewalling 123 ipcs 232 iPlanet Directory Server 163 IPSEC 198 IPSec 198199 IPSec and IKE 116 iptables 203, 341
IPv4 108 Linux 109 /etc/bootparams 109 /etc/hosts 109 /etc/nsswitch.conf 109 /etc/protocols 110 /etc/resolv.conf 109 /etc/services 110 ifcfg-interface-id-mac-address 109 ifcfg-interface-name 109 ifconfig 111 network profiles 110 sysctl 110 Solaris 108 /etc/bootparams 108 /etc/defaultdomain 108 /etc/defaultrouter 108 /etc/dhcp.interface 108 /etc/ethers 108 /etc/hostname.interface 108 /etc/inet/hosts 108 /etc/inet/protocols 108 /etc/inet/services 108 /etc/netmasks 108 /etc/nodename 108 /etc/nsswitch.conf 108 /etc/resolv.conf 108 dhcpagent 108 ifconfig 111 ndd 110 IPv6 Linux 113 ifcfg-interface-id-mac-address 114 ifcfg-interface-name 113 Solaris 113 /etc/hostname6.interface 113 /etc/inet/ipnodes 113 iso9660 56 ITEF 147 IUCV 317
J
Jaz drive 94 JetDirect 153 journal mode 60 journaling 59 JS20 247 jumpstart 32
Index
417
K
K3b 97 KDE desktop 5 Kerberos 199 kernel 45, 128 kernel.core_pattern 217 kernel.core_uses_pid 217 kickstart 32 kill 232 Knoppix 18 ksh 212 ksymoops 233 kudzu 105
L
LANANA 88 lcrash 220 LDAP 120, 163 ldapadd 164 ldapcompare 164 ldapdelete 164 ldapmodify 164 ldapmodrdn 164 ldappasswd 164 ldapsearch 164 ldapwhoami 164 ldd 232 Lexmark 157 librtas 303 LILO 126 Linus Torvalds 45 Linux Assigned Names And Numbers Authority 88 Linux Device List 88 Linux on POWER installation 278 Novell SUSE 280 Red Hat 279 Linux Standard Base (LSB) 9 Linux Virtual Server (LVS) 340 Linux-HA 206 live CD 18 LKCD 219 LOADLIN 126 locally attached printers 153 locate 222 logadm 221 logging 193 logical disk devices Linux 87
Solaris 87 logical partition 54 logical partitioning 248 logical volume 68 logical volume groups 177 logical volume management 66 logical volumes 177 logs 220 LOM 30 loopback 57, 339 lp 154 lpadmin 154 LPAR 248, 309, 311, 318319, 333, 341 lpc 154 LPD 152 lpfilter 154 lpforms 154 lpget 154 lpinfo 155 lpmove 154 lpoptions 155 lppasswd 155 lpq 154 lpr 154 lprm 154 lpsched 154 lpset 154 lpshut 154 lpstat 154 lpsystem 154 lpusers 154 lscss 337 lsdasd 337 lsmod 86 lsof 232 lspci 91, 233 lsqeth 337 lsraid 67 lstape 337 lsusb 91 lsvpd 303 ltrace 232, 335 LUN number 52 lvchange 65, 67 lvcreate 6566 lvdisplay 67, 72 lvextend 67 LVM 54 LVM2 66, 68
418
M
mail server 15 mail services 122 major numbers 87 MAKEDEV 86 man 8 Mandrake 6 Master Boot Record (MBR) 54 MBR 127 mdadm 6567 mdb 217218 memtest86 233 messaging 15 metaclear 65, 67 metadb 67 metadetach 6567 metadevadm 67 metahs 67 metainit 65, 67 metaoffline 67 metaparam 67 metarecover 67 metarename 67 metareplace 67 metaroot 67 metaset 67 metastat 67 metasync 67 metattach 65, 67 mgetty 104 MIB 149 microcode 303, 312, 338339 Micro-Partitioning 252 migration planning 11 mii-tool 231 mingetty 104 MINIX 4 minor number 87 mk2fs 55 mkdump 337 mke2fs 56 mkfs 5556
mkfs.ext3 5556 mkfs.reiserfs 5556 mkinitrd 329 mkisofs 97 mkraid 65 mkreiserfs 56 mkswap 5859 modem 103 modinfo 86, 93 modload 86 modprobe 93 module stacking 196 modunload 86 monitoring 175 monolithic installation 248 mount 57 mpstat 332 msdos 56 mt 101 mtools 96 mtx 101 multichip module (MCM) 312 multipath devices 53 mzip 96
N
NAT masquerading 202 National Security Agency (NSA) 189 Nautilus File Manage 95 ndd 192 ndpd 115 netdump 219 netdump-server 219 Netfilter 202 net-snmp 150 netstat 231, 335 NetWare 153 network boot services 136 network booting 135 Network File System (NFS) 58, 62 Network File Systems 58 network printing 153 network troubleshooting 230 network trunking 116 newfs 55 newsyslog 221 NFS 57, 121, 137 NIS 121
Index
419
NIS (and NIS+) 164 NIS and NIS+ 121 NIS+ 121 non-commercial distributions 6 Novell 6 nslookup 231 NSS (name switch service) 164 NTP 120
O
OpenFirmware 283 OpenLDAP 163 OpenPegasus 148 OpenPROM 126 OpenSSH 198 OpenWBEM 149 operating system 4 opreport 233 OSA-2 317 OSA-Express 317 ospf6d 115 ospfd 115
P
pack 182 package 76 package distribution 80 package management 76 Packages 76 paging 313 PAM module types 195 pam_login.so 197 pam_nologin.so 197 pam_securetty.so 196 parted 5355 partition 53 partitions 52 passwd 230 patch 78 Patch activation 82 patch cluster 80 Patch Manager 81 patchadd 79 patches 78 patching 79 PatchPro Expert 81 PatchPro Interactive 81 patchrm 79
pax 182 pcat 182 PCFS 55 pcfs 56 PCL printers 157 pcsf 56 pdksh 213 performance 178 Performance Toolkit for VM 331, 335 pgrep 232 ping 231, 335 pkgadd 76 pkgchk 76 pkginfo 76 pkgparam 76 pkgrm 76 pkill 232 Pluggable Authentication Modules (PAM) 194 pmadm 105 pntadm 119 pop3 122 port initialization 104 portmap 226 POSIX threads 7 POST 128 postfix 122 PostScript printing 157 power command 277 poweroff 135 ppc64-utils 303 PPD (PostScript Printer Description) 157 PReP boot partition 279, 281 primary partition 54 print server 319 printer 319 printer types 156 printing subsystem 152 process accounting 146 processes 179 processing units (PU) 312 proof of concept 331 proof of technology 331 prtvtoc 53 ps 231, 335 Public Domain Korn shell 213 pvcreate 65, 67 pvdisplay 68, 71 pvs 69 pvscan 69
420
PXE 47
Q
QDIO 310 qetharp 337 qethconf 337 quorum 68 quota 145
R
racoon keying daemon 198 radvd 115 RAID 54, 66, 68 raidhotadd 67, 227 raidhotremove 67 raidreconf 6667 raidstart 65 raidstop 65 raidtools 66 ramfs 58 RARP 136 raw device 89 raw disk slices 52 RDISC 114 reboot 135 Red Hat 6, 198 Red Hat Network (RHN) 8081 Redbooks Web site 411 Contact us xix ReiserFS 60 Reiserfs 54 reiserfs 5556, 59 reiserfsck 56 reject (print jobs) 154 remote display installation 31 Remote Supervisor Adapter II 239 remote system management 147 removable media 94 access 95 formatting 96 supported types 94 reset command 277 resize_reiserfs 6667 resize2fs 6667 resources 139 restore 183 REXX 340 RHEL install boot options 280
RIP 114 ripd 115 ripngd 115 rksh 212 rmformat 96 rmmod 86 Road Warrior server 199 IPSEC 199 root password recovery 229 route 231, 335 rpcbind 226 rpm 76 RSA II 241 rsh 212 run control files 133 run levels 131 0 132 1 132 2 132 3 132 4 132 5 132 6 132 emergency 132 single user 132
S
S/390 336337 s390-tools 336 s390-utils 336 s390x 337 SAN 52 sar 232, 332 savecore 218219 scheduling 144 scp 341 SCSI 52, 316 sd.conf 52 SDS 65 Secure Shell (SSH) 197 securing inetd/xinetd 189 Security Enhanced Linux (SE-Linux) 189 security/directory infrastructure 15 sendmail 122 serial console 104 serial interface as console device 30 serial interface as input/output device for GRUB 30 serial interface as input/output device for install 29
Index
421
Serial over LAN 273 configuring 274 using 276 serial port devices 102 Serial Ports Tool 102 ServeRAID 209 setfacl 194 setserial command 103 setup 8 sftp 341 sh 212 shared processing 252, 284 showrev 79 shutdown 135 shutting down 135 siga 233, 335 Simple Network Management Protocol 147 Single UNIX Specification (SUS) 9 SLES 199 SLES install boot options 282 AddSwap 283 Gateway 282 HostIP 282 Insmod 283 Install 282 Netdevice 282 Proxy 282 ProxyPort 283 SSHPassword 283 Textmode 283 UseSSH 283 VNC 283 VNCPassword 283 slice 53 slices 52 Small Computer System Interface 316 SMB 185 SMS 261 snapshots 184 SNMP 147 snoop 231 soft partitions 68 software bundles 26 software RAID 176 SoL 273 Solaris Volume Manager 65 Solaris Volume Manager (SVM) 65 Solstice DiskSuite (SDS) 65
Solstice DiskSuite / Solaris Volume Manager to Linux LVM 65 Solution Assurance Review 309 sound-juicer 98 splashimage 30 squid 122 SSH 197 SSH1 197 SSH2 198 SST 251 startup scripts 142 stat 223 statistics 173 statserial 233 strace 232233, 335 subchannel 314 subfs 95 submount file system 95 SunScreen 202 SunSolve 80 Super Digital Linear Tape 99 Super DLT 99 superuser access 196 support 10 SUSE 6 SUSE Linux portal 80 SVM 59, 65, 68 swap 5859 swapoff 5859 swapon 5859 SYN attacks 192 sysctl 192 sysfs 90 syslinux 47 syslogd 221 sysreport 233, 335 system information 140 System Management Services 261 System Service Tools 251 system services 141 system-config-netboot 136
T
tables 203 tape device name format 99 tape drives 98, 315 tape390_display 337 tapeinfo command 101
422
tar 182183 tar and cpio 182 Tatu Ylnen 197 TCP wrappers 123, 190 tcpdump 231 tcsh 212 telinit 105, 135 TFTP 136 TMPFS 57 tmpfs 58 top 231232, 332, 335 traceroute 335 Travan 98 trunking 117 truss 232 ttymon 104 ttyS0 104 tune2fs 62 tunedasd 337
U
udev 52, 87 udevd 52 UDF 55 udf 56 UFS 56, 59 ufs 56 UFS snapshot 184 ufsdump 183 UID 165 ulimit 232 uname 92 unpack 182 up2date 8081 updatedb 222 user administration 160 user_xattr 60 useradd 160 userdel 160 usermod 160 usfrestore 183
Very Secure FTP (vsftp) 191 vfat 56 vgcfgbackup 67 vgcfgrestore 67 vgchange 65, 67 vgck 69 vgcreate 65 vgdisplay 67, 69 vgexport 69 vgextend 65, 67 vgimport 69 vgreduce 65 vgremove 65 vgscan 69 VIPA 339 virtual channel-to-channel 316 virtual consoles 284 virtual Ethernet 284 virtual file system 57 virtual file systems 5657 virtual I/O 253 Virtual I/O Server 250 virtual I/O server partition profile 285 configuring Linux 295 virtual machine 320 virtual memory 175 virtual network bridging 296 Virtual Partition Manager 251 virtual SCSI 284 virtual terminals 102 virtualization 284 vmconvert 337 vmstat 232, 332, 335 vold 95 volume group 68 volumes Solaris Volume Manager 65 VPN 116 vsftpd 191 VSWITCH 317
W V
VCTC 316 VDISK 313, 333 VERITAS 73 VERITAS VxVM 73 VERITAS VxVM and VxFS 73 warning banners 202 WBEM 147 Web and application serving 15 Web proxy and cache servers 122 Web Proxy Server 122 Web-Based Enterprise Management 147
Index
423
X
X Window System 7 xedit 325 xinet /etc/xinetd.conf 118 /etc/xinetd.d/ 118 xinetd 117118 xmcd 98 xSeries server 237
Y
YaBoot 283 yaboot.conf 283 YASSP (Yet Another Solaris Security Package) 188 YaST 8 YaST online update 81 YaST2 8 yast2 105 yast2-s390 336 you 8081
Z
zgetdump 337 zip 182 zip drive 94 zipcloak 182 ZIPL 327 zipl 330, 337 zipnote 182 zipsplit 182 zsh 212
424
Back cover
BUILDING TECHNICAL INFORMATION BASED ON PRACTICAL EXPERIENCE IBM Redbooks are developed by the IBM International Technical Support Organization. Experts from IBM, Customers and Partners from around the world create timely technical information based on realistic scenarios. Specific recommendations are provided to help you implement IT solutions more effectively in your environment.