Topics: AIX, SSA, Storage, System Admin
Renaming pdisks
If, for some reason, the pdisk and hdisk numbering of SSA disks is not sequential anymore, then there's a way to bring order in to chaos. Usually, the pdisk and hdisk numbering order are screwed up when you replace multiple disks together. Especially on HACMP clusters, a correct numbering of pdisks and hdisks on all nodes of the cluster, comes in handy.
Unmount all file systems on the specific disks, then varyoff the volume group:
# /usr/lib/methods/cfgssar -l ssarIf this doesn't help (it sometimes will), then renumber the disks manually:
Write down the pdisk names, hdisk names, location of the disks in the SSA drawer and the connection ID's of the disks. You can use lsdev -Cc pdisk to show you all the pdisks and the drawer and location codes. Use lsdev -Clpdiskx -Fconnwhere to show the connection ID of a pdisk. Then, figure out, how you want all disks numbered.
Remove the pdisks and hdisks with the rmdev -dl command.
Create the pdisks again:
# mkdev -p ssar -t scsd -c pdisk -s ssar -w [connection-ID] -l pdisk1Create the hdisks again:
# mkdev -p ssar -t hdisk -c disk -s ssar -w [connection-ID] -l hdisk3Test with:
# ssaxlate -l pdisk1if it shows hdisk3 (Usually the hdisk number is 2 higher than the pdisk number if you use 2 SCSI disks in the rootvg).
If you've done all disks this way, check with lsdev -Cc pdisk. If you're happy, then varyon the volume group again and mount all filesystems.
Sometimes, when you create an mksysb, you receive an error like this one:
/dev/ipldevice not foundDevice /dev/ipldevice is a hard link to the disk your system booted from. Mksysb tries to determine the size of the boot logical volume with the bosboot -qad /dev/ipldevice command. Via lslv -m hd5 you can see from which disk was booted (or via bootlist -m normal -o).
To resolve this problem: re-create the hard link yourself:
# ln /dev/bootdevice /dev/ipldeviceFor example:
ln /dev/rhdisk0 /dev/ipldeviceNote: Use "rhdisk" and not "hdisk".
Another way to solve this problem: reboot your system and the /dev/ipldevice will be created automatically for you (Your users may prefer the first solution...).
To find the status of the batteries of an SSA adapter, enter as root:
# ssa_fw_status -a ssaXX is the number of your adapter, for example:
# ssa_fw_status -a ssa0After installing a new battery, enter the following command:
Fast write cache size: 32
Expected battery life: 22000
Powered on hours: 20706
Battery state: Active
# ssa_format - l ssaX - bThis will reset the lifetime counter.
Topics: AIX, System Admin↑
Fast IPL
Using FAST IPL only works on some RS6000 systems, like SP's or J/G/R30/40's.
To configure FAST IPL:
# mpcfg -cf 11 1Check current configuration:
# mpcfg -dfIf you can only use a terminal to configure the Fast IPL:
Put the key into service mode, press [ENTER] on the keyboard. Then type: sbb. Using the menu you can configure Fast IPL. Then reboot and switch the key back to Normal.
Topics: AIX, Security, System Admin↑
HOWTO: set up ssh keys
First, install OpenSSH and OpenSSL on two UNIX servers, serverA and serverB. This works best using DSA keys and SSH2 by default as far as I can tell. All the other HOWTOs I've seen seem to deal with RSA keys and SSH1, and the instructions not surprisingly fail to work with SSH2.
On each server type ssh someserver.example.com and make a connection with your regular password. This will create a .ssh dir in your home directory with the proper permissions. On your primary server where you want your secret keys to live (let's say serverA), type:
# ssh-keygen -t dsaThis will prompt you for a secret passphrase. If this is your primary identity key, use an empty passphrase (which is not secure, but the easiest to work with). If this works right, you will get two files called id_dsa and id_dsa.pub in your .ssh dir.
Copy the id_dsa.pub file to the other host's .ssh dir with the name authorized_keys2:
# scp ~/.ssh/id_dsa.pub serverB:.ssh/authorized_keys2Now serverB is ready to accept your ssh key.
For a test, type:
# ssh serverBThis should let you in without typing a password or passphrase. Hooray! You can ssh and scp all you want and not have to type any password or passphrase.
How to copy a filesystem from one server to another:
Make sure you can execute a remote shell on the target host (by adding an entry of the source host in the /.rhosts file). Login to the source system as root and enter:
# (cd LOCAL_MOUNTPOINT && tar cpvBf - . ) | rsh REMOTEHOST 'cd REMOTE_MOUNTPOINT && tar xpvBf -'For ssh, use the following command:
# tar -cf - myfiles | ssh user@host "umask 000 ; cat | tar -xpf -"You might also have run into the problem that, when FTP'ing CD software on a Windows PC to a remote AIX system, files with lowercase names suddenly change to uppercase file names. This is how to copy the complete contents of a CD on a Red Hat Linux system to a remote AIX system as a tar file:
- Login as root on the Linux system.
- Mount the CD-ROM:
# mount /mnt/cdrom # cd /mnt/cdrom
- Tar the contents:
# tar -cvf - . | ssh userid@hostname "cd /path/to/where/you/want/it/on/the/target/system ; cat > filename.tar"
- Unmount the CD-ROM:
# cd / # umount /mnt/cdrom
AIX is short for Advanced Interactive eXecutive.
AIX is the UNIX operating system from IBM for RS/6000, pSeries and the latest Power systems. Currently, it is called "System P". IBM is nowadays the largest UNIX hardware vendor worldwide. AIX and RS/6000 was released on the 14th of February, 1990 in London.
Currently, the latest release of AIX is version 6.1. Also AIX 5.3 exists and is still supported by IBM. Older versions (e.g. 3.2.5, 4.3.3., 5.1 and 5.2) have reached end-of-program services and thus are no longer supported by IBM.
AIX supports Logical Partioning (short: LPAR). With LPAR you can create mulitple system environments on a single machine, thus sharing the processor and memory resources of a single machine by several operating system
instances. From AIX 5.2 on, AIX supports DLPAR, Dynamic Logical Partitioning, which enables administrators to add, remove or move system resouces such as memory, adapters and CPU between partitions without the need to reboot each partion. From AIX 5.3, AIX supports micro-partitioning.
With LPAR, a single CPU can only be used by a single Operating System instance. With micro-partitioning, a CPU can be shared by up to 10 operating system instances. From AIX 5.3 also the sharing of disk and network resources by several operating system instances is supported. Later versions of AIX and Power hardware now also include the ability to share I/O amongst several operating system images, through the use of a Virtual I/O server (VIO).
IBM used to supply Maintenance Levels for AIX. Nowadays, they supply Technology Levels, one in February and one in July each year.
A "how-to" restore a mksysb through NIM:
- Create a mksysb resource in NIM: Logon to the NIM server as user root. Run smitty nim, Perform NIM Administration Tasks, Manage resources, Define a resource, select mksysb, type name mksysb_
, enter "master" as Server of Resource, enter the full path to the mksysb file at Location of Resource: e.g. /backup/hostname.image. - Add the mksysb resource to the defined machine in NIM, together with the original SPOT and LPP source of the host: Run: smitty nim, Perform NIM Administration Tasks, Manage Machines, Manage Network Install Resource Allocation, Allocate Network Install Resources, select the machine, select the mksysb resource defined in the previous step, along with the correct SPOT and LPP_SOURCE of the oslevel of the system.
- Do a perform operation on the machine in NIM and set it to mksysb: Run smitty nim, Perform NIM Administration Tasks, Manage Machines, Perform Operations on Machines, select the machine, select bos_inst, set the Source for BOS Runtime Files to mksysb, set Remain NIM client after install to no, set Initiate Boot Operation on Client to no, set Accept new license agreements to yes.
- Start up the system in SMS mode and boot from the NIM server, using a virtual terminal on the HMC. Select the disks to install to. Make sure that you set import user volume groups to "yes". Restore the system.
# smitty nim_bosinst
You can automatically forward all error report entries to your email. This next part describes how to do that.
Create a file like this:
Add this to the ODM:# cat /tmp/mailgeorge errnotify: en_name="mailgeorge" en_persistenceflg=1 en_method="errpt -a -l $1|mail -s \"errpt: $9\" george@email.com"
# odmadd /tmp/mailgeorgeNow log an entry in the error report:
# errlogger "My coffee is cold"You will see in the error report:
# errpt -a
----------------------------------------------------
LABEL: OPMSG
IDENTIFIER: AA8AB241
Date/Time: Tue Oct 6 15:57:58 CDT 2009
Sequence Number: 585
Machine Id: 0004D6EC4C00
Node Id: hostname
Class: O
Type: TEMP
Resource Name: OPERATOR
Description
OPERATOR NOTIFICATION
User Causes
ERRLOGGER COMMAND
Recommended Actions
REVIEW DETAILED DATA
Detail Data
MESSAGE FROM ERRLOGGER COMMAND
My coffee is cold
Clear the error log again (because we logged a fake test-entry in the error report):
# errclear 0Watch your email. You should receive the same error report entry in your email.
By the way, you can delete this from the ODM like this:
# odmdelete -q 'en_name=mailgeorge' -o errnotify
Topics: AIX, Performance, System Admin↑
PerfPMR
When you suspect a performance problem, PerfPMR can be run. This is a tool generally used by IBM support personal to resolve performance related issues. The download site for this tool is:
ftp://ftp.software.ibm.com/aix/tools/perftools/perfpmr


