Your Ad Here

IBM AIX/UNIX system storage administration ksh/perl scripting

Friday, September 11, 2009

Unknown hostname for Solaris 10 DHCP client

Unknown hostname for Solaris 10 DHCP client

When I installed Solaris 10 x86, my computer thought its hostname was unknown. Aside from being annoying, this seemed to be causing a few issues, so I set about trying to set it to a name of my choice.

Using the uname -S hostname command set the hostname for me but this information didn’t persist on reboot. A bit of googling turned up various references to editing /etc/init.d/network so that it read /etc/nodename and set the hostname accordingly (as well as a script to set the hostname), but my system didn’t have an /etc/nodename file.

I understood that /etc/nodename should contain my computer’s name, but didn’t know if any other settings were required (I later found Jeff Hunter’s TCP/IP quick configuration guide, which confirmed that the file just contains the computer’s name - in my case laptop3).

It turns out that these hacks are for Solaris 8/9 - Solaris 10 is quite happy to set the hostname based on the contents of /etc/nodename. Once I had created /etc/nodename and rebooted, /etc/hosts read:

#
# Internet host table
#
127.0.0.1 localhost
192.168.7.106 laptop3 # Added by DHCP

and the computer was no longer anonymous!



Method 2:

http://docs.sun.com/app/docs/doc/816-4554/dhcp-admin-1058sm?a=view

How to Enable a Solaris DHCPv4 Client to Request a Specific Host Name

  1. On the client system, edit the /etc/default/dhcpagent file as superuser.

  2. Find the REQUEST_HOSTNAME keyword in the /etc/default/dhcpagent file and modify the keyword as follows:


    REQUEST_HOSTNAME=yes

    If a comment sign (#) is in front of REQUEST_HOSTNAME, remove the #. If the REQUEST_HOSTNAME keyword is not present, insert the keyword.

  3. Edit the /etc/hostname.interface file on the client system to add the following line:

    inet hostname

    hostname is the name that you want the client to use.

  4. Type the following commands to have the client perform a full DHCP negotiation upon rebooting:


    # ifconfig interface dhcp release
    # reboot

    The DHCP data that is cached on the client is removed. The client restarts the protocol to request new configuration information, including a new host name. The DHCP server first makes sure that the host name is not in use by another system on the network. The server then assigns the host name to the client. If configured to do so, the DHCP server can update name services with the client's host name.

    If you want to change the host name later, repeat Step 3 and Step 4.

Automatically mount a CDROM using volume manager on Solaris 10

1) Insert a CD-ROM into the CD-ROM player

2) Type the mount command without options to verify that the device was mounted. Note the mount point that was used

3) Eject the CD-ROM as follows :

# eject cdrom

4) Use the pgrep command to look for the volume manager process. The volume manager process is vold.

# pgrep -l vold

5) Turn off the volume manager by typing the following command :

# /etc/init.d/volmgt stop

6) Look for volume management process using pgrep command as follows :

# pgrep -l vold

7) Insert the CD into the CD-ROM player.

8) Restart the volume manager daemon by issuing the following command :

# /etc/init.d/volmgt start

9) To get the list of mounted file systems issue the mount command without any options

Tuesday, August 11, 2009

Command topas core dump,

Environment:
TSM server on AIX 5300-09-02-0849
There are couple of tape libraries with many tape drives attached to this AIX server.

# lsdev -Cctape
rmt0 Available 0H-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt1 Available 0H-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt2 Available 0H-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt3 Available 0H-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt4 Available 0H-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt5 Available 0H-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt6 Available 0H-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt7 Available 0H-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt8 Available 0H-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt9 Available 0H-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt10 Available 0H-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt11 Available 0H-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt12 Available 0H-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt13 Available 0H-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt14 Available 0H-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt15 Available 0H-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt16 Available 0H-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt17 Available 0H-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt18 Available 0H-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt19 Available 0H-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt20 Available 0H-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt21 Available 0H-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt22 Available 0H-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt23 Available 0H-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt24 Available 0H-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt25 Available 0H-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt26 Available 0H-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt27 Available 0H-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt28 Available 0H-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt29 Available 0H-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt30 Available 0H-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt31 Available 0H-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt32 Available 0H-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt33 Available 0H-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt34 Available 0H-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt35 Available 0H-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt36 Available 0H-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt37 Available 0H-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt38 Available 0H-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt39 Available 0H-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt40 Available 0H-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt41 Available 0H-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt42 Available 0H-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt43 Available 0H-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt44 Available 0H-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt45 Available 0H-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt46 Available 0H-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt47 Available 0H-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt48 Available 0H-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt49 Available 0H-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt50 Available 0A-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt51 Available 0A-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt52 Available 0A-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt53 Available 0A-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt54 Available 0A-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt55 Available 0A-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt56 Available 0A-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt57 Available 0A-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt58 Available 0A-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt59 Available 0A-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt60 Available 0A-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt61 Available 0A-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt62 Available 0A-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt63 Available 0A-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt64 Available 0A-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt65 Available 0A-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt66 Available 0A-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt67 Available 0A-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt68 Available 0A-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt69 Available 0A-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt70 Available 0A-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt71 Available 0A-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt72 Available 0A-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt73 Available 0A-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt74 Available 0A-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt75 Available 0C-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt76 Available 0C-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt77 Available 0C-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt78 Available 0C-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt79 Available 0C-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt80 Available 0C-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt81 Available 0C-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt82 Available 0C-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt83 Available 0C-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt84 Available 0C-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt85 Available 0C-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt86 Available 0C-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt87 Available 0C-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt88 Available 0C-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt89 Available 0C-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt90 Available 0C-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt91 Available 0C-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt92 Available 0C-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt93 Available 0C-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt94 Available 0C-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt95 Available 0C-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt96 Available 0C-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt97 Available 0C-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt98 Available 0C-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt99 Available 0C-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt100 Available 0D-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt101 Available 0D-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt102 Available 0D-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt103 Available 0D-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt104 Available 0D-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt105 Available 0D-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt106 Available 0D-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt107 Available 0D-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt108 Available 0D-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt109 Available 0D-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt110 Available 0D-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt111 Available 0D-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt112 Available 0D-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt113 Available 0D-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt114 Available 0D-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt115 Available 0D-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt116 Available 0D-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt117 Available 0D-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt118 Available 0D-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt119 Available 0D-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt120 Available 0D-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt121 Available 0D-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt122 Available 0D-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt123 Available 0D-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt124 Available 0D-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt125 Available 0I-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt126 Available 0I-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt127 Available 0I-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt128 Available 0I-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt129 Available 0I-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt130 Available 0I-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt131 Available 0I-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt132 Available 0I-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt133 Available 0I-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt134 Available 0I-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt135 Available 0I-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt136 Available 0I-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt137 Available 0I-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt138 Available 0I-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt139 Available 0I-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt140 Available 0I-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt141 Available 0I-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt142 Available 0I-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt143 Available 0I-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt144 Available 0I-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt145 Available 0I-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt146 Available 0I-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt147 Available 0I-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt148 Available 0I-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt149 Available 0I-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt150 Available 0I-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt151 Available 0I-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt152 Available 0I-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt153 Available 0I-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt154 Available 0I-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt155 Available 0I-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt156 Available 0I-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt157 Available 0I-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt158 Available 0I-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt159 Available 0I-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt160 Available 0I-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt161 Available 0I-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt162 Available 0I-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt163 Available 0I-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt164 Available 0I-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt165 Available 0I-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt166 Available 0I-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt167 Available 0I-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt168 Available 0I-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt169 Available 0I-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt170 Available 0I-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt171 Available 0I-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt172 Available 0I-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt173 Available 0I-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt174 Available 0I-09-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt175 Available 0F-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt176 Available 0F-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt177 Available 0F-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt178 Available 0F-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt179 Available 0F-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt180 Available 0F-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt181 Available 0F-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt182 Available 0F-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt183 Available 0F-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt184 Available 0F-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt185 Available 0F-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt186 Available 0F-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt187 Available 0F-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt188 Available 0F-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt189 Available 0F-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt190 Available 0F-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt191 Available 0F-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt192 Available 0F-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt193 Available 0F-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt194 Available 0F-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt195 Available 0F-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt196 Available 0F-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt197 Available 0F-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt198 Available 0F-08-02 IBM 3580 Ultrium Tape Drive (FCP)
rmt199 Available 0F-08-02 IBM 3580 Ultrium Tape Drive (FCP)
smc0 Available 0H-08-02 IBM 3584 Library Medium Changer (FCP)
smc1 Available 0H-08-02 IBM 3584 Library Medium Changer (FCP)
smc2 Available 0H-09-02 IBM 3584 Library Medium Changer (FCP)
smc3 Available 0H-09-02 IBM 3584 Library Medium Changer (FCP)
smc4 Available 0A-08-02 IBM 3584 Library Medium Changer (FCP)
smc5 Available 0A-08-02 IBM 3584 Library Medium Changer (FCP)
smc6 Available 0C-08-02 IBM 3584 Library Medium Changer (FCP)
smc7 Available 0C-08-02 IBM 3584 Library Medium Changer (FCP)
smc8 Available 0D-08-02 IBM 3584 Library Medium Changer (FCP)
smc9 Available 0D-08-02 IBM 3584 Library Medium Changer (FCP)
smc10 Available 0I-08-02 IBM 3584 Library Medium Changer (FCP)
smc11 Available 0I-08-02 IBM 3584 Library Medium Changer (FCP)
smc12 Available 0I-09-02 IBM 3584 Library Medium Changer (FCP)
smc13 Available 0I-09-02 IBM 3584 Library Medium Changer (FCP)
smc14 Available 0F-08-02 IBM 3584 Library Medium Changer (FCP)
smc15 Available 0F-08-02 IBM 3584 Library Medium Changer (FCP)



