Tuesday, February 22, 2011

NPIV

Presenting storage to LPARs for SAN boot using NPIV is a 2 step process.

First you need to boot the LPAR using nim to make FC adapters appear at switch level.
You can confirm same using Ports logged in in lsmap output.



Name Physloc ClntID ClntName ClntOS
------------- ---------------------------------- ------ -------------- -------
vfchost2 U8233.E8B.1032F3P-V1-C15 5 mqwuat1 AIX

Status:LOGGED_IN
FC name:fcs0 FC loc code:U5877.001.00H2594-P1-C2-T1
Ports logged in:1
Flags:a
VFC client name:fcs0 VFC client DRC:U8233.E8B.1032F3P-V5-C15-T1


Once you zone at switch you need to reboot lpar using nim again
to make WWN appear at storage side.


Name Physloc ClntID ClntName ClntOS
------------- ---------------------------------- ------ -------------- -------
vfchost2 U8233.E8B.1032F3P-V1-C15 5 mqwuat1 AIX

Status:LOGGED_IN
FC name:fcs0 FC loc code:U5877.001.00H2594-P1-C2-T1
Ports logged in:3
Flags:a
VFC client name:fcs0 VFC client DRC:U8233.E8B.1032F3P-V5-C15-T1


or
Boot LPAR into 'firmware ok prompt'. type: ioinfo. Choose fcinf

Friday, February 11, 2011

SAS Raid devices

Configuring RAID on AIX

smitty devices - > IBM SAS Disk Array -> IBM SAS Disk Array Manager -> Create an Array Candidate pdisk and Format to 528 Byte Sectors

smitty devices - > IBM SAS Disk Array -> IBM SAS Disk Array Manager ->Create a SAS Disk Array
Select sissas0 Available 01-08 PCI-X266 Planar 3Gb SAS RAID Adapter ,Select desired RAID level (0,5,10,6) RAID 5,
Stripe size (256 kb) -> select disks (pdisk1,2,3)


Thursday, February 10, 2011

Verify your mksysb.

I couldn't create a NIM SPOT using mksysb image.

When I have verified, I figured out that my mksysb image was not clean/complete.

1)lsmksysb -lf /export/mksysb/mksysb_20110210_14.wasprod1

clean with out any errors
Shows system,OS info and filesystems info

2) restore -Tqvf /export/mksysb/mksysb_20110210_14.wasprod1 >/dev/null

New volume on /export/mksysb/mksysb_20110210_14.wasprod1:
Cluster size is 51200 bytes (100 blocks).
The volume number is 1.
The backup date is: Thu Feb 10 09:10:02 CST 2011
Files are backed up by name.
The user is root.
Mount volume 2 on /export/mksysb/mksysb_20110210_14.wasprod1.
Press the Enter key to continue.

Volume 2 .... never seen this error

Solution

Lets recreate mksysb again :)

Tuesday, January 18, 2011

Which HMC is controlling my LPAR?

To figure out which HMC is controlling a particular LPAR.

Login to a LPAR and use either of commads

$ /usr/sbin/rsct/bin/rmcdomainstatus -s ctrmc
I a 0x3b7a655c73b1d930 0001 XX.XX.XX.XX ( Where XX.XX.XX.XX is the IP address of HMC).

or

$lsrsrc IBM.ManagementServer
Resource Persistent Attributes for IBM.ManagementServer
resource 1:
Name = 'XX.XX.XX.XX"
Hostname = "XX.XX.XX.XX"
ManagerType = "HMC"
LocalHostname = "lparname"
ClusterTM = "9078-160"
ClusterSNum = ""
ActivePeerDomain = ""

Thursday, January 13, 2011

Hey who dumped this core (AIX)

4 ways to find out .
1)
$)file /home/fmc/core
/home/fmc/core: AIX core file fulldump 32-bit, fmcemain

2)lquerypv -h /home/fmc/core 6b0 64
000006B0 7FFFFFFF FFFFFFFF 7FFFFFFF FFFFFFFF |................|
000006C0 00000000 000007D0 7FFFFFFF FFFFFFFF |................|
000006D0 00120000 13DE5FF8 00000000 00000005 |......_.........|
000006E0 666D6365 6D61696E 00000000 00000000 |fmcemain........|
000006F0 00000000 00000000 00000000 00000000 |................|
00000700 00000000 00000000 00000000 00000481 |................|
00000710 00000000 0000001B 00000000 00000481 |................|


