AIX Tips for RHEL 4 Administrators - Au-Aix_rhel-PDF

download AIX Tips for RHEL 4 Administrators - Au-Aix_rhel-PDF

of 11

Transcript of AIX Tips for RHEL 4 Administrators - Au-Aix_rhel-PDF

  • 8/8/2019 AIX Tips for RHEL 4 Administrators - Au-Aix_rhel-PDF

    1/11

    AIX tips for RHEL4 administratorsExtend your Red Hat Linux skills to UNIX

    Skill Level: Intermediate

    Christian Pruett ([email protected])Senior Systems AdministratorFreelance

    17 Nov 2009

    Are you broadening your skills as a Linux systems administrator into various flavorsof UNIX? Have you found yourself in charge of IBM UNIX servers on short notice?Get a rundown of the differences and similarities between Red Hat Enterprise Linuxand IBM AIX so that you can perform day-to-day activities with ease.

    Sometimes, performing systems administration is comparable to learning similar

    languages. For example, if you have studied one of the Romance languages likeFrench or Italian, you tend to recognize words in Spanish or Romanian with a fairdegree of accuracy. The same is true for UNIX and Linux. There are enoughcommonalities between these various operating systems that major conceptstraverse them but enough dissimilarity to make systems administration a challenge ifall you have is the root password.

    Frequently used acronyms

    DNS: Domain Name System

    NFS: Network file system

    SAN: Storage area network

    This article looks at Red Hat Enterprise Linux version 4 (RHEL4) and IBM AIXsystems administration, starting with a brief overview of the two.

    AIX tips for RHEL4 administrators Copyright IBM Corporation 2009. All rights reserved. Page 1 of 11

    mailto:[email protected]://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtmlmailto:[email protected]
  • 8/8/2019 AIX Tips for RHEL 4 Administrators - Au-Aix_rhel-PDF

    2/11

  • 8/8/2019 AIX Tips for RHEL 4 Administrators - Au-Aix_rhel-PDF

    3/11

    There are some cases where you will always use SMIT because of the complexityand length of commands like those for network administration or creating filesystems. But, be cautious and do not let it become a crutch to your systemsadministration abilities; you can always click the F6 key to see the actual commandsthat are run. AIX systems administrators can generally tell serious administrators

    from the inexperienced by the amount of times they rely on SMIT.

    With these three points in mind, any RHEL4 systems administrator should be able tostep in and start managing servers with a good degree of success. But now, let'sdive more into the concepts and nuances of the various pieces of AIX.

    Server installation

    RHEL4 is typically installed manually by CD or DVD or by using Kickstart to help theprocess along. During the installation, multiple options are available. You can select

    or omit specific software, determine the file system layout, choose user IDauthentication methods, and even set the root users password. Comparatively, AIXoffers fewer options. If you use standard CDs or DVDs, some options for changingsuch settings as language preferences and choice of disk are available, but AIXdoes not offer the versatility of the Linux installation process. AIX does, however,have a more versatile Network Installation Manager (NIM) tool that provides someoptions that RHEL4 does not, such as installing from an operating system backupand grabbing necessary driver software along the way.

    Here's how a basic AIX installation works:

    1. When you boot the server (or activate the LPAR), a variety of LED codeswill flash as the system runs its basic hardware checks. At somepointusually, when the LED code E1F1 appearsthe screen displaysits first main output, and five icons or words appear.

    2. After the keyboard icon or word appears, you usually presses the F1 keyto drop the server into the System Management Services (SMS) menu.Then, from the boot list option, you select the device from which theinstallation will take place. If you are using the network for a NIMinstallation, you must first set up the network configuration in the RemoteInitial Program Load (RIPL) menu.

    3. After exiting SMS, the server boots up on the devices specified in its bootlist. Assuming that you are not using NIM, you then see the AIXinstallation window after a few more moments of testing. In thisinstallation window, you can choose the hard disk (hdisk) on which AIXwill be installed, which language will be used, and whether some softwarebundles will be chosen from a limited list of options.

    ibm.com/developerWorks developerWorks

    AIX tips for RHEL4 administrators Copyright IBM Corporation 2009. All rights reserved. Page 3 of 11

    http://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtml
  • 8/8/2019 AIX Tips for RHEL 4 Administrators - Au-Aix_rhel-PDF

    4/11

    4. After all the selections have been made, the installation runs, the serverreboots, and the operating system comes up with no password for theroot user. At this point, AIX is officially "up."

    Here are a couple of commands you should know:

    bootlist. Sets the system boot list order. You can use this command totell the system to boot from CD, disk, the network, or other devices.

    bosboot. Creates the system boot image on a specific device. Typically,you use this command after mirroring disks or changing boot devices.

    Software management

    RHEL4 uses the Red Hat Package Manager (RPM) for installing, upgrading, and

    removing software. The rpm command can query individual packages, determinerequisite software, and see which files are contained within what package. You canfind the particular version and update of RHEL4 installed on the server by looking atthe /etc/redhat-release file.

    AIX manages software through the ODM. It tracks which software is installed, theversions, dependencies, and other, similar attributes like RPM. In AIX, softwarepackages are called filesetsand are segregated into Licensed Program Products(LPPs). Unlike RHEL4, though, AIX uses a variety of commandsprovided later inthis articleto install, view, and prepare filesets for installation. But two facets of AIXare worth mentioning with respect to software management.

    First, AIX allows you to install software in one of two states: applied or committed.Software that is committed is in a static state and can only be removed. Appliedsoftware preserves the underlying committed fileset and can be rejected withoutharming the last committed fileset. This behavior can allow software to be backedout without damaging underlying software structures.

    Second, AIX breaks down its versioning into four levels of granularity: version,release, technology level (formerly maintenance level), and service pack. You canfind the particular version of AIX by using the oslevel s command. For example,if the output displays 5300-05-02, this means that the server is AIX Version 5,

    Release 3, Technology Level 5, Service Pack 2. If not all filesets are present in theparticular technology level or service pack, only the prior complete software set levelwill be displayed.

    Commands to know for server management include:

    lslpp. Displays which licensed program products (LPPs) are installed,

    developerWorks ibm.com/developerWorks

    AIX tips for RHEL4 administratorsPage 4 of 11 Copyright IBM Corporation 2009. All rights reserved.

    http://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtml
  • 8/8/2019 AIX Tips for RHEL 4 Administrators - Au-Aix_rhel-PDF

    5/11

    including their version and release, and whether the software iscommitted or applied.

    installp. Installs, applies, commits, and removes software.

    inutoc. Generates a table of contents (toc) file for a particular directory

    containing software. Unless a .toc file is present, the installpcommand will not know which software is present for installation.

    rpm. AIX also has the ability through the Linux affinity introduced inversion 5 to install RPM packages compiled for AIX. These are managedprimarily through the rpm command in the same way.

    geninstall. This ubiquitous command handles the installation offilesets and RPMs and is used typically by SMIT menus.

    oslevel. Displays operating system levels.

    Logical volume management

    The Logical Volume Manager (LVM) featured in RHEL4 was based on the onedeveloped for AIX, and most of the core concepts are the same between the two.Here's how things are laid out:

    Volume groups (VGs) are made up of disks (hdisks) called physicalvolumes(PVs). Each VG must have at least one PV, and only one VGcan be assigned to a PV at a time.

    Each PV is broken down into individual physical partitions (PPs). Theseare a set fixed size at the VG layer.

    Logical volumes (LVs) point to a set of specific PPs; a single LV can pointto up to three PPs for mirroring through the logical partitions (LPs)mapping.

    File systems are established on top of these LVs.

    There are two types of file system structures in AIX: journaled file systems (JFS) andenhanced journaled file systems (JFS2). The former is a throwback to the earlierdays of AIX, and space is limited by the Number of Bytes Per Inode setting (NBPI)setting, with a maximum file system size of 2TB. The latter became a standard with

    AIX 5L and can go up to nearly 1PB in size (but the maximum recommended size is16TB). Both types of file systems can be dynamically increased in size, but with AIX5.3, JFS2 file systems can be dynamically decreased in size, as well.

    AIX tracks most LVM information through the ODM. But the /etc/filesystems file isthe equivalent of the /etc/fstab in RHEL4 for file system tracking. The format isdifferent, howevera paragraph-structured delineation rather than a single line per

    ibm.com/developerWorks developerWorks

    AIX tips for RHEL4 administrators Copyright IBM Corporation 2009. All rights reserved. Page 5 of 11

    http://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtml
  • 8/8/2019 AIX Tips for RHEL 4 Administrators - Au-Aix_rhel-PDF

    6/11

    file system.

    Commands to know for LV management include:

    lspv. Lists PV information

    extendvg, reducevg. Places a disk into or removes a disk from a VG

    mkvg, chvg. Create a VG and change VG attributes

    mklv, chlv, rmlv, lslv. Make, change, remove, and list LV information

    crfs, chfs, rmfs, lsfs. Create, change, remove, and list file systeminformation

    Device management

    AIX has a variety of robust tools for managing devices. Simply put, if the appropriatedevice fileset is installed on the server, AIX can automatically detect and establishsettings for it. And even if the fileset is not installed, AIX will tell you what is neededto make it work.

    You manage devices are through the ODM, and you can set them in a defined oravailable state. Defined devices have registered components in the ODM but cannotbe actively used, because they have been removed or are otherwise disabled.Available devices can be used and configured.

    Devices can be hierarchical in how they are linked together, and some devices have

    both physical and logical representations. For example, the first Fibre Channel carddefined on a server appears as fscsi0. The logical representation of this device isfcs0. And hard disks assigned through a SAN will have the same device address asthe card. The underlying devices cannot be removed until the child devices aredeleted first.

    The customizable settings for each device are called attributes. Some deviceattributes cannot be modified dynamically while a device is active, such as networklink speeds or Fibre Channel heartbeats, but the changes can be made if the deviceis changed to the defined state, or you can set changes to take place after a reboot.

    Commands to know for device management include:

    cfgmgr. Automatically probes the server and adds new devices.

    chdev, rmdev. Change device attributes and remove devices logicallyand/or physically. There is also a deprecated mkdev command, butbecause cfgmgr handles most device-addition operations, this command

    developerWorks ibm.com/developerWorks

    AIX tips for RHEL4 administratorsPage 6 of 11 Copyright IBM Corporation 2009. All rights reserved.

    http://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtml
  • 8/8/2019 AIX Tips for RHEL 4 Administrators - Au-Aix_rhel-PDF

    7/11

    is seldom used.

    lsdev, lscfg, lsattr. List device information, device configurationinformation, and device attributes.

    User ID and group managementUser ID and group management in AIX are not handled by the ODM but insteadreside in flat files much like RHEL4. Their locations and formats are slightly different,however. The /etc/passwd and /etc/groups files are roughly the same betweenRHEL4 and AIX. But, the /etc/security directory contains files that handle passwordcomplexity (user), ulimits (limits), encrypted passwords (passwd), and groupmetadata (groups).

    Commands to know for user ID and group management include:

    mkuser, chuser, rmuser, lsuser. Make, change, remove, and list userIDs.

    mkgroup, chgroup, rmgroup, lsgroup. Make, change, remove, andlist groups.

    Process management

    In RHEL4, the automation of operating system processes is handled throughServices and configurable through the chkconfig and services commands.

    Similarly, AIX has a System Resource Controller (SRC) that starts, maintains, andmanages processes.

    The SRC is handled by the srcmstr process, spawned from the /etc/inittab file atboot time. Processes that the SRC manages are broken into groups, such as rcnfsfor NFS-related processes, and then into individual subsystems, such asautomountd for automounter processes. Each process managed by the SRCcorrelates with at least one process on the normal process table (ps). AIX also usesthe inittab for managing processes and can start applications in a similar manner toRHEL4, Sun Solaris, and other System V flavors of UNIX by dropping files in the

    /etc/rc.d subdirectories.

    Commands to know for process management include:

    startsrc, stopsrc, lssrc. Start, stop, and list SRC processinformation.

    telinit. Re-sources the inittab file and applies any changes to theactive system.

    ibm.com/developerWorks developerWorks

    AIX tips for RHEL4 administrators Copyright IBM Corporation 2009. All rights reserved. Page 7 of 11

    http://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtml
  • 8/8/2019 AIX Tips for RHEL 4 Administrators - Au-Aix_rhel-PDF

    8/11

    Virtual memory management

    Just like with other forms of UNIX, AIX employs virtual memory structures to helpcomplement physical memory. But there are several differences and nuances

    between RHEL4 swap space and AIXs paging space.

    The structure for paging space is specialized LVs. Paging space is not managedthrough the lv commands but instead through specialized commands that helpregister information with the ODM. However, paging space can be manipulated withsome of the more specialized LVM commands, such as moving them from disk todisk.

    Generally, paging space should be one to two times real memory in size. A systemmay have more than one paging space defined, but it is best to keep paging spacesat equal sizes and to limit one paging space per disk.

    Commands to know for virtual memory management include:

    mkps, chps, rmps, lsps. Make, change, remove, and list paging spaces.

    vmstat, topas. System performance information tools that displaypaging space utilization, pages in/out, and other system statistics.

    Network management

    In RHEL4, the configuration of network devices is handled through flat files based

    out of /etc/sysconfig/network-scripts. There are also a few related files, such as the/etc/hosts and /etc/resolv.conf files, that track hostnames and DNS information. InAIX, the ODM manages network configuration. It tracks system IP addresses,netmasks, routes, and gateway information. But, the hosts and resolv.conf filesperform the same functions as in RHEL4.

    Each network interface has a physical device definition, such as ent0for an Ethernetadapter. This is where the Maximum Transmission Unit (MTU) size and mediaspeed attributes are stored. Then, at least one logical interface will be linked to thisphysical device, such as en0or et0, on which the IP address will be configured.

    Although the ifconfig command can handle some temporary device configurationchanges, these changes will not be registered permanently unless you use thechdev command.

    Commands to know for network management include:

    mktcpip. Defines the networking parameters for a specific interface.

    developerWorks ibm.com/developerWorks

    AIX tips for RHEL4 administratorsPage 8 of 11 Copyright IBM Corporation 2009. All rights reserved.

    http://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtml
  • 8/8/2019 AIX Tips for RHEL 4 Administrators - Au-Aix_rhel-PDF

    9/11

    netstat, entstat, ifconfig. Display network routing, statistics, andinterface information.

    Troubleshooting

    AIX has wonderful tools for actively detecting and diagnosing potential problems withservers. Because the hardware and operating system were developed side by side,when hardware glitches arise, the system knows how to track them and report themfor repair.

    AIX has a rotating log called the error reporterrptfor shortthat logs hardwareand software errors. Unlike the messages file in Linux, the errpt contains pieces ofmeta-information such as identification numbers that can aid in looking for specificerrors. The errpt can also be viewed in an abbreviated form for quick scanning or adetailed view for in-depth information.

    AIX also has a diagnostic tool, diag, that can test errors in the errpt and determinewhether they are temporary, one-off hiccups or necessitate a part replacement. Andif IBM wants more information from the server, the snap utility can gather a widevariety of information and package it for technical support to troubleshoot theproblem.

    Commands to know for troubleshooting include:

    errpt. Displays hardware and software errors registered by the system

    errlogger, errclear. Put a message in the errpt log and purge olderrors from the system

    diag. Interactive diagnostic tool for examining the server

    snap. Gathers system information for analysis

    Conclusion

    With this information, RHEL4 systems administrators should be able to navigatesome of the ins and outs of AIX systems administration with precision. Although this

    article will not make you an expert in all aspects of AIX overnight, it will give you agood reference for going forward into this great operating system.

    ibm.com/developerWorks developerWorks

    AIX tips for RHEL4 administrators Copyright IBM Corporation 2009. All rights reserved. Page 9 of 11

    http://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtml
  • 8/8/2019 AIX Tips for RHEL 4 Administrators - Au-Aix_rhel-PDF

    10/11

    Resources

    Learn

    The UNIX Rosetta Stone: This Web site contains all sorts of information on the

    commands across the various UNIX and Linux flavors. UNIX shells: Learn more about UNIX shells.

    AIX and UNIX developerWorks zone: The AIX and UNIX zone provides awealth of information relating to all aspects of AIX systems administration andexpanding your UNIX skills.

    New to AIX and UNIX? Visit the New to AIX and UNIX page to learn more.

    Technology bookstore: Browse the technology bookstore for books on this andother technical topics.

    Discuss developerWorks blogs: Check out our blogs and get involved in the

    developerWorks community.

    Follow developerWorks on Twitter.

    Get involved in the My developerWorks community.

    Participate in the AIX and UNIX forums:

    AIX Forum

    AIX Forum for developers

    Cluster Systems Management

    IBM Support Assistant Forum

    Performance Tools Forum

    Virtualization Forum

    More AIX and UNIX Forums

    About the author

    Christian Pruett

    Christian Pruett is a senior UNIX systems administrator with more than 14 years ofexperience with AIX, Sun Solaris, Linux, and HP/UX in a wide variety of industries,including computing, agriculture, and telecommunications. He is the co-author of twoIBM Redbooks on AIX, has served as a UNIX book review for OReilly Publishing,

    developerWorks ibm.com/developerWorks

    AIX tips for RHEL4 administratorsPage 10 of 11 Copyright IBM Corporation 2009. All rights reserved.

    http://bhami.com/rosetta.htmlhttp://en.wikipedia.org/wiki/Unix_shellhttp://www-128.ibm.com/developerworks/aix/http://www-128.ibm.com/developerworks/aix/newto/http://www.ibm.com/developerworks/apps/SendTo?bookstore=safarihttp://www.ibm.com/developerworks/blogs/http://www.ibm.com/developerworks/communityhttp://twitter.com/developerworkshttps://www.ibm.com/developerworks/mydeveloperworkshttp://www-128.ibm.com/developerworks/forums/dw_forum.jsp?forum=747&cat=72http://www-128.ibm.com/developerworks/forums/dw_forum.jsp?forum=905&cat=72http://www-128.ibm.com/developerworks/forums/dw_forum.jsp?forum=907&cat=72http://www-128.ibm.com/developerworks/forums/dw_forum.jsp?forum=935&cat=72http://www-128.ibm.com/developerworks/forums/dw_forum.jsp?forum=749&cat=72http://www.ibm.com/developerworks/forums/forum.jspa?forumID=748http://www-128.ibm.com/developerworks/forums/dw_auforums.jsphttp://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtmlhttp://www-128.ibm.com/developerworks/forums/dw_auforums.jsphttp://www.ibm.com/developerworks/forums/forum.jspa?forumID=748http://www-128.ibm.com/developerworks/forums/dw_forum.jsp?forum=749&cat=72http://www-128.ibm.com/developerworks/forums/dw_forum.jsp?forum=935&cat=72http://www-128.ibm.com/developerworks/forums/dw_forum.jsp?forum=907&cat=72http://www-128.ibm.com/developerworks/forums/dw_forum.jsp?forum=905&cat=72http://www-128.ibm.com/developerworks/forums/dw_forum.jsp?forum=747&cat=72https://www.ibm.com/developerworks/mydeveloperworkshttp://twitter.com/developerworkshttp://www.ibm.com/developerworks/communityhttp://www.ibm.com/developerworks/blogs/http://www.ibm.com/developerworks/apps/SendTo?bookstore=safarihttp://www-128.ibm.com/developerworks/aix/newto/http://www-128.ibm.com/developerworks/aix/http://en.wikipedia.org/wiki/Unix_shellhttp://bhami.com/rosetta.html
  • 8/8/2019 AIX Tips for RHEL 4 Administrators - Au-Aix_rhel-PDF

    11/11

    and has worked on several of the IBM AIX certification exams. He resides inColorado with his wife and two children. You can reach Christian [email protected].

    ibm.com/developerWorks developerWorks

    AIX tips for RHEL4 administrators Copyright IBM Corporation 2009. All rights reserved. Page 11 of 11

    http://[email protected]/http://www.ibm.com/legal/copytrade.shtmlhttp://www.ibm.com/legal/copytrade.shtmlhttp://[email protected]/