When topas command is called, it failed with error "Segmentation fault(coredump)" and then exit to command prompt.

Solution:

This issue is occuring when there are more number of tape drives. You can install this fix on all 53TL09SP3 machines.
APAR IZ52203 has been opened for this issue. Tentative availabilty date of this APAR would be November 2009.

Wednesday, June 03, 2009

AIX 5.3 Commit Applied Software Updates failed

Problem:

Tried to commit applied Software Updates, failed with the following messages.

MISSING REQUISITES: The following filesets are requisites of one or more
of the selected filesets listed above. They are not currently installed
on the system. You should install these requisites to ensure that the
selected filesets function correctly. You MUST install these requisites
before committing the selected filesets.

bos.rte 6.1.0.0 # Base Level Fileset
devices.common.IBM.mpio.rte 5.2.0.50 # MPIO Disk Path Control Module
xlC.aix61.rte 9.0.0.1 # Fileset Update

<<>>

Solution:

Force install fileset devices.common.IBM.mpio.rte. (-F option below)

# installp -a -d . -F devices.common.IBM.mpio.rte

+-----------------------------------------------------------------------------+
Pre-installation Verification...
+-----------------------------------------------------------------------------+
Verifying selections...done
Verifying requisites...done
Results...

SUCCESSES
---------
Filesets listed in this section passed pre-installation verification
and will be installed.

Selected Filesets
-----------------
devices.common.IBM.mpio.rte 5.3.9.1 # MPIO Disk Path Control Module

<<>>

+-----------------------------------------------------------------------------+
BUILDDATE Verification ...
+-----------------------------------------------------------------------------+
Verifying build dates...done
FILESET STATISTICS
------------------
1 Selected to be installed, of which:
1 Passed pre-installation verification
----
1 Total to be installed

0503-409 installp: bosboot verification starting...
installp: bosboot verification completed.
+-----------------------------------------------------------------------------+
Installing Software...
+-----------------------------------------------------------------------------+

installp: APPLYING software for:
devices.common.IBM.mpio.rte 5.3.9.1


. . . . . <<>> . . . . . . .
Licensed Materials - Property of IBM

5765G0300
Copyright International Business Machines Corp. 1995, 2008.

All rights reserved.
US Government Users Restricted Rights - Use, duplication or disclosure
restricted by GSA ADP Schedule Contract with IBM Corp.
. . . . . <<>>. . . .

Finished processing all filesets. (Total time: 20 secs).

0503-409 installp: bosboot verification starting...
installp: bosboot verification completed.
0503-408 installp: bosboot process starting...

bosboot: Boot image is 38319 512 byte blocks.
0503-292 This update will not fully take effect until after a
system reboot.

* * * A T T E N T I O N * * *
System boot image has been updated. You should reboot the
system as soon as possible to properly integrate the changes
and to avoid disruption of current functionality.

installp: bosboot process completed.
+-----------------------------------------------------------------------------+
Summaries:
+-----------------------------------------------------------------------------+

Installation Summary
--------------------
Name Level Part Event Result
-------------------------------------------------------------------------------
devices.common.IBM.mpio.rte 5.3.9.1 USR APPLY SUCCESS
devices.common.IBM.mpio.rte 5.3.9.1 ROOT APPLY SUCCESS


Now smit commit works file.

Monday, May 25, 2009

Which Process Is Using Up Most The CPU Resources


Question


How can you determine which process is using up the most CPU time?


Cause



Answer

The following commands and tools can be used to find which process is using the most cpu resources.

1. topas -P



In the topas -P output above the process called "cpu-eater" is the top consumer of cpu resources.

2. tprof -x sleep 10; vi sleep.prof



bosboot fails with malloc error 0301-106

Problem(Abstract)

During or after an OS upgrade, bosboot fails with the following error:

0301-106 /usr/lib/boot/bin/mkboot_chrp the malloc call failed for size

0301-158 bosboot: mkboot failed to create bootimage.

0301-165 bosboot: WARNING! bosboot failed - do not attempt to boot device.

Symptom

During or after an OS upgrade, bosboot fails with the following error:

0301-106 /usr/lib/boot/bin/mkboot_chrp the malloc call failed for size

0301-158 bosboot: mkboot failed to create bootimage.

0301-165 bosboot: WARNING! bosboot failed - do not attempt to boot device.


Cause


Environment

Recently upgraded AIX OS

Diagnosing the problem

Check size of PdDv.vc ODM class file...

eg...

