AIX (Advanced Interactive eXecutive)

From Tecniq
Jump to: navigation, search

The AIX® operating system is designed to deliver outstanding scalability, reliability, and manageability.
AIX is an open, standards-based operating system that conforms to The Open Group's Single UNIX Specification Version 3. It provides fully integrated support for 32- and 64-bit applications. The AIX operating system provides binary compatible support for the entire IBM UNIX product line including IBM Power™ Systems, System p™, System i™, pSeries®, iSeries™ servers as well as the BladeCenter® JSxx blade servers and IntelliStation® POWER™ workstations. AIX also supports qualified systems offered by hardware vendors participating in the AIX Multiple Vendor Program.


AIX Situations and Solutions.

Have you found yourself in a situation where your only help is to search forum after forum for a solution?

As a guideline, here are a few resolutions to some of situations we have encountered.


Example 1:

You are trying to test your DR strategy and you shut down the AIX server, swap the roles of 2 HP storage arrays, and then restart the AIX server. NOTE: The disks on one HP storage array are being replicated to another HP storage array at a separate location using utilities on the storage array.
Because the disks are now seen to be coming from a different array, they are created as separate disks on the AIX server and the application cannot access the file systems on the disk.

Resolution - Determine whether or not the datavg volume group is varied on. If it is not, try varying it on using the force option, since AIX may now believe that there should actually be 2 disks in the volume group, and because quorum is enabled, it will not be activated. If this fails, it is maybe necessary to export/import the volume group, although importvg -L may also work.
If this is an HACMP cluster, you may consider using LVM mirroring between the sites in order that the DR Failover could be automatic rather than requiring manual intervention.


Example 2:

“hdisk1 showing missing!”

Resolution – Try the process as follows:

• for each mirrored LV on hdisk1 do:

rmlvcopy <LVName> 1 hdisk1

• for the non mirrored dump LV do:

rmlv <LVName>

you will be asked to confirm.
 • remove the disk from rootvg:

reducevg rootvg hdisk1

• delete the disk from the system:

rmdev -l hdisk1 -d

• re-add the disk:

cfgmgr -v

• bring the disk back into rootvg:

extendvg rootvg hdisk1

• remirror the LV's:

mklvcopy <LVName> 2 hdisk1

• resync the volume group:

syncvg -v rootvg

followed by,

synclvodm -v rootvg

• add the non mirrored dump device:

mklv -t sysdump -y <LVName> rootvg <No of Partitions> hdisk1

• refresh the boot sectors on both disks:

bosboot -ad hdisk<N>

Example 3:

Trying to start sendmail with the command “startsrc –s sendmail” which appears to complete but errors are logged and the service is not available.

Resolution – Try using the following command to start sendmail:

startsrc -s sendmail -e -bd -q3m


Example 4:

You need to boot from the perm firmware partition rather than temp (or vice versa)


• On the lcd panel press the "UP" arrow key once.• This should change the number on the left hand side of the panel to "02".

• Press the middle button once and more information will be displayed.

• Press the middle button twice more which should take the chevron next to the P (or T depending on which system you’re on).

• Press the "UP" arrow key and this should change the setting.

• To quit out press middle followed by down which should change the number in the left hand corner to 01.

• Press the middle again and you should be back to the original screen.


Example 5:

You have Three nodes (2 x RAC application + 1 x DR). All have valid /etc/ntp.conf (entries for ntp servers in place and valid). The Application is running on node2 and the advice is to ensure that no single time change should exceed 60 seconds or RAC could go mental.
A time check on each node, gives the following results:
• node 1 was closest to correct ntp time.
• node 2 was about +5mins:30seconds
• node 3 was about +4 mins: 30 seconds.


Resolution - As ntp would reset all closest to node1; adjust nodes 2 and 3 using date -a <xx> where x is time in seconds. E.g. Node 2: date -a -330
Node 3: date -a -270
This drifts the time by about 1 second every 10 seconds. After 1 hour all nodes should be showing similar times.
Uncomment the xntpd startup from /etc/rc.tcpip on all nodes and then start xntpd by hand on them:
startsrc -s xntpd
After checking again after a few minutes - all nodes should now be synchronised.

 Further Information 

There are many issues you may encounter that could be difficult to find a resolution to.

As an aid to solving some of these situations, we have provided some of the situations we have encountered, and the resolutions taken.


Situation – You need to remirror a partially mirrored lv.

Resolution – Try completing the following:
lquerylv -L `getlvodm -l <LV_Name>` -r > /tmp/mapfile
Remove the entries of the complete mirror from the mapfile (only the partial mirror PPs remain).
Check number of lines in mapfile (wc -l /tmp/mapfile)
lreducelv -l `getlvodm -l <LV_Name>` -s X /tmp/mapfile
NOTE: the -s X indicates the number of pps to be removed. This should be the same as the number of lines in the mapfile.
Re-mirror the LV and run lslv -m <LV_Name> to ensure the PPs in PP1 and PP2 are the same.


Situation – You want to compare the AIX package levels on one system with another.

