Your Ad Here

IBM AIX/UNIX system storage administration ksh/perl scripting

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.

Labels

BlogCatalog