Extend your Red Hat Linux skills to UNIX
Sometimes, performing systems administration is comparable to learning similar languages. For example, if you have studied one of the Romance languages like French or Italian, you tend to recognize words in Spanish or Romanian with a fair degree of accuracy. The same is true for UNIX and Linux. There are enough commonalities between these various operating systems that major concepts traverse them but enough dissimilarity to make systems administration a challenge if all you have is the root password.
This article looks at Red Hat Enterprise Linux version 4 (RHEL4) and IBM AIX systems administration, starting with a brief overview of the two.
Basic administration differences
If you log in to an RHEL4 server or an AIX server, at first there will appear to be little difference between the two. Commands like
First, the two operating systems have a different logical layout for systems administration commands. Those in RHEL4 have a suffix-based nomenclature, where there is a common command or concept followed by the purpose of that command, such as
Second, although everything is managed through the use of flat files in RHEL4, from network configuration to Kickstart files, AIX has a special database similar to the system registry in Windows® operating systems called the Object Data Manager (ODM). This metastructure stores information about what software is installed on the server, the server’s host name, device-tuning parameters, networking routing, and many other facets of the operating system. Although contained in three files in /etc/objrepos, /usr/lib/objrepos, and /usr/share/lib/objrepos, the contents of the ODM reside in a proprietary database that cannot be viewed with standard editing tools like vi or Emacs.
In the older days of AIX, you would have modified this database using low-level commands that involved a high degree of risk to the server, where one typo could wreck the operating system. Fortunately, because things have evolved over the years, the mid- and high-level commands automatically interact with the ODM, reducing hands-on manipulation to a near-nonexistent level. But, without understanding the idea of the ODM, much of the rest of this article would not make sense.
Third, RHEL4 has a variety of helpful administrative tools that handle specific parts of the operating system. These tools begin with the prefix of
There are some cases where you will always use SMIT because of the complexity and length of commands like those for network administration or creating file systems. But, be cautious and do not let it become a crutch to your systems administration abilities; you can always click the F6 key to see the actual commands that 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 to step in and start managing servers with a good degree of success. But now, let's dive 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 the process along. During the installation, multiple options are available. You can select or omit specific software, determine the file system layout, choose user ID authentication methods, and even set the root user’s password. Comparatively, AIX offers fewer options. If you use standard CDs or DVDs, some options for changing such settings as language preferences and choice of disk are available, but AIX does not offer the versatility of the Linux installation process. AIX does, however, have a more versatile Network Installation Manager (NIM) tool that provides some options that RHEL4 does not, such as installing from an operating system backup and grabbing necessary driver software along the way.
Here's how a basic AIX installation works:
Software management
RHEL4 uses the Red Hat Package Manager (RPM) for installing, upgrading, and removing software. The
AIX manages software through the ODM. It tracks which software is installed, the versions, dependencies, and other, similar attributes like RPM. In AIX, software packages are called filesets and are segregated into Licensed Program Products (LPPs). Unlike RHEL4, though, AIX uses a variety of commands—provided later in this article—to install, view, and prepare filesets for installation. But two facets of AIX are 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. Applied software preserves the underlying committed fileset and can be rejected without harming the last committed fileset. This behavior can allow software to be backed out 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 can find the particular version of AIX by using the
Commands to know for server management include:
Logical volume management
The Logical Volume Manager (LVM) featured in RHEL4 was based on the one developed for AIX, and most of the core concepts are the same between the two. Here's how things are laid out:
AIX tracks most LVM information through the ODM. But the /etc/filesystems file is the equivalent of the /etc/fstab in RHEL4 for file system tracking. The format is different, however—a paragraph-structured delineation rather than a single line per file system.
Commands to know for LV management include:
Device management
AIX has a variety of robust tools for managing devices. Simply put, if the appropriate device fileset is installed on the server, AIX can automatically detect and establish settings for it. And even if the fileset is not installed, AIX will tell you what is needed to make it work.
You manage devices are through the ODM, and you can set them in a defined or available state. Defined devices have registered components in the ODM but cannot be 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 card defined on a server appears as fscsi0. The logical representation of this device is fcs0. And hard disks assigned through a SAN will have the same device address as the card. The underlying devices cannot be removed until the child devices are deleted first.
The customizable settings for each device are called attributes. Some device attributes cannot be modified dynamically while a device is active, such as network link speeds or Fibre Channel heartbeats, but the changes can be made if the device is changed to the defined state, or you can set changes to take place after a reboot.
Commands to know for device management include:
User ID and group management
User ID and group management in AIX are not handled by the ODM but instead reside 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 between RHEL4 and AIX. But, the /etc/security directory contains files that handle password complexity (user), ulimits (limits), encrypted passwords (passwd), and group metadata (groups).
Commands to know for user ID and group management include:
Process management
In RHEL4, the automation of operating system processes is handled through Services and configurable through the
The SRC is handled by the srcmstr process, spawned from the /etc/inittab file at boot time. Processes that the SRC manages are broken into groups, such as rcnfs for NFS-related processes, and then into individual subsystems, such as automountd for automounter processes. Each process managed by the SRC correlates with at least one process on the normal process table (ps). AIX also uses the inittab for managing processes and can start applications in a similar manner to RHEL4, 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:
Virtual memory management
Just like with other forms of UNIX, AIX employs virtual memory structures to help complement physical memory. But there are several differences and nuances between RHEL4 swap space and AIX’s paging space.
The structure for paging space is specialized LVs. Paging space is not managed through the
Generally, paging space should be one to two times real memory in size. A system may have more than one paging space defined, but it is best to keep paging spaces at equal sizes and to limit one paging space per disk.
Commands to know for virtual memory management include:
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. In AIX, the ODM manages network configuration. It tracks system IP addresses, netmasks, routes, and gateway information. But, the hosts and resolv.conf files perform the same functions as in RHEL4.
Each network interface has a physical device definition, such as ent0 for an Ethernet adapter. This is where the Maximum Transmission Unit (MTU) size and media speed attributes are stored. Then, at least one logical interface will be linked to this physical device, such as en0 or et0, on which the IP address will be configured.
Although the
Commands to know for network management include:
Troubleshooting
AIX has wonderful tools for actively detecting and diagnosing potential problems with servers. Because the hardware and operating system were developed side by side, when hardware glitches arise, the system knows how to track them and report them for repair.
AIX has a rotating log called the error report—errpt for short—that logs hardware and software errors. Unlike the messages file in Linux, the errpt contains pieces of meta-information such as identification numbers that can aid in looking for specific errors. The errpt can also be viewed in an abbreviated form for quick scanning or a detailed view for in-depth information.
AIX also has a diagnostic tool,
Commands to know for troubleshooting include:
Conclusion
With this information, RHEL4 systems administrators should be able to navigate some 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 a good reference for going forward into this great operating system.
Resources
Learn
Sometimes, performing systems administration is comparable to learning similar languages. For example, if you have studied one of the Romance languages like French or Italian, you tend to recognize words in Spanish or Romanian with a fair degree of accuracy. The same is true for UNIX and Linux. There are enough commonalities between these various operating systems that major concepts traverse them but enough dissimilarity to make systems administration a challenge if all you have is the root password.
This article looks at Red Hat Enterprise Linux version 4 (RHEL4) and IBM AIX systems administration, starting with a brief overview of the two.
Basic administration differences
If you log in to an RHEL4 server or an AIX server, at first there will appear to be little difference between the two. Commands like
ls
,
cd
, ps
, df
,
su
, vi
, tar
,
man
, chmod
, and
chown
work in the same fashion, with a few minor flag
differences. Both have a similar directory structure—/usr contains executable
files, /etc contains system parameter files, /dev contains device files, /var is for
temporary files, /opt is for third-party software, and /tmp contains temporary files.
But once you start diving deeper than a basic user level, idiosyncrasies emerge.
Three main areas of basic administration will help facilitate understanding all
other areas of AIX systems administration.
First, the two operating systems have a different logical layout for systems administration commands. Those in RHEL4 have a suffix-based nomenclature, where there is a common command or concept followed by the purpose of that command, such as
vgdisplay
, vgcreate
,
and vgreduce
. AIX has a prefix-based nomenclature,
such as lsvg
, mkvg
, and
reducevg
. If you understand the basic prefixes,
including ls-
(list, display), ch-
(change, modify), mk-
(create, make), rm-
(remove, delete), finding one keyword can lead to other related commands.
Second, although everything is managed through the use of flat files in RHEL4, from network configuration to Kickstart files, AIX has a special database similar to the system registry in Windows® operating systems called the Object Data Manager (ODM). This metastructure stores information about what software is installed on the server, the server’s host name, device-tuning parameters, networking routing, and many other facets of the operating system. Although contained in three files in /etc/objrepos, /usr/lib/objrepos, and /usr/share/lib/objrepos, the contents of the ODM reside in a proprietary database that cannot be viewed with standard editing tools like vi or Emacs.
In the older days of AIX, you would have modified this database using low-level commands that involved a high degree of risk to the server, where one typo could wreck the operating system. Fortunately, because things have evolved over the years, the mid- and high-level commands automatically interact with the ODM, reducing hands-on manipulation to a near-nonexistent level. But, without understanding the idea of the ODM, much of the rest of this article would not make sense.
Third, RHEL4 has a variety of helpful administrative tools that handle specific parts of the operating system. These tools begin with the prefix of
system-config-
(formerly redhat-config-
). But AIX has a superior
hierarchical administrative tool called the System Management Interface Tool
(SMIT) that you can access with the smit
(graphical)
or smitty
(text) commands. This interactive menu
system goes into most areas of systems administration, from changing the maximum
number of processes per user ID to changing the speed of a network interface.
There are some cases where you will always use SMIT because of the complexity and length of commands like those for network administration or creating file systems. But, be cautious and do not let it become a crutch to your systems administration abilities; you can always click the F6 key to see the actual commands that 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 to step in and start managing servers with a good degree of success. But now, let's dive more into the concepts and nuances of the various pieces of AIX.
RHEL4 is typically installed manually by CD or DVD or by using Kickstart to help the process along. During the installation, multiple options are available. You can select or omit specific software, determine the file system layout, choose user ID authentication methods, and even set the root user’s password. Comparatively, AIX offers fewer options. If you use standard CDs or DVDs, some options for changing such settings as language preferences and choice of disk are available, but AIX does not offer the versatility of the Linux installation process. AIX does, however, have a more versatile Network Installation Manager (NIM) tool that provides some options that RHEL4 does not, such as installing from an operating system backup and grabbing necessary driver software along the way.
Here's how a basic AIX installation works:
- When you boot the server (or activate the LPAR), a variety of LED codes will flash as the system runs its basic hardware checks. At some point—usually, when the LED code E1F1 appears—the screen displays its first main output, and five icons or words appear.
- After the keyboard icon or word appears, you usually presses the F1 key to drop the server into the System Management Services (SMS) menu. Then, from the boot list option, you select the device from which the installation will take place. If you are using the network for a NIM installation, you must first set up the network configuration in the Remote Initial Program Load (RIPL) menu.
- After exiting SMS, the server boots up on the devices specified in its boot list. Assuming that you are not using NIM, you then see the AIX installation window after a few more moments of testing. In this installation window, you can choose the hard disk (hdisk) on which AIX will be installed, which language will be used, and whether some software bundles will be chosen from a limited list of options.
- After all the selections have been made, the installation runs, the server reboots, and the operating system comes up with no password for the root user. At this point, AIX is officially "up."
bootlist
. Sets the system boot list order. You can use this command to tell 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.
RHEL4 uses the Red Hat Package Manager (RPM) for installing, upgrading, and removing software. The
rpm
command can query individual packages,
determine requisite software, and see which files are contained within what package.
You can find the particular version and update of RHEL4 installed on the server by
looking at the /etc/redhat-release file.
AIX manages software through the ODM. It tracks which software is installed, the versions, dependencies, and other, similar attributes like RPM. In AIX, software packages are called filesets and are segregated into Licensed Program Products (LPPs). Unlike RHEL4, though, AIX uses a variety of commands—provided later in this article—to install, view, and prepare filesets for installation. But two facets of AIX are 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. Applied software preserves the underlying committed fileset and can be rejected without harming the last committed fileset. This behavior can allow software to be backed out 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 can find 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 the particular technology level or service pack,
only the prior complete software set level will be displayed.
Commands to know for server management include:
lslpp
. Displays which licensed program products (LPPs) are installed, including their version and release, and whether the software is committed 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, theinstallp
command will not know which software is present for installation.rpm
. AIX also has the ability through the Linux affinity introduced in version 5 to install RPM packages compiled for AIX. These are managed primarily through therpm
command in the same way.geninstall
. This ubiquitous command handles the installation of filesets and RPMs and is used typically by SMIT menus.oslevel
. Displays operating system levels.
The Logical Volume Manager (LVM) featured in RHEL4 was based on the one developed 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 physical volumes (PVs). Each VG must have at least one PV, and only one VG can be assigned to a PV at a time.
- Each PV is broken down into individual physical partitions (PPs). These are a set fixed size at the VG layer.
- Logical volumes (LVs) point to a set of specific PPs; a single LV can point to up to three PPs for mirroring through the logical partitions (LPs) mapping.
- File systems are established on top of these LVs.
AIX tracks most LVM information through the ODM. But the /etc/filesystems file is the equivalent of the /etc/fstab in RHEL4 for file system tracking. The format is different, however—a paragraph-structured delineation rather than a single line per file system.
Commands to know for LV management include:
lspv
. Lists PV informationextendvg
,reducevg
. Places a disk into or removes a disk from a VGmkvg
,chvg
. Create a VG and change VG attributesmklv
,chlv
,rmlv
,lslv
. Make, change, remove, and list LV informationcrfs
,chfs
,rmfs
,lsfs
. Create, change, remove, and list file system information
AIX has a variety of robust tools for managing devices. Simply put, if the appropriate device fileset is installed on the server, AIX can automatically detect and establish settings for it. And even if the fileset is not installed, AIX will tell you what is needed to make it work.
You manage devices are through the ODM, and you can set them in a defined or available state. Defined devices have registered components in the ODM but cannot be 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 card defined on a server appears as fscsi0. The logical representation of this device is fcs0. And hard disks assigned through a SAN will have the same device address as the card. The underlying devices cannot be removed until the child devices are deleted first.
The customizable settings for each device are called attributes. Some device attributes cannot be modified dynamically while a device is active, such as network link speeds or Fibre Channel heartbeats, but the changes can be made if the device is 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 logically and/or physically. There is also a deprecatedmkdev
command, but becausecfgmgr
handles most device-addition operations, this command is seldom used.lsdev
,lscfg
,lsattr
. List device information, device configuration information, and device attributes.
User ID and group management in AIX are not handled by the ODM but instead reside 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 between RHEL4 and AIX. But, the /etc/security directory contains files that handle password complexity (user), ulimits (limits), encrypted passwords (passwd), and group metadata (groups).
Commands to know for user ID and group management include:
mkuser
,chuser
,rmuser
,lsuser
. Make, change, remove, and list user IDs.mkgroup
,chgroup
,rmgroup
,lsgroup
. Make, change, remove, and list groups.
In RHEL4, the automation of operating system processes is handled through Services and configurable through the
chkconfig
and
services
commands. Similarly, AIX has a System Resource
Controller (SRC) that starts, maintains, and manages processes.
The SRC is handled by the srcmstr process, spawned from the /etc/inittab file at boot time. Processes that the SRC manages are broken into groups, such as rcnfs for NFS-related processes, and then into individual subsystems, such as automountd for automounter processes. Each process managed by the SRC correlates with at least one process on the normal process table (ps). AIX also uses the inittab for managing processes and can start applications in a similar manner to RHEL4, 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 process information.telinit
. Re-sources the inittab file and applies any changes to the active system.
Just like with other forms of UNIX, AIX employs virtual memory structures to help complement physical memory. But there are several differences and nuances between RHEL4 swap space and AIX’s paging space.
The structure for paging space is specialized LVs. Paging space is not managed through the
–lv
commands but instead through specialized
commands that help register information with the ODM. However, paging space
can be manipulated with some of the more specialized LVM commands, such
as moving them from disk to disk.
Generally, paging space should be one to two times real memory in size. A system may have more than one paging space defined, but it is best to keep paging spaces at 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 display paging space utilization, pages in/out, and other system statistics.
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. In AIX, the ODM manages network configuration. It tracks system IP addresses, netmasks, routes, and gateway information. But, the hosts and resolv.conf files perform the same functions as in RHEL4.
Each network interface has a physical device definition, such as ent0 for an Ethernet adapter. This is where the Maximum Transmission Unit (MTU) size and media speed attributes are stored. Then, at least one logical interface will be linked to this physical device, such as en0 or et0, on which the IP address will be configured.
Although the
ifconfig
command can handle some
temporary device configuration changes, these changes will not be registered
permanently unless you use the chdev
command.
Commands to know for network management include:
mktcpip
. Defines the networking parameters for a specific interface.netstat
,entstat
,ifconfig
. Display network routing, statistics, and interface information.
AIX has wonderful tools for actively detecting and diagnosing potential problems with servers. Because the hardware and operating system were developed side by side, when hardware glitches arise, the system knows how to track them and report them for repair.
AIX has a rotating log called the error report—errpt for short—that logs hardware and software errors. Unlike the messages file in Linux, the errpt contains pieces of meta-information such as identification numbers that can aid in looking for specific errors. The errpt can also be viewed in an abbreviated form for quick scanning or a detailed view for in-depth information.
AIX also has a diagnostic tool,
diag
, that can test errors in
the errpt and determine whether they are temporary, one-off hiccups or necessitate
a part replacement. And if IBM wants more information from the server, the
snap
utility can gather a wide variety of information and
package it for technical support to troubleshoot the problem.
Commands to know for troubleshooting include:
errpt
. Displays hardware and software errors registered by the systemerrlogger
,errclear
. Put a message in the errpt log and purge old errors from the systemdiag
. Interactive diagnostic tool for examining the serversnap
. Gathers system information for analysis
With this information, RHEL4 systems administrators should be able to navigate some 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 a good reference for going forward into this great operating system.
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 a wealth of information relating to all aspects of AIX systems administration and expanding 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 and other technical topics.
- 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:
Grabbed from : http://www.ibm.com/developerworks/aix/library/au-aix_rhel/index.html
No comments:
Post a Comment