Resolution - "compare_report" compares the install level of a machine with another or with a recommended level by IBM to compare one machine with another. Create the output with "lslpp -Lc" then run compare_report -b [base file] -o [other file] -l -h -m –n


Situation – You want to know what volume group a disk belongs to that is not currently imported.

Resolution - lqueryvg –Atp hdisk123

Situation – “I need information on 64 bit operation of my system”.

Resolution - Is my system running a 32 or 64 bit kernel?
bootinfo -K
Is my processor capable of running 64bit or just 32?
bootinfo -y


Situation – “I need to add a manual IP alias via command line to AIX!”

Resolution - To create persistent ODM entries
chdev -l en0 -a alias4=,
To remove persistent ODM entries
chdev -l en0 -a delalias4=,
To create temporary entries that will be lost with a reboot (no ODM)
ifconfig en0 netmask broadcast alias
And to remove
ifconfig en0 netmask broadcast delete



Situation – “Show me the top memory hungry processes using ps”.

ps -eo vsz,pcpu,pid,comm,args| sort -n
Situation – “Show me the top CPU hungry processes”
Resolution –
ps -eo vsz,pcpu,pid,comm,args| sort +n1



Situation – Do you need to change keyboard and cultural conventions?

Resolution - smitty chlang



Situation - Using cu to connect from one unix box to another using a null modem cable?

Resolution -
In /etc/uucp/Devices, make sure there is a line for the port you wish to use as follows:
Direct tty1 - 9600 direct
To connect type "cu -l /dev/tty1"
To disconnect "~."

Situation – Want to run X over SSH?

Resolution - Uncomment the following lines in /etc/ssh/sshd_config
X11Forwarding yes
XAuthLocation /usr/bin/X11/xauth
Then re-start the sshd with a -X.

Situation – Wasted CPU cycles on idle LPAR’s?
Virtual processor folding for AIX5.3

AIX 5.3 and above has the ability to switch off management of spare CPU's when the system is idle to prevent CPU cycles being wasted on idle LPAR's


The tunables are set in AIX are in schedo, virtual processor folding

Situation – What are the AIX printing commands?

Resolution – Here are a few examples:
Stop a queue:
#enq -D -P queuename
Start a queue:
#enq -U -P queuename
List all queues and their status:
#enq -sAW
Just a list of queues:
Changing queue remote timeouts, edit the -T parameter (in minutes) on the "backend = /usr/lib/lpd/rembak" line in the /etc/qconfig file.
Ensure that the queue has no active jobs at the time.

AIX DNS Timeouts

The default timeout for AIX is approx 75 seconds. To reduce the time period, set the following variables:
• export RES_TIMEOUT=5
• export RES_RETRY=1
This makes the timeout equal to RES_TIMEOUT value.

Increasing the size of a filesystem

Use the following command:

chfs -a size=<size> /filesystem

• e.g. chfs -a size=100GB /u1 #increases the size of /u1 to 100GB

• chfs -a size=+10M /u1 #increases the size of /u1 by 10MB

If you see the following message:
“Error Message: 0516-787 extendlv: Maximum allocation for logical volume <LV_Name> is 512. “


You have reached the maximum LPs allowed for the logical volume. For example, if the maximum is set to 512, and the PP size is 128MB, you can only have 512 X 128MB of maximum space (i.e. 65536MB). Therefore do the following to increase the maximum allocation:

• Calculate the number of LPs needed = LV Size in MB / LP size in MB

• chlv -x <new_max_lps> <logical_volume>

Moving Physical Partitions between disks.

In the event that you somehow end up with two PPs on the same PV you will need to move one of the offending PPs to a new PV. This can be done with the low level command "lmigratepp" - this is not available on the man pages:

lmigratepp - An object file command that moves a physical partition to a specified physical volume.
Usage: lmigratepp -g VGID -p old_PVID -n old_PPNum -P new_PVID -N new_PNum
-g VGID The VGID of the volume group that contains both the origin and destination physical volumes
-p old_PVID The PVID of the physical volume that contains the physical partition that is to be moved.
-n old_PPNum The physical partition number of the partition that is to be moved.
-P new_PVID The PVID of the physical volume to which the physical partition should be moved.
-N new_PPNum  The destination physical partition number.

 Asyncronous I/O AIO in AIX 6.1

Asynchronous I/O is handled differently under AIX 6.1.Asynchronous I/O is handled differently under AIX 6.1.
Prior to 6.1, AIO is a device whose details are stored in the ODM and managed using the ‘chdev’ command.

From 6.1 and above, AIO is no longer a device, and is managed using the ‘ioo’ command.

AIO is a prerequisite of Oracle, and must be ‘enabled’ prior to installing Oracle.

Prior to AIX 6.1, AIO is enabled as follows:

chdev –l aio0 –aautoconfig=available
mkdev aio0
chdev –l posix_aio0 –aautoconfig=available
mkdev posix_aio0

From 6.1 and above, AIO is activated ‘dynamically’ as and when a program makes a call to AIO, so it is no longer necessary to manually enable AIO. The ‘ioo’ command is used change the properties of AIO only.


Personal tools