AIX FAQ / How To (Under construction)



Picture conversion


TeX/LaTeX


Dealing with M$ world


Data handling

CD/DVD/ISO handling

... mount an ISO image

Sometimes it is convenient to mount an ISO image directly rather than burning it to CD/DVD first.
This supported on AIX >=6.1. Example:
   loopmount -i /d/bioimages/texlive2011-20110705.iso -o "-V cdrfs -o ro" -m /cdrom
mounts the specified ISO file as if it were a CD/DVD ROM.
Unfortunately, it seems only block devices (i.e. local files, not NFS mounts) are supported.
Requires root privileges.

The error message

   1320-007 loopmount: Failed to mount the imagefile.
means that probably the -V cdrfs option is missing.

The error message

   1320-002 loopmount: Failed to read Customized Database in ODM.  
could mean that probably the ODM location is undefined:
   env | grep ODM              # check it.
			export ODMDIR=/etc/objrepos # (re-)define, if necessary.

... burn a CD/DVD

Example:
   cdrecord dev=1,0 image.iso    # for CDs
   readcd -w dev=1,0 f=image.iso # for DVDs
burns the (disk-resident) ISO image file image.iso on a CD/DVD writer /dev/cd1 More hints (CD recording seems to be heavy magic):

sometimes the message appears: "readcd: Invalid argument. Cannot send SCSI cmd via ioctl" This can be ignored, just re-issue the command.

Depending on host hardware, cdrecord version and type of CD writer, explicitly specifying writing speed might help:

   cdrecord ... speed=4 ...

Filesystem handling

... move file system to another Volume Group (VG)

Unlike moving contents of a complete VG, this is not that straightforward.
Assume a filesystem, /fs, and associated logical volume (LV), /dev/lv, to be moved to another VG, newvg.
  1. If not yet existing, create the target VG, as described e.g. here.
  2. Create the new LV (with the same attributes) on the target VG, as described e.g. here, or via command line
       mklv -y newlv newvg number_of_physical_partitions
    
    In any case:
       chlv -t copy newlv      # flags that it will receive a copy
    
  3. If not yet existing (e.g. because no other filesystem has been created yet on the target VG), create a JFS log device:
       mklv -t  jfslog newvg 1 # for a jfs LV, creates JFS log /dev/loglv
       mklv -t jfs2log newvg 1 # for a jfs2 LV, creates JFS2 log /dev/loglvxx
       logform /dev/loglvxx    # assuming this is the JFS log, insert the actual name here
    
  4. If the filesystem is exported for NFS, unexport and unmount it first.
       exportfs -u /fs
       umount      /fs
    
    If, as usual, this can't be accomplished because somebody is using the filesystem, use
       fuser /dev/lv
       # or:
       lsof
    
    to discover and kill -9 the offending processes.
    Brute force version:
       fuser -kxuc /dev/lv
    
    kills everything associated with /dev/lv
  5. Then
       cplv -e newlv -f lv # copy old to new LV, may take looong, so be patient!
       chlv -n oldlv lv    # swap LV names ...
       chlv -n lv newlv    # swap LV names ...
    
  6. Change filesystem attributes:
       chfs -a dev=/dev/lv /fs       # the new LV it resides on
       chfs -a log=/dev/loglvxx /fs  # the new JFS log it uses, use the actual JFS log name here !!!
    
  7. Remount filesystem:
       mount /fs
    .
    
  8. If applicable, i.e. if the filesystem has NFS clients: re-export it:
       exportfs /fs
    
    . It might be necessary to un/remount on the client side:
       umount -f client_mountpoint_for_fs
    
  9. If you're sure everything works fine, use smitty to remove old LV oldlv.

... move file system to another file server

  1. Create a new filesystem /fsnew on the target file server, as described here, but delay NFS access until later.
  2. Replicate the old filesystem content on the new server. Since no files should be left out, root access should be available on both the old and the new file system. Use:
       # for a dry run
       rsync -e ssh -v -r -l -S -p -o -g -t -u -n /fsold/ root@target:/fsnew
       # for real
       rsync -e ssh -v -r -l -S -p -o -g -t -u    /fsold/ root@target:/fsnew
    
    mind the trailing slash (/), it's significant!!
    For a transfer on the same machine one may alternatively use:
       cp -h -r -p /fsold/ /fsnew/
    
    One may verify the successful transfer by comparing filesystem sizes:
       du -g -s /fsold/ 
       du -g -s /fsnew/
    
    however, this is only a crude estimate since some filesystem types offer compression. Alternatively, the number of files in both filesystems can be compared via
       find /fsold/ |wc
       find /fsnew/ |wc
    
    where the first two numbers (lines, words) should be approximately equal.
  3. if applicable, enable NFS access.
  4. unexport the old file system:
       smitty
    			Communications Applications and Services - NFS - Remove a Directory from Exports List
       # or on the command line:       
       /usr/sbin/rmnfsexp -d '/fsold' '-B'
    
  5. unmount the file system, if no longer needed:
       smitty
    			System Storage Management - File Systems - Unmount a File System
       # or on the command line:
       /usr/sbin/umount /fsold      
    
  6. remove the file system, if no longer needed (removes logical volume as well):
       smitty
       System Storage Management 
       - File Systems - Delete File Systems
         - [Enhanced] Journaled File Systems
           - Remove a[n Enhanced] Journaled File System
       # or on the command line:       
       /usr/sbin/rmfs /fsold
    
  7. If TSM backup is being enabled, remove the file system from the backup definition:

