An AIX system should have a single default gateway defined. However, sometimes, it does occur that a system has multiple default gateways. Here's information to detect multiple default gateways and how to get rid of them:
First, obtain how many gateways there are:
# odmget -q "attribute=route" CuAt
CuAt:
name = "inet0"
attribute = "route"
value = "net,-hopcount,0,,0,192.168.0.1"
type = "R"
generic = "DU"
rep = "s"
nls_index = 0
CuAt:
name = "inet0"
attribute = "route"
value = "net,-hopcount,0,,0,192.168.0.2"
type = "R"
generic = "DU"
rep = "s"
nls_index = 0
If there are more than one, you need to remove the excess route. For example, to remove the default route to 192.168.0.2:
# chdev -l inet0 -a delroute="net,-hopcount,0,,0,192.168.0.2"
Method error (/usr/lib/methods/chginet):
0514-068 Cause not known.
0821-279 writing to routing socket: The process does not exist.
route: not in table or multiple matches
0821-207 chginet: Cannot add route record to CuAt.
Then verify again:
# odmget -q "attribute=route" CuAt
CuAt:
name = "inet0"
attribute = "route"
value = "net,-hopcount,0,,0,192.168.0.1"
type = "R"
generic = "DU"
rep = "s"
nls_index = 0
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
From powerlink.emc.com:
- Before making any changes, collect host logs to document the current configuration. At a minimum, save the following: inq, lsdev -Cc disk, lsdev -Cc adapter, lspv, and lsvg
- Shutdown the application(s), unmount the file system(s), and varyoff all volume groups except for rootvg. Do not export the volume groups.
# varyoffvg <vg_name>
Check with lsvg -o (confirm that only rootvg is varied on)
If no PowerPath, skip all steps with power names. - For CLARiiON configuration, if Navisphere Agent is running, stop it:
# /etc/rc.agent stop
- Remove paths from Powerpath configuration:
# powermt remove hba=all
- Delete all hdiskpower devices:
# lsdev -Cc disk -Fname | grep power | xargs -n1 rmdev -dl
- Remove the PowerPath driver instance:
# rmdev -dl powerpath0
- Delete all hdisk devices:
For Symmetrix devices, use this command:# lsdev -CtSYMM* -Fname | xargs -n1 rmdev -dl
For CLARiiON devices, use this command:# lsdev -CtCLAR* -Fname | xargs -n1 rmdev -dl
- Confirm with lsdev -Cc disk that there are no EMC hdisks or hdiskpowers.
- Remove all Fiber driver instances:
# rmdev -Rdl fscsiX
(X being driver instance number, i.e. 0,1,2, etc.) - Verify through lsdev -Cc driver that there are no more fiber driver instances (fscsi).
- Change the adapter instances in Defined state
# rmdev -l fcsX
(X being adapter instance number, i.e. 0,1,2, etc.) - Create the hdisk entries for all EMC devices:
# emc_cfgmgr
or# cfgmgr -vl fcsx
(x being each adapter instance which was rebuilt). Skip this part if no PowerPath. - Configure all EMC devices into PowerPath:
# powermt config
- Check the system to see if it now displays correctly:
# powermt display
# powermt display dev=all
# lsdev -Cc disk
# /etc/rc.agent start
Sometimes situations occur where a logical volume is deleted, but the ODM is not up to date. E.g. when "lsvg -l" doesn't show you the logical volume, but the lslv command can still show information about the logical volume. Not good.
To resolve this issue, first try:
# synclvodm -v [volume group name]If that doesn't work, try this: (in the example below logical volume hd7 is used). Save the ODM information of the logical volume:
# odmget -q name=hd7 CuDv | tee -a /tmp/CuDv.hd7.outIf you mess things up, you can allways use the following command to restore the ODM information:
# odmget -q name=hd7 CuAt | tee -a /tmp/CuAt.hd7.out
# odmadd /tmp/[filename]Delete the ODM information of the logical volume:
# odmdelete -o CuDv -q name=hd7Then, remove the device entry of the logical volume in the /dev directory (if present at all).
# odmdelete -o CuAt -q name=hd7