# ls -al /usr/lib/objrepos/PdDv*
-rw-r--r-- 1 root system 110592 Apr 14 11:42 PdDv
-rw-r--r-- 1 root system
200937472 Apr 14 11:42 PdDv.vc

Resolving the problem

bosboot uses the PdDv ODM class files to build device information into the boot image and pre-allocate memory for these devices. If the file is too large, malloc cannot satisfy the request, causing bosboot to fail.

The following instructions can be used to reduce the size of the PdDv.vc file:

# mkdir /tmp/objrepos
# cd /tmp/objrepos
# export ODMDIR=/usr/lib/objrepos
# odmget PdDv > PdDv.out
# cp /usr/lib/objrepos/PdDv /usr/lib/objrepos/PdDv.bak
# cp /usr/lib/objrepos/PdDv.vc /usr/lib/objrepos/PdDv.vc.bak
# export ODMDIR=/tmp/objrepos
# echo $ODMDIR
# odmcreate -c /usr/lib/cfgodm.ipl
# ls -l PdDv*
# odmadd /tmp/objrepos/PdDv.out
# ls -l PdDv*
# cp /tmp/objrepos/PdDv /usr/lib/objrepos/PdDv
# cp /tmp/objrepos/PdDv.vc /usr/lib/objrepos/PdDv.vc
# export ODMDIR=/etc/objrepos
# rm -rf /tmp/objrepos

Using DBX and KDB to build stack traces

Question

I have a hung process, how can I get a stack trace of it?

Cause



Answer

NOTE: Not all processes that show up in ps -ef will be able to have stack traces built on them. Old processes tend to be eventually paged out of memory and neither dbx or kdb will then be able to be used to look at the stack trace for that process.

DBX Stack Trace Instructions for building a stack trace on a hung process:

In order to use dbx, the customer must first have the fileset
bos.adt.debug installed.

Attach to hung process
1. Capture console output, enter:
script

2. Enter:
ps -ef | grep

3. Enter:
dbx -a

4. Format trace, enter:
where

5. Leave dbx, enter:
detach (Typing quit will kill the process)

6. To leave script, type exit.
The script will be named typescript and will be located in the current
working directory.


Steps to obtain thread stack trace using kdb
Using the alog process as an example.

1) Start script session to capture data:
# script /tmp/kdb.out

2) Find the process id and convert it into hexadecimal:

# ps -ef | grep alog
UID PID PPID C STIME TTY TIME CMD
root 1231 1 1 Jun 30 - 1:12 alog

Convert 1231 to Hexadecimal number
1231 converts to 4CF

3) Start kdb

# kdb

4) Locate the process while in kdb

(0) p * | grep 4CF

Ex.
pvproc+013800 78 alog ACTIVE 004E036 004A01E
0000000002525400 0 0001

5) find initial thread
(0) p (PSLOT) | grep pvthread [The pslot is the second
column. In the above example, it is 78]

6) locate initial thread in 'p' output
example:

...
THREAD..... threadlist :EA005E00
...

7) list function stack for initial thread
(0) f pvthread+005E00

8) Exit out of the script session
# exit
Data will be saved in /tmp/kdb.out.


The procstack command can also be used to print the stack of a process.

# ps -ef | grep alog
root 491752 450572 0 15:45:52 pts/4 0:00 alog

# procstack 491752
491752: alog
0xd0375da4 read(??, ??, ??) + 0x1a8
0x10001500 main(??, ??) + 0x11b0
0x10000198 __start() + 0x98

JFS2 Snapshot Quick Reference

Question
This document is a quick guide to using snapshots of JFS2 filesystems


Answer
The JFS2 snapshot command will create an image of a filesystem at a point in time, allowing the user to back up data from the snapshot rather than from the original filesystem. This allows backing up data without having to stop using it first.
The concept used in the snapped filesystem is "copy on write". During creation of the snapshot filesystem the source filesystem is quiesced while the copy is made, to insure a proper copy. Then only the filesystem structure is created. When any modification is done to the source system, such as a write of data or delete, the original data is copied into the snapped filesystem.

Usually a snapshot filesystem will only need to be 2-6% of the size of the original filesystem, due to this copy-on-write feature.

* Creating a snapshot:
Find out the size of the filesystem:

# lsfs -q /origfs
Name Nodename Mount Pt VFS Size Options Auto
Accounting
/dev/fslv02 -- /origfs jfs2 4194304 rw,cio no
no
(lv size: 4194304, fs size: 4194304, block size: 4096, sparse files: yes, inline log: no, inline log size: 0, reserved: 0, reserved: 0, DMAPI: no, VIX: yes)

In the lsfs -q output the size is reported in 512-byte blocks. So in the above example the filesystem and logical volume are 2Gb in size. We'll make the snapshot filesystem 204Mb (10% of the original).

# snapshot -o snapfrom=/origfs -o size=419430
Snapshot for file system /origfs created on /dev/fslv05

* Mounting a snapshot:
# mount -v jfs2 -o snapshot /dev/fslv05 /mysnap

* Finding out if a fs has a snapshot already:
# snapshot -q /origfs

Snapshots for /origfs
Current Location 512-blocks Free Time
* /dev/fslv05 419430 418662 Fri Apr 21 08:30:36 PDT 2006

* Deleting a snapshot:

# snapshot -d /dev/fslv05
rmlv: Logical volume fslv05 is removed

For further information see the man page for the snapshot command.

Friday, May 22, 2009

Replacing a disk in an SSA RAID5 Array

Replacing a disk in an SSA RAID5 Array


Environment

OS level: 4.3.x - 5.x
SSA Raid 5 Array

Problem

How do I replace a disk in an SSA RAID5 array?

Solution

If the disk has not been rejected from the array:
Enter smitty ssaraid and select the following:
--> Change Member Disks in an SSA RAID Array
--> Remove a disk from an SSA RAID Array
--> Select the array in question and remove pdisk#...

The following steps apply to both rejected and non-rejected disks:
2) Have the CE physically replace the disk (he should set it in service mode).
3) rmdev -dl pdisk# ; cfgmgr -vl ssar
4)Enter smitty ssaraid and select the following:
--> Change/Show use of an ssa physical disk
--> Change the new pdisk's "current use" to Array Candidate.
5) smitty ssaraid
--> Change Member Disks in an SSA RAID Array
--> Add a disk to an SSA RAID Array
--> Add the new pdisk definition to the array

This definition should now be in a "degraded" state. After adding the new disk the array will go into a "Rebuilding" state, and ultimately a "Good" state after the rebuild operation is complete. This progress can be monitored via:

smitty ssaraid
--> List Status of all Defined SSA RAID Arrays
--> These numbers will get smaller as the array rebuilds and once they all go to zero, the array should be in a "Good" State"

This menu does not update dynamically, you will have to exit out, then go back in to see the progress.

Wednesday, May 06, 2009

Determine which process is using a specific network port on AIX with or without lsof

Method 1. Using lsof.

It will be easy if you have lsof installed.

# lsof -i:32876
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
oracle 135744 oracle7 13u IPv4 0x70bbe200 0t11 UDP loopback:32876