Tape handling

... deal with system backup tapes

list an AIX backup archive
(512 byte records)
   restore -T -f /dev/rmt0
copy archives
   dd if=/dev/rmt0 ibs=512   of=/tmp/rmt0.dd
   dd if=/dev/rmt0 ibs=10240 of=/tmp/rmt0.dd  # alternative ?
list an installation tape
   installp -l -d /dev/rmt0 >/tmp/rmt0.log 2>&1
list a mksysb tape
lists contents of the backup tape at /dev/rmt0 into file /tmp/rmt0.log.
Single file restore can be accomplished in a similar fashion.

... format a disk

Use smitty
   Problem Determination - Hardware diagnostics - Current Shell Diagnostics - Resource Selection
Select the disk to format (take care !), use F7 to commit.
In Task Selection choose Format Media, then Format and certify disk. Think twice and go ahead. Be patient, it may take an hour or so.

User interface

... use a german keyboard w/ english AIX

If you do not want to remap all the keycodes to fully reflect the german keyboard, you might leave things as they are. A problem occurs with the '|' and the '\'. To circumvent it in the X environment, in /usr/lpp/X11/defaults/xmodmap/en_US/keyboard
 			keycode 50 =   backslash       bar             NoSymbol
			!keycode 50 =   NoSymbol        NoSymbol        NoSymbol
then run
   xmodmap /usr/lpp/X11/defaults/xmodmap/en_US/keyboard

System configuration

... increase the ftp timeout

permanently for a single machine

As root edit the system file /etc/inetd.conf
   ftp     stream  tcp     nowait  root    /usr/sbin/ftpd         ftpd -t 1800
After refresh of the inetd subsystem the timeout will be 1800 seconds. Refreshing is accomplished by the line command
   refresh -s inetd
or by the smitty - Processes & Subsystems - Subsystems - Refresh a Subsystem menu selection.

temporarily for an existing ftp session

As normal user the ftp subcommand
   site idle 1800
will do the job. The currently valid timeout can be queried by the ftp subcommand
   site idle 

... re-start printer queues

You use the smit tool on the command line:
   smitty
then walk through the menus
   Print Spooling - Manage Print Queues - Start a Print Queue 
Fill in the required information and press enter.
Note that this requires root-privileges. Ordinary users would have to be in the secondary group printq.

... configure multimedia services

  1. run
       /usr/lpp/UMS/defaults/mime/setup_ums_mime
    

... configure an HP DAT drive

see http://www.hp.com/tape/unix-dds/c_ibm.html

... fix maintenance level issues

Use
   oslevel -r
to determine current OS maintenance level. If not as expected sth like
   instfix -ciqk 5200-09_AIX_ML | grep ":-:" | pg
might tell you which filesets are missing to reach e.g. AIX 5.2 ML-09

... switch 32- / 64-bit kernel

bootinfo -y tells the 32/64-bit capability of the system.
bootinfo -K tells the 32/64-bittedness of the currently active kernel.
From 32 to 64 bit:
   ln -fs /usr/lib/boot/unix_64 /usr/lib/boot/unix
   ln -fs /usr/lib/boot/unix_64 /unix
From 64 to 32 bit:
			ln -fs /usr/lib/boot/unix_up /usr/lib/boot/unix # for uni-processor machines
			ln -fs /usr/lib/boot/unix_up /unix
			ln -fs /usr/lib/boot/unix_mp /usr/lib/boot/unix # for multi-processor machines
			ln -fs /usr/lib/boot/unix_mp /unix
Then in both cases:
			bosboot -a -l /dev/hd5 -d /dev/hdisk0
			bosboot -a -l /dev/hd5 -d /dev/hdisk1  # for a mirrored disk
			bootlist -m normal hdisk0 hdisk1       # paranoia
			bootlist -m normal -o                  # paranoia
			shutdown -Fr

... create an AIX LPP / BFF package

Howto create an AIX LPP / BFF package

... change display / gfx adapter

