AIX tips & tricks

AIX NFS server refuses client to mount share

Make sure that the ip address of the client can be resolved. Adding it to /etc/hosts is enough for it to work.

service agent & ip changes

Shut down the service agent before you change an ip-address; it'll otherwise gets confused.

System can't find libraries while installing RPM

If the system can't find libraries while installing RPM files from e.g. the Linux Toolbox, run /usr/sbin/updtvpkg and then retry.

LPAR with more than 16GB RAM on a 650 (7038-6M2)

One then needs to set the 'small real mode address region' checkbox in the memory configuration screen of the LPAR (on the HMC) or else the LPAR will not start.

Adding an iSCSI target lun to your system

Add a line to /etc/iscsi/targets:
e.g.: 3260
Then run 'cfgmgr -l iscsi0'. After that a new 'hdiskx' should appear:
# lsdev -Cc disk
hdisk0 Available  Virtual SCSI Disk Drive
hdisk1 Available  Other iSCSI Disk Drive

Filesize limits while copying

Do not use cpio when files are bigger then 2GB as it is limited to that file size (due to XPG/4, POSIX.2 standards). Tar is limited to 8GB due to the ustar format.

Find parent of a device

E.g. parent of hdisk0:
lsdev -Cl hdisk0 -F parent

LDAP authentication

mksecldap -c -h $LDAP_SERVER -d $BASE_DN -p $ADMIN_PW -a $ADMIN_USER -A ldap_auth
chsec -f /etc/security/user -s default -a "SYSTEM=LDAP or files"
chsec -f /etc/security/user -s default -a "registry=LDAP"
Add secldapclntd daemon startup to /etc/inittab:
/usr/sbin/mkitab "ldapclntd:2:once: /usr/sbin/secldapclntd >dev/console 2>&1"
For more details check this pdf.

Finding physical location of a disk

When you would like to replace disk (or so) you need to know its physical location.
In this example I'm going to find the physical location of disk hdisk1:
# prtconf | grep '+ hdisk1'
+ hdisk1           U0.1-P2/Z1-A9     16 Bit LVD SCSI Disk Drive (18200 MB)
We now know that the location is U0.1-P2/Z1-A9. Now we can let the system blink a light for that disk. For that, start diag:
  • # diag
  • select "Task Selection (Diagnostics, Advanced Diagnostics, Service Aids, etc.)"
  • select "Identify and Attention Indicators"
  • select your disk, in this example "U0.1-P2/Z1-A9"
  • press enter, a '+' will be displayed
  • press F7 to switch on the light; the '+' will be replaced with an 'I'
Disabling the light:
  • press enter on the selected disk ("U0.1-P2/Z1-A9"), the 'I' will be replaced with a '+'
  • press F7: the '+' will be removed and the light is disabled

Mounting an NFS-share from a Linux-server

You might see (on the AIX system) the following error message:
vmount: operation not permited
If that's the case, you might give:
nfso -o nfs_use_reserved_ports=1
(add -p to make it permanent) a try. It makes your AIX system use priviledged ports (< 1024), sometimes Linux systems enforce the use of those.
One can make the Linux host accept non-priviledged ports by adding the 'insecure' switch to the exported share in /etc/exports.

Compiling and using Postfix 2.5.6 on aix 6.1

Compiling Postfix 2.5.6 requires one small change. At line 215 of the file makedefs insert the following:
      6)      SYSTYPE=AIX5
              case "$CC" in
              cc|*/cc|xlc|*/xlc) CCARGS="$CCARGS -w -blibpath:/usr/lib:/lib:/usr/local/lib";;
Please note that for example 'alias_maps' and 'alias_database' require dbm instead of hash.

'configure' takes ages to run

Run it from bash. While testing I found that this is 8 times as fast as running it from sh/ksh on my power5 system.
bash ./configure

Compiling SDL on AIX 6.1

Compiling SDL 1.2.13 on AIX is mostly './configure ; make install' with only a few adjustments:
  • Install package 'X11.adt'
  • In ./include/SDL_stdinc.h remove #include <string.h>
  • In ./src/audio/paudio/SDL_paudio.c add #include "SDL_endian.h" below #include <sys/stat.h>, replace BIG_ENDIAN by SDL_BIG_ENDIAN

IVM responds very slowly (half an hour per redraw)

This happens when you did not configure a DNS-server in the VIOS in which the IVM resides. Setting it to nameserver in /etc/resolv.conf (or any other host on which no DNS is running) solves this. It looks as if the IVM still queries some DNS even if none is configured, if you have a host configured without any DNS running that responds with ICMP connection refused messages, the IVM knows it can stop trying.

Installing Debian in an LPAR

  • At least for Debian 4.0r4a one cannot put the filesystem containing the /etc in a logical volume! or else /etc/yaboot.conf cannot be found by the bootloader
  • One can not use a virtual optical drive (with VIOS 1.5) for the installation process: the installer will say that it cannot use the CD-ROM drive UPDATE 20080901: this problem seems to be fixed in the daily build of Debian Testing
  • Make sure you install the openssh-server package as it seems that it does not add a line to /etc/inittab for a console login
  • When while compiling you get the error that the file 'gnu/stubs-64.h' is missing then you need to install the package libc6-dev-ppc64
  • For some reason no getty-daemon is listening on the console so that by default you won't be able to logon via the console. For that to work add the following line to /etc/inittab and run 'kill -HUP 1' afterwards:
    co:2345:respawn:/sbin/getty hvc0 38400
  • Debian 6.0.0: use 'install64' or else it won't boot (during installation)

GCC creates default 32bit binaries

Add to the gcc commandline: -maix64.

Files can't get larger than 2GB

Create a journaled file system (NOT extendend or jfs2!) and enable the "Large File Enabled" option (in smitty).
This 2GB limit also applies when ulimit -f is set to unlimited(!).

Firefox fails to connect to HMC port with unsupported security protocol error

Surf to "about:config" (without quotes) and then set all parameters starting with "security." to "true".

Linux installed in an LPAR doesn't reboot

Occasionally a Linux system crashes. Now when you want to reboot the LPAR in which it runs, do not choose 'reboot & write dump' as VIOS does not know how to handle the Linux swap-space (to store the memory dump). If you do, VIOS will give you an af003202 and af003302 error. So always select the 'reboot WITHOUT dump' option.

while compiling: "collect2: library libm not found"

Install the bos.adt.libm package from the AIX installation media.

installing a package

installp -qacXgd packagefilename packagefilename