# ps -ef|grep 135744
oracle7 135744 1 0 Apr 21 - 2:45 ora_pmon_ftc_p01

Method 2. Using netstat and rmsock

# netstat -Aan|grep 9991
f100020000626b98 tcp4 0 0 *.9991 *.* LISTEN

# rmsock f100020000626b98 tcpcb
The socket 0x626808 is being held by proccess 200928 (sysscand).

#ps -ef|grep 200928
root 200928 1 0 Apr 21 - 0:01 /opt/sysscan/bin/sysscand


Method 3: Using netstat and kdb.

# netstat -Aan|grep 9991
f100020000626b98 tcp4 0 0 *.9991 *.* LISTEN

# kdb
The specified kernel file is a 64-bit kernel
Preserving 1418431 bytes of symbol table
First symbol __mulh
START END
0000000000001000 0000000003E0D050 start+000FD8
F00000002FF47600 F00000002FFDC940 __ublock+000000
000000002FF22FF4 000000002FF22FF8 environ+000000
000000002FF22FF8 000000002FF22FFC errno+000000
F100070F00000000 F100070F10000000 pvproc+000000
F100070F10000000 F100070F18000000 pvthread+000000
PFT:
PVT:
id....................0002
raddr.....0000000000724000 eaddr.....F200800030000000
size..............00040000 align.............00001000
valid..1 ros....0 fixlmb.1 seg....0 wimg...2
ERROR: Unable to acess nfs_syms

(0)> sockinfo f100020000626b98 tcpcb
.................
..............

on last a few lines.

proc/fd: 49/0
proc/fd: fd: 0
SLOT NAME STATE PID PPID ADSPACE CL #THS

pvproc+00C400 49*sysscand ACTIVE 00310E0 0000001 00000000285C7400 0 0001



(0)> hcal 00310E0
Value hexa: 000310E0 Value decimal: 200928

(0)> quit

# ps -ef|grep 200928
root 200928 1 0 Apr 21 - 0:01 /opt/sysscan/bin/sysscand

Wednesday, April 29, 2009

Backupios Fails with 0512-008 savevg

Problem(Abstract)
Backupios command fails with 0512-008 savevg: The mkvgdata command failed. Backup canceled.
Symptom
$ backupios -file /home/padmin/mksysb/ibm74vioa_mksysb -mksysb


/home/padmin/mksysb/ibm74vioa_mksysb doesn't exist.

Creating /home/padmin/mksysb/ibm74vioa_mksysb
Backup in progress. This command can take a considerable amount of time
to complete, please be patient...


Creating information file (/image.data) for rootvg.
0512-008 savevg: The mkvgdata command failed. Backup canceled.

/usr/bin/mkvgdata[1068]: -: more tokens expected


Cause
This error is caused by having a user created filesystem mounted within rootvg.

Resolving the problem
Unmount all user-created filesystems in rootvg and re-run backupios command.

Monday, April 27, 2009

Mail stucked in /var/spool/mqueue

Problem:
Thousands of mails are stucked in /var/spool/mqueue

Solution:

Manually test sendmail:

sendmail -v -q
Warning: .cf file is out of date: sendmail AIX5.3/8.13.4 supports version 10, .cf file is version 9

Running /var/spool/mqueue/n3RLGNaZ195422 (sequence 1 of 30)
dtuser... Connecting to local...
dtuser... Deferred: local mailer (/bin/bellmail) exited with EX_TEMPFAIL

Running /var/spool/mqueue/n3RLHQDC198652 (sequence 2 of 30)
dtuser... Connecting to local...
dtuser... Deferred: local mailer (/bin/bellmail) exited with EX_TEMPFAIL


Check permission of /var/spool/mail and /var/spool/mqueue

ls -ld /var/spool/mail
drwxr-xr-x 2 bin mail 512 Jul 30 2007 /var/spool/mail
ls -ld /var/spool/mqueue
drwxrwx--- 2 root system 6376448 Apr 27 14:47 /var/spool/mqueue

Permission of /var/spool/mail should be 775.

chmod 775 /var/spool/mail

Now problem is solved.

sendmail -v -q
Warning: .cf file is out of date: sendmail AIX5.3/8.13.4 supports version 10, .cf file is version 9

Running /var/spool/mqueue/n3RLYND7164390 (sequence 1 of 32)
dtuser... Connecting to local...
dtuser... Sent

Running /var/spool/mqueue/n3RLZQLo185340 (sequence 2 of 32)
dtuser... Connecting to local...
dtuser... Sent

Running /var/spool/mqueue/n3RLaUAI198578 (sequence 3 of 32)
dtuser... Connecting to local...
dtuser... Sent

Running /var/spool/mqueue/n3RLbWZV198618 (sequence 4 of 32)
dtuser... Connecting to local...
dtuser... Sent

Friday, April 24, 2009

Reconfigure the console on AIX

Problem:

When use vtmenu or mkvterm on the HMC to establish a console session, the console is blank.

Solution:


To completely remove vsa0 and vty0 from ODM and have system come up on
reboot and prompt you to set this terminal as your console.

If you have network access you can do this from a telnet or ssh session
If you have no network access you will need to boot into Maintenance
Mode.

- List all vty's and tty's on system
# lsdev -Cc tty

- Delete all vty's and tty's from ODM

# odmdelete -q name=tty0 -o CuDv <---- run this command for
all vty's and tty's
0518-307 odmdelete: 1 objects deleted.

- List all vsa's on system
# lsdev -Cc adapter | grep vsa

- Delete all vsa's from ODM

# odmdelete -q name=vsa0 -o CuDv <---- run this command
for all vsa's and sa's
0518-307 odmdelete: 1 objects deleted.

# odmdelete -q attribute=syscons -o CuAt
0518-307 odmdelete: 1 objects deleted.

# bosboot -ad /dev/ipldevice
bosboot: Boot image is 23794 512 byte blocks.

# sync

# savebase

# shutdown -Fr

Define your console.


******* Please define the System Console. *******

Type a 2 and press Enter to use this terminal as the
system console.

Wednesday, April 22, 2009

Why nobody user has -2 as uid on AIX

nobody:!:-2:-2:System Id :/:/bin/false