Needs LFT/HFT console: login root via command line. Then
   chdisp -d bbl0   # temporarily switch to graphics adapter "bbl0"
   chdisp -p bbl0   # permanently switch to graphics adapter "bbl0"
Needs reboot / X11 restart.

... determine which CPU am I running on ?

   lsattr -El proc0
should give CPU architecture and clock frequency (in Hz) for CPU proc0

... list software on media

Either use smitty, then Software Installation/Maintenance, or on the command line e.g.:
   /usr/lib/instl/sm_inst list_filesets -l -f _all_available -d '/dev/cd0' >/tmp/content.txt 2>&1
will list the software on CD/DVD in drive /dev/cd0 into file /tmp/content.log. For multi-volume sets it is sufficient to list the first CD/DVD of the set.
Requires root rights.

... list contents of a (mksysb) backup

Either use smitty, then System Storage Management - System Backup Manager, or on the command line e.g.:
   /usr/sbin/restore -s 4 -Tqv  -f /dev/rmt0.1; tctl -f /dev/rmt0.1 rewind
This command sequence skips the first four tape files (-s 4 -q) and positions the tape at the fifth, which is the real backup. The files in the backup are then listed (-Tv). The tape special file has to be "non-rewinding" (/dev/rmt?.1) to avoid rewinding after one of the first four EOF's. Finally, tctl repositions the tape at its load point.
Requires root rights.

... convert Uxxxxxx filesets to bff format

Example:
   inutoc /usr/sys/inst.images
   bffcreate -c -d /usr/sys/inst.images

... transfer to other IP domain

  1. Temporarily remove the network cable.
  2. Power on. Machine will be stuck a while at LED 581. Be patient.
  3. login as root.
  4. stop NIS client ypbind; remove client config
  5. In /etc/netsvc.conf add/modify:
       hosts=local,bind
    
  6. tcpip config
  7. In /etc/resolv.conf: Remove inappropriate nameservers.
  8. If applicable: update /etc/hosts.
  9. If applicable: update /etc/hosts.allow, for example allow only local access:
       ALL: LOCAL
    
  10. If applicable: update /etc/ssh/sshd_config, for example modify rootlogin:
       rootlogin no  # disallow
       #rootlogin no # allow, yes is the default.
    
    restart sshd:
       stopsrc -s sshd; startsrc -s sshd
    
  11. Disable tsm, e.g. in /etc/rc.local.

AIX trouble shooting

LoadLeveler Scheduler Daemon won't start

Symptoms: LoadL_schedd process doesn't start up properly, burns useless CPU cycles, is marked as "down" in xloadl and fills /var/loadl/log/SchedLog with messages like:
   LoadLeveler: JobQueue::scan(int (*)(Job *)): Error retrieving Job StepList from Queue.  Unable to route step type
Probable Reason: some corrupted remnants from previous jobs.
Cure: Cleanup /var/loadl/spool:
   rm /var/loadl/spool/jobxxxxxx.ickpt.0  # offending job relics
                                          # sometimes this is needed in addition:
   rm /var/loadl/spool/history				       
   rm /var/loadl/spool/job_queue.dir				       
   rm /var/loadl/spool/job_queue.pag				       
and restart LoadLeveler on the respective node.

nfs mount hangs / slow transfer (AIX 4.2)

It seems AIX 4.2.1 NFS client has problems negotiating the protocol version with its server. Remedy: force vers=2 wherever applicable:
   mount -o vers=2  ... # when mounting manually

automountd does not (re)start

corresponds to messages such as:
   nfs_mount: 109 error while mounting (.....): Function not implemented
Cure:
ypbind must be started, then:
login as root, then:
   stopsrc -s automountd
   stopsrc -g nfs
   /etc/rc.nfs            # should start ypbind services

Maintenance work w/o root login

Sometimes it may be necessary to access a system for maintenance work, bypassing the usual root login. For example when the root password is lost or the boot or login process hangs due to unavailable resources.
You will need some OS media, either bootable AIX CD of the same version as is installed (versions >=4), the infamous boot diskettes (version 3), or the Install/Maintenance floppy (version 2).

AIX >=3

  1. Boot in maintenance mode.
  2. Follow the menus until access to "Maintenance Shell" or "limited function shell" is offered. Choose it.
  3. 			getrootfs hdisk0
    			ksh; export TERM=lft      # try, if "vi" is to be used
                              			# if unsuccessful, "vi" runs in "open" mode, 
                              			# i.e. use "l" and "h" to navigate right and left, respectively
    			#
    			# ... actions to be done to fix the problem 
    			#
    			sync; sync; sync          # force writing changes to disk
    			shutdown -Fr
    			# or:
    			reboot
    