3)
/usr/lib/ras/check_core /home/fmc/core
/usr/lib/libc_r.a
/usr/lpp/fmc/lib/libfmckernl.a
/usr/lpp/fmc/lib/libfmccdfms.a
/usr/lpp/fmc/lib/libfmceserv.a
/usr/lpp/fmc/lib/libfmcsbprf.a
/usr/lpp/fmc/lib/libfmcsfrm.a
/usr/lpp/fmc/lib/libfmcsntsv.a
/usr/lpp/fmc/lib/libfmcscbrg.a
/usr/lpp/fmc/lib/libfmcsfrxl.a
/usr/lpp/fmc/lib/libfmcstrc.a
/usr/lpp/fmc/lib/libfmccdvbs.a
/usr/lpp/fmc/lib/libfmcsfrec.a
/usr/lpp/fmc/lib/libfmccddrf.a
/usr/lib/libcrypt.a
/usr/lib/libC.a
/home/db2inst1/sqllib/lib/libicuuc24.a
/usr/lib/libdl.a
/usr/lib/libimqb23ia_r.a
/usr/lib/libimqs23ia_r.a
/usr/lpp/fmc/lib/libfmccmqqm.a
/usr/lpp/fmc/lib/libfmccfmsp.a
/usr/lpp/fmc/lib/libfmccmqfr.a
/usr/lpp/fmc/lib/libfmccdxmm.a
/usr/lpp/fmc/lib/libfmccdvmq.a
/usr/lpp/fmc/lib/libfmcemrec.a
/usr/lpp/fmc/lib/libfmcmcore.a
/usr/lpp/fmc/lib/libfmcssrva.a
/usr/lpp/fmc/lib/libfmcssrvb.a
/usr/lpp/fmc/lib/libfmcecoif.a
/usr/lpp/fmc/lib/libfmcdtom.a
/usr/lpp/fmc/lib/libfmcsgnrl.a
/usr/lpp/fmc/lib/libfmcecimp.a
/usr/lpp/fmc/lib/libfmcdetom.a
/usr/lpp/fmc/lib/libfmcsrpl.a
/usr/lpp/fmc/lib/libfmcsdctx.a
/usr/lpp/fmc/lib/libfmcmsvr.a
/usr/lpp/fmc/lib/libfmccdmgr.a
/usr/lpp/fmc/lib/libfmcsfrmc.a
/usr/lpp/fmc/lib/libfmcsmsgp.a
/usr/lpp/fmc/lib/libfmcstxct.a
/usr/lpp/fmc/lib/libfmccdtrc.a
/home/db2inst1/sqllib/lib/libicudata24.a
/usr/lib/libmqmcs_r.a
/usr/lib/libmqm_r.a
/usr/lpp/fmc/lib/libfmccdfsp.a
/usr/lpp/fmc/lib/libfmcstdv.a
/usr/lpp/fmc/lib/libfmcmfola.a
/usr/lpp/fmc/lib/libfmcdkrnl.a
/usr/lpp/fmc/lib/libfmcmstru.a
/usr/lpp/fmc/lib/libfmcmpeu.a
/usr/lpp/fmc/lib/libfmcdbac1.a
/usr/lpp/fmc/lib/libfmcdbac2.a
/usr/lpp/fmc/lib/libfmcdstom.a
/usr/lpp/fmc/lib/libfmcyctnr.a
/usr/lpp/fmc/lib/libfmcpreso.a
/usr/lpp/fmc/lib/libfmcixres.a
/usr/lpp/fmc/lib/libfmcdstmt.a
/usr/lpp/fmc/lib/libfmcmfobe.a
/usr/lpp/fmc/lib/libfmcdctom.a
/usr/lpp/fmc/lib/libfmcdptom.a
/usr/lpp/fmc/lib/libfmciqry.a
/usr/lpp/fmc/lib/libfmcikrnl.a
/usr/lpp/fmc/lib/libfmcdbatc.a
/usr/lib/libiconv.a
/usr/lib/libmqz_r.a
/usr/lpp/fmc/lib/libfmckext.a
/home/db2inst1/sqllib/lib/libxml4c53.a
/home/db2inst1/sqllib/lib/libdb2.a
/usr/lpp/fmc/lib/libfmcky21e.a
/usr/lpp/fmc/lib/libfmcpqery.a
/usr/lib/libmqmzse.a
/home/db2inst1/sqllib/lib/libXercesMessages53.a
/usr/lib/libpthreads_compat.a
/home/db2inst1/sqllib/lib/libdb2osse.a
/home/db2inst1/sqllib/lib/libdb2trcapi.a
/home/db2inst1/sqllib/lib/libdb2install.a
/home/db2inst1/sqllib/lib/libdb2g11n.a
/home/db2inst1/sqllib/lib/libdb2genreg.a
/home/db2inst1/sqllib/lib/libdb2locale.a
/home/db2inst1/sqllib/lib/libdb2dascmn.a
/usr/lib/libpthreads.a
/home/db2inst1/sqllib/lib/libdb2osse_db2.a
/usr/lib/nls/loc/en_US
/usr/lib/libi18n.a
/usr/mqm/lib/amqzaax_r
/usr/lib/libmqmax_r.a
/home/db2inst1/sqllib/lib32/icc/icclib/libicclib.so
/home/db2inst1/sqllib/lib32/icc/osslib/libcrypto.so.0.9.7
/home/db2inst1/sqllib/security32/plugin/IBM/client/IBMOSauthclient.a
fmcemain

4)dbx -C /home/fmc/core

Wednesday, January 12, 2011

Trace on VIO commands.

VIO command shell is a restricted shell(like HMC shell). If anybody wondering what AIX commands will be executed beneath VIO commands?
Here is the answer
example:
$ export CLI_DEBUG=33

$ lsmap -all

AIX: "lsdev -c adapter -t IBM,v-scsi-host -s vdevice -F "name" | wc -l -c"
AIX: "lsdev -c adapter -t IBM,v-scsi-host -s vdevice -F "name""
AIX: "lsdev -C -l vhost0 -F "physloc""
AIX: "lsdev -p vhost0 -F "name" | wc -l -c"
AIX: "lsdev -p vhost0 -F "name""
AIX: "lsattr -E -l vtscsi0 -F "value" -a aix_tdev,LogicalUnitAddr"
SVSA Physloc Client


-
$ export CLI_DEBUG=33
$ mirrorios -f hdisk1
AIX: "lsvg -p rootvg"
AIX: "lsvg -p rootvg | awk '{print $1}' | wc -l -c"
AIX: "lsvg -p rootvg | awk '{print $1}'"
AIX: "lsvg -l rootvg "
AIX: "lsvg -l rootvg | grep boot | awk '{print $1}'"
AIX: "lsvg -M rootvg "
AIX: "lsvg -M rootvg | grep hd5 | awk '{print $2}' | awk '{FS=":"}{print $3}'"
AIX: "mirrorvg -c 2 rootvg hdisk1 "