In the early days of unix, when they started creating common users, like root and admin and sys, the defaulted their ids as certain number so they would be common over all unix systems. They all had to create other accounts like nobody and created the id as -2, meaning that it is not a real id. (If you look at the /etc/security/passwd you will see they don't actually have a password.)

They had created this -2 in a 32 bit world. -2 is actually the twos compliment of 4294967294 in a 32 bit world. They are actually the same number. However, some programs thought that ids would only be positive and thus would reject the -2. Later versions of UNIX would allow both -2 and 4294967294 to mean the same thing. Some programs will only accept 4294967294. Which is why they have recently started to default the number to 4294967294, which by the way, is also double the maximum
number you are allow to put into that field.

In short, -2 and 4294967294 are the same number and can be swapped back and forth at will. Why they are different on different machines is propably due to the different levels of AIX that they are and when those files were made. It is also possible that some programs will change those numbers themselves. For instance, mkuser will allow you to add a user to the nobody group and even if the nobody group is 4294967294, it will change it to -2.

Saturday, April 18, 2009

Unable to uninstall bos.dlc.qllc

  installp -pgu bos.dlc.qllc
*******************************************************************************
installp PREVIEW: deinstall operation will not actually occur.
*******************************************************************************

+-----------------------------------------------------------------------------+
Pre-deinstall Verification...
+-----------------------------------------------------------------------------+
Verifying selections...done
Verifying requisites...done
Results...

FAILURES
--------
Filesets listed in this section failed pre-deinstall verification
and will not be removed.

Non-Deinstallable Filesets
--------------------------
The following filesets were selected for deinstallation. Deinstallability
checks indicate that they should not be removed from the system.

bos.dlc.qllc

<<>>

FILESET STATISTICS
------------------
1 Selected to be deinstalled, of which:
1 FAILED pre-deinstall verification
----
0 Total to be deinstalled


******************************************************************************
End of installp PREVIEW. No deinstall operation has actually occurred.
******************************************************************************
sacrs40:/etc# installp -gu bos.dlc.qllc
+-----------------------------------------------------------------------------+
Pre-deinstall Verification...
+-----------------------------------------------------------------------------+
Verifying selections...done
Verifying requisites...done
Results...

FAILURES
--------
Filesets listed in this section failed pre-deinstall verification
and will not be removed.

Non-Deinstallable Filesets
--------------------------
The following filesets were selected for deinstallation. Deinstallability
checks indicate that they should not be removed from the system.

bos.dlc.qllc

<<>>

FILESET STATISTICS
------------------
1 Selected to be deinstalled, of which:
1 FAILED pre-deinstall verification
----
0 Total to be deinstalled


Pre-installation Failure/Warning Summary
----------------------------------------
Name Level Pre-installation Failure/Warning
-------------------------------------------------------------------------------
bos.dlc.qllc Failed pre-deinstallation check

Solution:

You need to remove the device first then uninstall the fileset

# lsdev -C|grep dlcq
dlcqllc Available X.25 QLLC Data Link Control

installp -gu bos.dlc.qllc
+-----------------------------------------------------------------------------+
Pre-deinstall Verification...
+-----------------------------------------------------------------------------+
Verifying selections...done
Verifying requisites...done
Results...

SUCCESSES
---------
Filesets listed in this section passed pre-deinstall verification
and will be removed.

Selected Filesets
-----------------
bos.dlc.qllc 5.3.7.0 # X.25 QLLC Data Link Control

<<>>

FILESET STATISTICS
------------------
1 Selected to be deinstalled, of which:
1 Passed pre-deinstall verification
----
1 Total to be deinstalled

+-----------------------------------------------------------------------------+
Deinstalling Software...
+-----------------------------------------------------------------------------+

installp: DEINSTALLING software for:
bos.dlc.qllc 5.3.7.0

Finished processing all filesets. (Total time: 1 secs).

+-----------------------------------------------------------------------------+
Summaries:
+-----------------------------------------------------------------------------+

Installation Summary
--------------------
Name Level Part Event Result
-------------------------------------------------------------------------------
bos.dlc.qllc 5.3.7.0 ROOT DEINSTALL SUCCESS
bos.dlc.qllc 5.3.7.0 USR DEINSTALL SUCCESS

Friday, April 17, 2009

ssh_exchange_identification: Connection closed by remote host

Problem:

After upgrading openssh to version 5 on AIX server. Got the following error when trying to ssh into it.


$ ssh -l userid server
ssh_exchange_identification: Connection closed by remote host


Cause:

Somebody installed TCP wrapper which create a /etc/hosts.allow file with sample setting in it.


# cat /etc/hosts.allow
ALL: LOCAL @some_netgroup
ALL: .foobar.edu EXCEPT terminalserver.foobar.edu
telnetd: toto@foo.foobar.edu, [3ffe:302:100::]

Solution:

Modify the /etc/hosts.allow to allow ALL
# cat /etc/hosts.allow
ALL:ALL

Restart sshd,

stopsrc -s sshd ; startsrc -s sshd


problem fixed.

Monday, April 13, 2009

FAQ: Patching for the Solaris OS

From Sun site:
http://www.sun.com/bigadmin/sundocs/articles/patch-faq.jsp?cid=e8406

Now possible to upgrade directly from Solaris 8 SPARC to latest Solaris 10 release

See http://sunsolve.sun.com/search/document.do?assetkey=1-9-250526-1 and http://sunsolve.sun.com/search/document.do?assetkey=1-61-72099-1 for details.

Previously, due to the lack of p7zip on Solaris 8, customers needed to perform an interim upgrade to Solaris 9 or an earlier Solaris 10 release before upgrading to the latest Solaris 10 release.

Cfgmgr does not find a device

Question
Devices discovery troubleshooting with alog -t cfg


Cause
Device discovery for devices can be difficult when minimal information is available.


Answer
Device discovery on AIX.
Starting with AIX 5.2 ML05 and AIX 5.3 ML01 there is an ability to log information via the alog utility for the cfg methods. Depending on the OS version and maintenance level the amount of detail that can be logged vary.

One key thing is the verbosity level. If the level is high enough the SCSI id and LUN are reported as a discovered device. If an open is done on the device the SCIOSTART is used.


echo "Create cfglog `date`"|alog -t cfg

export CFGLOG="cmd,meth,lib,verbosity:9"

cfgmgr -l

alog -o -t cfg > /tmp/cfgmethod.log

Send /tmp/cfgmethod.log to IBM support.

To turn logging off:

unset CFGLOG

or

exit

bosboot warning message

Problem:

On AIX 5.2 server, got warning message which means scary when building boot image on hdisk0.

aixserver:/root# bosboot -ad /dev/hdisk0

bosboot: Boot image is 24922 512 byte blocks.

***** ATTENTION *****
The boot image you just created might fail to boot because
the size exceeds the system limit. For information about
fixes or workarounds, see /usr/lpp/bos.sysmgt/README.
***** ATTENTION *****

aixserver:/root# oslevel -s
5200-10-06-0835


Solution:

Since the boot image is over the 12Mb line, you will see this warning.
Older systems cannot handle a large boot image like this, but with the
latest system firmware and at your 5.2 ML 8 this server will boot up
fine, as you have the necessary APARs installed to boot from the larger
image.

You will still see this warning however when you run bosboot or if
mksysb runs bosboot, but you may ignore it. You may also see this on
other systems once the boot image has grown past 12Mb, such as with
adding new disks or adapters to the system.
Check the system firmware level, this server is at SF240_284, which support boot image greater than 12MB. So we can ignore this warning message.

# lsmcode
┌──────────────────────────────────────────────────────┐
│ │
│ Building Resource Database. │
│ Please stand by. │
└──────────────────────────────────────────────────────┘
DISPLAY MICROCODE LEVEL 802811

Determining Microcode levels.......

Please stand by.

DISPLAY MICROCODE LEVEL 802811
IBM,9117-570

The current permanent system firmware image is SF240_284
The current temporary system firmware image is SF240_284
The system is currently booted from the temporary firmware image.

Saturday, March 28, 2009

Getty and Login relationship in AIX

Question
Explanation of the relationship between the getty and login programs in AIX.

Answer

In AIX the programs for getty and login are really the same binary: they are
hard or symbolic links to a program called "Terminal State Manager", or tsm.

The fileset that contains the tsm binary and creates some of these links
is bos.rte.security.



The tsm binary checks to see what name it was called by (arg 0) and behaves differently depending on this.



$ ls -li /etc/getty /usr/sbin/getty /usr/bin/login /bin/login \
/usr/sbin/login /usr/sbin/tsm

4406 lrwxrwxrwx 1 root security 13 Sep 06 09:09 /bin/login -> /usr/sbin/tsm
1096 lrwxrwxrwx 1 root security 13 Oct 04 10:35 /etc/getty -> /usr/sbin/tsm
4406 lrwxrwxrwx 1 root security 13 Sep 06 09:09 /usr/bin/login -> /usr/sbin/tsm
204 -r-sr-xr-x 3 root security 59422 May 18 15:09 /usr/sbin/getty
204 -r-sr-xr-x 3 root security 59422 May 18 15:09 /usr/sbin/login
204 -r-sr-xr-x 3 root security 59422 May 18 15:09 /usr/sbin/tsm



If the symbolic or hard links are broken, logins may not work correctly.


WHERE IS /ETC/GETTY?



By default most system installs will not include /etc/getty. This file is
part of the fileset bos.compat.links. This fileset simply provides symbolic
links. For example:
 

root# lslpp -l bos.compat.links
bos.compat.links 5.3.0.30 COMMITTED AIX 3.2 to 4 Compatibility

root# lslpp -f bos.compat.links
Fileset File
-----------------------------------------------------------------
Path: /usr/lib/objrepos
bos.compat.links 5.3.0.30

/usr/ucb/fmt -> /usr/bin/fmt
/usr/bin/lsnamsv -> /usr/sbin/lsnamsv
/usr/bin/chroot -> /usr/sbin/chroot
/usr/ucb/fold -> /usr/bin/fold
... excess deleted ....


How can I move my DVD-ROM or CD-ROM drive from one LPAR to another?

Question

How can I move my DVD-ROM or CD-ROM drive from one LPAR to another?


Answer

If you don't know which LPAR owns the CD-ROM drive, use the HMC manager or WEBSM tool.
Select the managed system and open "Properties".
Select the "I/O" tab. Look for the I/O device with the description "Other Mass Storage Controller" and read the "Owner" field. This will show the LPAR currently owning that device.

ON THE SOURCE SYSTEM:

1. Find the parent adapter of the DVD or CD device:


$ lsdev -Cl cd0 -F parent
ide0

2. Find the slot containing the IDE bus:

$ lsslot -c slot
# Slot Description Device(s)
U787B.001.DNWG2AB-P1-T16 Logical I/O Slot pci1 ide0
U9133.55A.105C2EH-V7-C0 Virtual I/O Slot vsa0
U9133.55A.105C2EH-V7-C2 Virtual I/O Slot ent0
U9133.55A.105C2EH-V7-C3 Virtual I/O Slot vscsi0

so PCI1 is the slot containing the IDE adapter and CD drive.

3. Remove the slot from this host:

# rmdev -dl pci1 -R
cd0 deleted
ide0 deleted
pci1 deleted


ON THE HMC:

Select the LPAR currently owning the CD-ROM, and in the Actions menu select:
Dynamic Logical Partitioning -> Physical Adapters -> Move or Remove
Select the adapter for "Other Mass Storage Controller" and move to the desired target LPAR.
This will perform a DLPAR operation on both the source and target LPAR.


ON THE TARGET SYSTEM:

Log in as root and run
# cfgmgr

The CD-ROM device should show up now
# lsdev -C | grep cd
cd0 Available 1G-19-00 IDE DVD-ROM Drive

Hard-Luck Editing the /etc/inittab File in Maintenance Mode

Hard-Luck Editing the /etc/inittab File in Maintenance Mode



Problem(Abstract)
This technote describes a technique for creating a minimal /etc/inittab file if no other tools are available.


Cause
A bad entry in the /etc/inittab is keeping the system from booting properly.


Resolving the problem
Ordinarily if there is a problem with one or more entries in the /etc/inittab the preferred method of editing it is:

1. Boot into Maintenance Mode off AIX install CDs, mksysb, or NIM

2. Access the rootvg and start a shell with the filesystems mounted.

3. Edit /etc/inittab down to a minimum 3 lines:


init:2:initdefault:
brc::sysinit:/sbin/rc.boot 3 >/dev/console 2>&1 # Phase 3 of system boot
cons:0123456789:respawn:/usr/sbin/getty /dev/console

In cases where the rootvg filesystems cannot be mounted automatically (for example the CD media is a different Technology Level than what exists on hard disk; or the filesystems for some reason won't automatically mount), commands such as the "vi" editor won't be available to edit the inittab.

In this case a hard-luck method can be used to create a minimal inittab.

1. Boot into Maintenance Mode and choose Option 2 "Access rootvg and start a shell before mounting filesystems".

2. Once in Maintenance Mode, fsck all rootvg filesystems necessary:

# fsck /dev/hd1
# fsck /dev/hd2
# fsck /dev/hd3
# fsck /dev/hd4
# fsck /dev/hd9var

3. Mount root on a temporary mount point:

# mount /dev/hd4 /mnt

4. Copy the bad inittab to a backup:

# cd /mnt/etc
# mv inittab inittab.bad

5. Use grep to create a minimal new inittab:

# grep "init:" inittab.bad > inittab (adds both the init: and brc: entries)
# grep "^cons:" inittab.bad >> inittab (adds the cons: entry)

6. Reboot using the new inittab:
# sync; sync; sync
# cd /
# umount /mnt
power cycle the system from the front panel or HMC

Querying filesystem information used in mouting a filesystem

Question

This technote lists some methods to check information used in mounting a filesystem.


Answer

If you are encountering problems with the mount command and filesystems, make sure to check multiple sources of information about the filesystem and compare them.

For example, if encountering the mount error:


mount: 0506-324 Cannot mount /dev/lv06 on /filesystem06:
A system call received a parameter that is not valid.

This may be due to an inconsistency between the information in /etc/filesystems, the Logical Volume Control Block (LVCB), and the superblock of the filesystem.

To check the LVCB directly, use:

# /usr/sbin/getlvcb -AT

example:

# getlvcb -AT fslv00
AIX LVCB
intrapolicy = m
copies = 2
interpolicy = m
lvid = 0007b53c00004c00000001122a1ec0fd.2
lvname = fslv00
label = /myfilesystem
machine id = 7B53C4C00
number lps = 4
relocatable = y
strict = y
stripe width = 0
stripe size in exponent = 0
type = jfs2
upperbound = 32
fs = vfs=jfs2:log=/dev/loglv00:options=rw:account=false
time created = Fri May 4 08:46:00 2007
time modified = Mon May 21 15:04:24 2007

To check the superblock, use

# /usr/sbin/lsfs -q /dev/

example:

# lsfs -q /myfilesystem
Name Nodename Mount Pt VFS Size Options Auto Accounting
/dev/fslv00 -- /myfilesystem jfs2 524288 rw no no
(lv size: 524288, fs size: 524288, block size: 4096, sparse files: yes, inline log: no, inline log size: 0,

reserved: 0, reserved: 0, DMAPI: no, VIX: no)


If the filesystem is a JFS2 filesystem, the same information can be printed in a less-readable format by using:

# /usr/sbin/lsjfs2 /

example:
# lsjfs2 /myfilesystem
#MountPoint:Device:Vfs:Nodename:Type:Size:Options:AutoMount:Acct:OtherOptions:LvSize:FsSize:

BlockSize:Sparse:InlineLog:InlineLogSz:Reserved:Reserved:DMAPI:VIX:
/myfilesystem:/dev/fslv00:jfs2:::524288:rw:no:no::524288:524288:4096:yes:no:0:0:0:no:no:


Also, check the stanza within /etc/filesystems to confirm the information matches the superblock data:

# grep -p /etc/filesystems

example:

# grep -p /myfilesystem /etc/filesystems
/myfilesystem:
dev = /dev/fslv00
vfs = jfs2
log = /dev/loglv00
mount = false
options = rw
account = false


PLEASE NOTE: /usr/sbin/getlvcb and /usr/sbin/lsjfs2 are undocumented, low-level commands.

0516-008 varyonvg: LVM system call returned an unknown error code (3).

Problem:

The system was rebooted itself and they can't varyon
a volume group:
varyonvg vgss01page
0516-008 varyonvg: LVM system call returned an unknown
error code (3).

Solution:

lsvg -o -> not variedon
lspv:

hdisk2 000df0af41b969ae vgss01page
hdisk3 000df0af3ca7e15f vgss01page

lquerypv -h /dev/hdisk2 80 10
00000080 000DF0AF 41B969AE 00000000 00000000 |....A.i.........|

lquerypv -h /dev/hdisk3 80 10
00000080 000DF0AF 3CA7E15F 00000000 00000000 |....<.._........|

lqueryvg -Atp hdisk2 and hdisk3 gives the proper information except for
Physical: 000df0afc5256113 1 0 which is not part of the vg

chpv -va hdisk2 -> 0516-010 lqueryvg: Volume group must be varied on;
use varyonvg command.
0516-722 chpv: Unable to change physical volume hdisk2.

chpv -va hdisk3 -> 0516-010 lqueryvg: Volume group must be varied on;
use varyonvg command.
0516-722 chpv: Unable to change physical volume hdisk3.

exportvg vgss01page -> ok
rmdev -dl hdis2 -> ok
rmdev -dl hdisk3 -> ok

cfgmgr -> hanging for a while but completed
importvg -y vgss01page hdisk2 ->

0516-304 getlvodm: Unable to find device id 000df0afc5256113 in the
Device
Configuration Database.
PV Status: hdisk2 000df0af41b969ae PVACTIVE
hdisk3 000df0af3ca7e15f PVACTIVE
000df0afc5256113 NONAME
varyonvg: Volume group vgss01page is varied on.
0516-510 synclvodm: Physical volume not found for physical volume
identifier 000df0afc52561130000000000000000.
0516-548 synclvodm: Partially successful with updating volume
group vgss01page.
vgss01page
PV Status: hdisk2 000df0af41b969ae PVACTIVE
hdisk3 000df0af3ca7e15f PVACTIVE
000df0afc5256113 NONAME
varyonvg: Volume group vgss01page is varied on.
lsvg -l vgss01page
vgss01page:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT
POINT
paging01 paging 271 271 1 closed/syncd N/A

13:39(usehss01:/export/home/root) # uptime
01:41PM up 5:51, 5 users, load average: 0.03, 0.04, 0.05
13:41(usehss01:/export/home/root) #

sysdumpdev -L
0453-039

Device name: /dev/sysdumpnull
Major device number: 7
Minor device number: 2
Size: 0 bytes
Date/Time: Wed Dec 31 19:00:00 EST 1969
Dump status: -1
no dump device defined

# sysdumpdev -l
primary /dev/sysdumpnull
secondary /dev/sysdumpnull
copy directory /var/adm/ras
forced copy flag TRUE
always allow dump TRUE
dump compression OFF

sent customr a technote procedure to create a valid dump device

reducevg -d vgss01page 000df0afc5256113

reducevg -d vgss01page 000df0afc5256113
0516-304 putlvodm: Unable to find device id
000df0afc52561130000000000000000 in the Device
Configuration Database.
0516-896 reducevg: Warning, cannot remove physical volume
000df0afc5256113 from Device Configuration Database.

lsvg -p vgss01page
vgss01page:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE
DISTRIBUTION
hdisk2 active 271 0
00..00..00..00..00
hdisk3 active 542 542
109..108..108..108..109

swapon -a to actvate the paging space

Friday, March 27, 2009

Remove IP Configuration for enX Device

The procedure is to remove IP configuration from en1 device on AIX.

  1. Use the ifconfig command to disable and remove the interface from the network. Enter:
    ifconfig en1 down detach
  2. Remove device from the system with rmdev command. Enter:
    rmdev -dl en1

Thursday, March 26, 2009

Procedure to change NIC speed

The example is to change NIC ent0 speed from 100Mb/s to 1Gb/s.

1. Work with network to have Ethernet switch port ready and lay network cable.

2. Bring down application and DB if need.

3. Swap cables

4.
chdev -l en0 -a state=detach
chdev -l ent0 -a media_speed=1000_Full_Duplex
chdev -l en0 -a state=up
mkdev -l inet0


5. Ping test.

Wednesday, March 25, 2009

Cfgmgr does not find a device

Question
Devices discovery troubleshooting with alog -t cfg

Cause
Device discovery for devices can be difficult when minimal information is available.

Answer
Device discovery on AIX.
Starting with AIX 5.2 ML05 and AIX 5.3 ML01 there is an ability to log information via the alog utility for the cfg methods. Depending on the OS version and maintenance level the amount of detail that can be logged vary.

One key thing is the verbosity level. If the level is high enough the SCSI id and LUN are reported as a discovered device. If an open is done on the device the SCIOSTART is used.


echo "Create cfglog `date`"|alog -t cfg

export CFGLOG="cmd,meth,lib,verbosity:9"

cfgmgr -l

alog -o -t cfg > /tmp/cfgmethod.log

Send /tmp/cfgmethod.log to IBM support.

To turn logging off:

unset CFGLOG

or

exit

Tuesday, March 24, 2009

lsdev: 0514-521 Cannot find information in the predefined device configuration database for the customized device iocp0.

Got an error when typing lsdev -C and lscfg command.

# lsdev -C | grep Defined
lsdev: 0514-521 Cannot find information in the predefined device
configuration database for the cu
stomized device iocp0.

# lscfg -vl hdisk0
0519-004 libodm: The specified search criteria is incorrectly formed.
Make sure the criteria contains only valid descriptor names and
the search values are correct.

hdisk0 P2/Z1-A8 16 Bit LVD SCSI Disk Drive (18200 MB)

Manufacturer................IBM
Machine Type and Model......DDYS-T18350M
FRU Number..................00P1520
ROS Level and ID............53423041
Serial Number...............9EGQ4829
EC Level....................F79924
Part Number.................07N3842
Device Specific.(Z0)........000003029F00013A
Device Specific.(Z1)........07N4924
Device Specific.(Z2)........0933
Device Specific.(Z3)........01242
Device Specific.(Z4)........0001
Device Specific.(Z5)........22
Device Specific.(Z6)........F79924

Solution:

1. Backup ODM.
tar -cvf /tmp/ODM.tar /etc/objrepos/


2. Delete the iocp0 device from CuDv
odmdelete -q "name=iocp0" -o CuDv

0518-307 odmdelete: 1 objects deleted.

3. Now it is clean

Friday, March 20, 2009

Use IP alias trick to solve hung NFS mount problem

Problem:
A NFS mount is hanging and it can not be umount even using -f option

Solution:

  • Try to use umount -f and fuser, it does not work
#unmount -f
it does not work then,
#fuser -cuxk
This does not work then use the third party application "lsof"
#lsof -N
Kill the nfs pid

If this does not work either then you have a stale mount and will need
to reboot

  • IP alias trick

On the nfs client:

In this example:
The nfs server ip address is 199.159.207.34
The nfs client ip address is 199.159.247.137

# mount | grep nfs
The nfs export is mounted over mount point /mnt.
199.159.207.34 cdrom /mnt nfs3

# ping 199.159.207.34
Ping hangs...the nfs server is no longer available.

# ps -ef
If possible kill any processes that maybe accessing the mount point.
Such as df,find or a mksysb process.

Alias
the nfs server back to the loopback interface (lo0) on the nfs client.

# ifconfig lo0 alias 199.159.207.34 netmask 255.255.255.255 up

# netstat -in
Should have an additional lo0 listed with a 199.159.207.34 ip address.

# netstat -rn
199.159.207.34 199.159.207.34 UH lo0

Need to remove the route that was added by the ifconfig command from the
routing table.

# route delete -host 199.159.207.34 199.159.207.34

# showmount -e 199.159.207.34
hangs...should be able to show the export list of the nfs client if
there's one available.

The showmount command should hang. Need to add a route using the nfs
server ip and point it back to the lo0.

# route add -host 199.159.207.34 127.0.0.1

# showmount -e
Returns the export list of the client, if the client is exporting
anything, in this case it was also an nfs server so it had an export
list.

# umount /mnt
Successful...able to unmount the hung mount.

# df -k
No longer hangs...

# mount
No nfs mount listed.

Clean up...

# route delete -host 199.159.207.34 127.0.0.1
# ifconfig lo0 -alias 199.159.207.34 netmask 255.255.255.255

HMC CLI to Turn Off Attention LED on System p Servers

Question
What is the HMC v5, v6 and v7 command line to disable attention LED on system p servers


Cause
Hardware errors that occur on a server requiring attention will cause the system attention LED to come on. Manual intervention is required to turn off the attention LED.


Answer

The system attention LED can be disabled using the graphic user interface (GUI) service utility application, but it can be more quickly done using the chled command. The managed system name is needed to run the chled command and the lssyscfg command can be used to retrieve all the managed systems names if you don't already know them.

lssyscfg -r sys -F name

Once you know the managed system name to use in the command line interface (CLI), check to see if the attention LED is active

lsled -r sa -t phys -m
<managed_system>

Should see output similar to, "state=on."

Use the chled command to turn off the system attention LED

chled -r sa -t phys -m <managed_system> -o off

To check the status of system attention LED you can use the lsled

lsled -r sa -t phys -m <managed_system>

Should see output, "state=off."

Raw vs. JFS Logical Volumes I/O

Question
Raw vs. JFS Logical Volumes I/O

Answer

NOTE: This document applies to AIX 5.3 and prior levels.

Question

Does Virtual Memory Manager (VMM) work with raw logical updates, and if so, how? If raw logical volumes do not use block I/O buffer cache, does sync update raw logical volumes or does VMM?

Answer

When an application directly accesses a raw logical volume, the VMM is not involved. The VMM is involved when accessing the Journaled File System (JFS). sync only updates JFS, so neither sync nor VMM updates raw logical volumes. All writes to raw logical volumes are synchronous, which means that the writes do not return until the data has made it to disk and therefore does not require a sync.

How can I suppress the telnet login message (hostname) information when a user telnets to an AIX server?

To modify the default telnet banner...


1) Display the message catalog and redirect to a file...






# dspcat -g /usr/lib/nls/msg/en_US/telnetd.cat > /tmp/telnetd.msg






2) Modify any message(s) you wish changed in /tmp/telnetd.msg