AIX 2 (RT PC)

  1. Insert the AIX V.2.x Install/Maintenance floppy.
  2. Power on the machine, it will boot off the floppy.
  3. A SYSTEM MANAGEMENT menu will be offered, choose Start the Standalone Shell (Item 3).
  4. To access the root filesystem, use:
       mount /dev/hd0 /mnt
    
    then the /etc/ directory for example will be accessible as /mnt/etc/ .
  5. When done,
       umount /mnt
    
    and leave the shell with CTRL-D. The menu will allow you to reboot into normal AIX.

root password lost

You can't get it back. Either assign a new one or temporarily (!) remove it. Follow the procedure maintenance work w/o root login to have access to the password file.

AIX >=3

In the limited function shell:
   vi /etc/security/password
and remove the root password.

AIX 2

The standalone shell has very limited capabilities only, use:
   cd /mnt/etc/security/
   dd if=passwd of=passwd.save # for security (there's no cp)
   ed passwd                   # enter very primitive line editor 
In ed, type consecutive line numbers until the line for the root password appears. Then
   s/<encryption>//g  # remove password. Use \/ if the encryption contains a / 
   w passwd                 # write edit buffer to file
   q                        # leave the editor
Leave the shell and reboot:
   sync; sync; sync         # write disk buffers
   CTRL-D                   

boot/login hangs

Could have many reasons, of course.
Often enough caused by unavailable network resources (NIS,NFS). In this case proceed as in maintenance work w/o root login to have access to the configuration files.
Emergency actions:
   vi /etc/inittab
and outcomment (place a colon, :, before the line) the offending line which invokes /etc/rc.nfs.
Once reboot/login is possible, fix the true cause of the problem.

enlarge X memory pool

Symptoms:
Memory hungry X apps (browsers et al.) crash, nedit refuses cut&paste, etc
Working hypothesis: X hits a 128MB memory limit.
My work around: use a modified X executable with larger heap.
  1. as root:
    			cd /usr/bin/X11
    			cp -p X X.save  # save original X  
    			cp -p X X.large # the new X
                    			# tell the executable to use 1GB heap space 
    			/usr/bin/echo '\0100\0\0\0' | dd of=X.large bs=4 count=1 seek=19 conv=notrunc
    			ln -sf X.large X      
    
  2. logout the desktop and kill the "X" process. It should restart immediately and the desktop login should appear.

replace a dead disk on machines >=POWER8

On these machines, it's a bit more complicated. hdisks are mapped onto "RAID Disk Array"s consisting of physical pdisks.
Here's IBMs recommendation: [@IBM], [local html] [local webarchive]

swap a dead (mirrored) harddisk

Assume a mirrored volume group, one disk (hot swappable, e.g. hdisk5) is dead.
  1. "Break" the mirror:
       smitty
    			- System Storage Management 
    			  - Logical Volume Manager
           - Volume Groups - Unmirror a Volume Group
    
      PHYSICAL VOLUME names                              [hdisk5] # specify dead disk                      +
    
  2. Remove the dead disk from the VG:
       smitty 
    			- System Storage Management 
    			  - Logical Volume Manager
           - Volume Groups 
    							  - Set Characteristics of a Volume Group
               - Remove a Physical Volume from a Volume Group
       * PHYSICAL VOLUME names                              [hdisk5]                      +
    
  3. Remove the dead disk from the system:
  4. It should now be available as, for example, hdisk5.
  5. Add it to the VG in question:
       smitty 
    			- System Storage Management 
    			   - Logical Volume Manager 
            - Volume Groups - Set Characteristics of a Volume Group 
              - Add a Physical Volume to a Volume Group
       * PHYSICAL VOLUME names                              [hdisk5]                +
    
  6. Reestablish the mirror:
       smitty 
    			- System Storage Management - Logical Volume Manager 
         - Volume Groups - Set Characteristics of a Volume Group 
           - Mirror a Volume Group
    
      PHYSICAL VOLUME names                              [hdisk5]                +
      Number of COPIES of each logical                    2                      +
        partition
    
    (be patient, might take several minutes)
  7. If the disk a s system disk, i.e. it belongs to the rootvg, rewrite the boot records for both disks in the mirror:
       bosboot -a -l /dev/hd5 -d /dev/hdiskx
       bosboot -a -l /dev/hd5 -d /dev/hdisky
       bootlist -m normal hdisky hdiskx
    

LVM system call found an unaccountable internal error

Sounds more frightening than it is: the root file system / is full.
Delete some unimportant file(s) and increase /.

Seagate DDS-4 drives do not compress ...

... although dip switches are correct.
Ensure the drive(r) has the correct density setting:
   smitty - Devices - Tape Drive - Change / Show Characteristics of a Tape Drive

      DENSITY setting #1                                 [140]


Last Update: 4-Mar-2026, M.Kraemer
Legal Notice Data privacy protection