Remove the (%s) after the first telnet you see in this file...

Change this...
telnet (%s)\r\n"

To this...
telnet \r\n"

Save the file....

3) Generate a new message catalog /tmp/telnetd.cat using the modified file as imput...

# gencat /tmp/telnetd.cat /tmp/telnetd.msg


4) Backup the original message catalog file /usr/lib/nls/msg/en_US/telnetd.cat, and
replace it with /tmp/telnetd.cat





# cp /usr/lib/nls/msg/en_US/telnetd.cat/usr/lib/nls/msg/en_US/telnetd.cat.save
# cp /tmp/telnetd.cat /usr/lib/nls/msg/en_US/telnetd.cat




Telnet should now only display the word telnet and exclude the hostname.

Using netstat and rmsock to Identify Processes Using the Default Gateway

Question

Is there a way to use netstat to find processes that are heavily using the default gateway?

Answer

You can use netstat and rmsock in combination to help find processes that are actively using the default gateway.

If path MTU discover is not enabled then temporarily enable it so you can get more information when using netstat. These are commands to enable the path MTU discover:

no -o tcp_pmtu_discover=1
no -o udp_pmtu_discover=1

The next step involves running netstat -rn and looking for the highest use count on the cloned route entries (those with a W flag - reference example 1).

Example 1

$ netstat -rn | grep -E "Use|UGHW"
Destination Gateway Flags Refs Use If PMTU Exp
Groups
9.0.7.1 9.41.166.1 UGHW 1 7 en2 - -
9.12.136.110 9.41.166.1 UGHW 2 123 en2 - -
9.17.183.166 9.41.166.1 UGHW 1 5 en2 1500 -
9.41.167.106 9.41.166.1 UGHW 1 3 en2 - -
9.41.167.182 9.41.166.1 UGHW 1 3373 en2 1500 -

In example 1 above, the destination address 9.41.167.182 has the highest use count (3373).

Next, check for any active sockets related to IP address 9.41.167.182 using the netstat -Aan command (see example 2):

Example 2

$ netstat -Aan | grep 9.41.167.182
705b21e4 tcp4 0 0 9.41.166.74.139 9.41.167.182.1039 ESTABLISHED

Use the process control block address (705b21e4) from the netstat -Aan output in example 2 with the rmsock command to find a process ID associated with the socket.

Example 3

# rmsock 705b21e4 tcpcb
The socket 0x705b2000 is being held by proccess 9394 (smbd).

With the help of netstat and rmsock in the preceding three examples, you were able to find a specific smbd process that had the most activity relative to sending data over the default gateway.

Labels

Blog Archive

BlogCatalog