Wednesday, July 29, 2009

Emulex hbacmd utility

Emulex statistics:
The Emulex hbacmd(1m) utility can be used to print numerous configuration and performance attributes. The performance attributes can be used to gauage throughput and signal loss, which can aide in debugging performance and reliability issues. To view all available performance metrics, the hbacmd utility can be invoked with the “portstat” option and the WWPN to view:

$ hbacmd PortStat 10:00:00:00:c9:49:28:47

Port Statistics for
10:00:00:00:c9:49:28:47

Secs Since Last Reset : 21573
Exchange Count
: 1308267
Responder Exchange Count: 363
TX Seq Count : 1315705
RX
Seq Count : 6357365
TX Frame Count : 1336810
RX Frame Count : 161483066
TX Word Count : 31567104
RX Word Count : 3316320000
TX KB Count :
123309
RX KB Count : 12954375
LIP Count : -1
NOS Count : 0
Error
Frame Count : 0
Dumped Frame Count : -1
Link Failure Count : 1
Loss
of Sync Count : 0
Loss of Signal Count : 0
Prim Seq Prot Err Count : 0
Invalid TX Word Count : 8
Invalid RX Frame CRC Cnt: 0

This data could easily be integrated with Orca to provide useful historical graphs. Nice!"


Resetting Emulex HBAs
On rare ocassions it may be necessary to reset an Emulex HBA to re-establish connectivity to fabric services, and to find new targets and LUNs that have been added to the fabric. This can be accomplished with a system reboot ( which takes a good deal of time, and is not an option when availability is the primary service driver), or with the Emeulex hbacmd(1m) or lputil(1m) utilities. To reset an adaptor with hbacmd(1m), the WWPN is passed as an option:

$/usr/sbin/hbanyware/hbacmd Reset 10:00:00:00:c9:49:2c:b4
Reset HBA 10:00:00:00:c9:49:2c:b4
To reset an HBA through the lputil(1m) text-base menu, you can select option 4 from the main menu, and pick the adaptor to reset:

$ /usr/sbin/lputil/lputil
LightPulse Common Utility for Solaris/SPARC. Version 2.0a5
(4/7/2005).Copyright (c) 2005, Emulex Corporation
Emulex Fibre Channel Host
Adapters Detected: 3Host Adapter 0 (lpfc3) is an LP9802 (Ready Mode)Host Adapter
1 (lpfc4) is an LP9802 (Ready Mode)Host Adapter 2 (lpfc5) is an LP9802 (Ready Mode)
MAIN MENU
1. List Adapters

2. Adapter Information

3. Firmware Maintenance

4. Reset Adapter

5. Persistent Bindings
0. Exit
Enter choice
=> 4

0. lpfc3

1. lpfc4

2. lpfc5
Select an adapter => 0
MAIN MENU
1. List Adapters

2. Adapter Information

3. Firmware Maintenance

4. Reset Adapter

5. Persistent Bindings
0. Exit
Enter choice => 0


Once the adaptor is reset, you should see a message similar to the following in the system logfile:
Sep 7 15:23:49 tiger lpfc: [ID 728700 kern.warning] WARNING: lpfc3:1303:LKe:Link Up Event x1 received Data: x1 x0 x8 x14
Emulex makes a killer HBA, and provides several awesome software utilities to manage host side SAN connectivity.

hbacmd utility

$ hbacmd -hUsage: hbacmd { h=IP Address or Hostname{:port} }
Valid Commands:
Version
ListHBAs
HBAAttrib
PortAttrib
PortStat
ServerAttrib
TargetMapping
Reset
Download
PersistentBinding
Source: {C L}
C: Configuration
L: Live
AllNodeInfo
SetPersistentBinding
Scope: {P I B}
P: Bind set Permanently
I: Bind set Immediately
B: Bind set Both Immediately and at Reboot
BindType: {D P N}
D: Enable binding by D_ID
P: Enable binding by WWPN
N: Enable binding by WWNN
Id: Either WWPN, WWNN, or D_ID (depending on BindType)
RemoveAllPersistentBinding
RemovePersistentBinding
BindType: {D P N}
D: Enable binding by D_ID
P: Enable binding by WWPN
N: Enable binding by WWNN
Id: Either WWPN, WWNN, or D_ID (depending on BindType)
BindingCapabilities
BindingSupport
Source: {C L}
C: Configuration
L: Live
SetBindingSupport
BindFlag: {D P N A DA PA NA}
D: Enable binding by D_ID
P: Enable binding by WWPN
N: Enable binding by WWNN
A: Enable binding by AUTOMAP
DA: Enable binding by D_ID and AUTOMAP
PA: Enable binding by WWPN and AUTOMAP
NA: Enable binding by WWNN and AUTOMAP
DriverParams
DriverParamsGlobal
SetDriverParam

CtrlWord: {P G B N}
P: Permanent
G: Global
B: Both
N: Neither
SetBootBios
CtrlWord: {E D}
E: Enable
D: Disable
To view all of the Emulex HBAs installed in a server, hbacmd(1m) can be invoked with the “listhbas” option:
$ hbacmd listhbasManageable HBA List
Port WWN : 10:00:00:00:c9:49:28:42
Node WWN : 20:00:00:00:c9:49:28:42
Fabric Name: 10:00:00:60:69:80:2d:ee
Flags : 8000f980
Host Name : server01
Mfg : Emulex Corporation
Port WWN : 10:00:00:00:c9:49:28:47
Node WWN : 20:00:00:00:c9:49:28:47
Fabric Name: 10:00:00:60:69:80:0e:fc
Flags : 8000f980
Host Name : fraudmgmt01
Mfg : Emulex Corporation
[ ..... ]
To list firmware versions, serial numbers, WWN and a variety of model specific information, the hbacmd(1m) utility can be invoked with the “hbaattrib” option and the WWN to probe:
$ hbacmd HBAAttrib 10:00:00:00:c9:49:28:47HBA Attributes for 10:00:00:00:c9:49:28:47
Host Name : server01
Manufacturer : Emulex Corporation
Serial Number : MS51403247
Model : LP9802
Model Desc : Emulex LightPulse LP9802 2 Gigabit PCI Fibre Channel Adapter
Node WWN : 20 00 00 00 c9 49 28 47
Node Symname : Emulex LP9802 FV1.91A1 DV6.02f
HW Version : 2003806d
Opt ROM Version: 1.50a4
FW Version : 1.91A1 (H2D1.91A1)
Vender Spec ID : 80F9
Number of Ports: 1
Driver Name : lpfc
Device ID : F980
HBA Type : LP9802
Operational FW : SLI-2 Overlay
SLI1 FW : SLI-1 Overlay 1.91a1
SLI2 FW : SLI-2 Overlay 1.91a1
IEEE Address : 00 00 c9 49 28 47
Boot BIOS : Fcode Firmware1.50a4
Driver Version : 6.02f; HBAAPI(I) v2.0.e, 11-07-03
To view host port information (e.g., port speed, device paths) and fabric parameters (e.g., fabric ID (S_ID), # of ports zoned along with this port), hbacmd(1m) can be invoked with the “portattrib” option:
$ hbacmd PortAttrib 10:00:00:00:c9:49:28:47Port Attributes for 10:00:00:00:c9:49:28:47
Node WWN : 20 00 00 00 c9 49 28 47
Port WWN : 10 00 00 00 c9 49 28 47
Port Symname :
Port FCID : 6D0900
Port Type : Fabric
Port State : Operational
Port Service Type : 6
Port Supported FC4 : 00 00 01 20 00 00 00 01
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
Port Active FC4 : 00 00 01 20 00 00 00 01
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
Port Supported Speed: 2 GBit/sec.
Port Speed : 2 GBit/sec.
Max Frame Size : 2048
OS Device Name : /devices/pci@84,2000/lpfc@1
Num Discovered Ports: 3
Fabric Name : 10 00 00 60 69 80 0e fc

Tuesday, July 28, 2009

Technology for Sun Partners

Technology for Sun Partners: "A Hands on Introduction to ZFS Pools; Part 3: RAIDZ2"

The hands on tutorial shows how to manage disks through ZFS with very limited resources. The tutorial is based on the following components
One 7 port USB 2.0 hub
Six 1GB USB 2.0 memory sticks
OpenSolaris 2008.05 as a live CD (and a system to boot off); any Solaris 10 systems will do as well
It has been released in three parts:
Getting started, pool creation import and export of pools
Mirrors, managing disk failures and spare disks
RAIDZ2
Within this part of the tutorial you will learn
How to create a RAIDZ2 volume ZFS with 2 parity volumes out of 6 USB sticks
How to it recovers after disk failures through resilvering
How to scrub a pool
Check out the first part to learn about the Solaris requirements, the six required USB sticks and the USB hub and how to configure them.
As already stated in the other parts; get some extra graphical tools like iobar from the freely available Tools CD. This will visualize nicely what's happening on your disks (see below):

Getting Started
Non Disclaimer: Please be cautious with your system. All commands apply significant changes to your system. Data corruption may easily occur. Have a good backup of your system. The system is not warranted to work since it depends on the USB sticks, the hub and how how Solaris get's informed about status changes. ZFS hasn't been optimized for USB sticks and hick ups may occur at any time. Do not use such a configuration for important work. This is a low cost self learning sand box!
As already mentioned sin the first part:
Become super user ( su)
Clean up your /dev/dsk device list ( devfsadm -C)
This time we will plug in all 6 sticks at the very beginning since we will need them all.
The goal will be to create a 4GB “high trough put” USB volume with 2*1GB parity disks. This configuration will be able to survive the failure of any 2 disks.

The command rmformat will tell us the mapping of sticks to devices. In my case it's:
Stick
controller
1
c9t0d0p0
2
c8t0d0p0
3
c7t0d0p0
4
c6t0d0p0
5
c5t0d0p0
6
c4t0d0p0
Creating a RAIDZ2 File System
A RAIDZ2 pool with the name z2pool is getting created with the command below. The file system /z2pool will get mounted automatically.jack@opensolaris:~# zpool create z2pool raidz2 c4t0d0p0 c5t0d0p0 c6t0d0p0 c7t0d0p0 c8t0d0p0 c9t0d0p0
The next step will be a simple check of the file system availability. Creating some load on the file system will makes things more realistic. The load generation will consist of creating a tar file from /usr in the back ground. The 4GB available should be enough and the command will need at least 5 minutes to complete. iobar is a good way to see graphically what's going on. The command iostat -xnc 2 will do the same job in a separate window.jack@opensolaris:~# cd /z2pool
jack@opensolaris:/z2pool# tar cf usr.tar /usr &
[1] 1641
jack@opensolaris:/z2pool# tar: Removing leading `/' from member
names
tar: Removing leading `/' from hard link targets
The zpool status command will tell us about the configuration of our file system:zpool status -v z2pool
pool: z2pool
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
z2pool ONLINE 0 0 0
raidz2 ONLINE 0 0 0
c4t0d0p0 ONLINE 0 0 0
c5t0d0p0 ONLINE 0 0 0
c6t0d0p0 ONLINE 0 0 0
c7t0d0p0 ONLINE 0 0 0
c8t0d0p0 ONLINE 0 0 0
c9t0d0p0 ONLINE 0 0 0
errors: No known data errors
Everything seems to be up and operational...
Creating a Disk Failure in a RAIDZ2 Volume
This is the fun part of the tutorial. The destructive one...
Let's pull out stick 4 and see what's happening:

The zpool status command will give an update:
zpool status -v z2pool pool: z2pool
state: DEGRADED
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
z2pool DEGRADED 0 0 0
raidz2 DEGRADED 0 0 0
c4t0d0p0 ONLINE 0 0 0
c5t0d0p0 ONLINE 0 0 0

c6t0d0p0 REMOVED 0 0 0
c7t0d0p0 ONLINE 0 0 0
c8t0d0p0 ONLINE 0 0 0
c9t0d0p0 ONLINE 0 0 0
errors: No known data errors
So far, so good ...
ZFS realizes that disk c6t0d0p0 is gone and the configuration is degraded. The file system is still operational as the 3 blinking LEDs of active sticks indicate in the photo above.
There's only one thing which is more fun than pulling out an operational disks:
Pulling out a second one...
The photo below documents that stick 2 got removed as well.

The command zpool status reflects the trouble we're in now:jack@opensolaris:zpool status -v z2pool
pool: z2pool
state: DEGRADED
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
z2pool DEGRADED 0 0 0
raidz2 DEGRADED 0 0 0
c4t0d0p0 ONLINE 0 0 0
c5t0d0p0 ONLINE 0 0 0

c6t0d0p0 REMOVED 0 0 0
c7t0d0p0 ONLINE 0 0 0

c8t0d0p0 REMOVED 0 0 0
c9t0d0p0 ONLINE 0 0 0
errors: No known data errors
This is as far as we can go with this configuration. 2 disks are removed. Everything is degraded and still operational. I leave it to the reader to pull another stick and see a corrupted file system.
Recovering from a degraded RAIDZ2 Volume
We are now in the situation to have four operational disks and two disks which have been ripped out. The next steps will show you how to clean up the mess.
The first step is to plug in stick 2 known to Solaris as c8t0d0p0. This is a special situation since ZFS labelled it and it knows c8t0d0p0 already.

This operation is the equivalent to reconnecting a functional disk. Replacing a broken disk 2 by a new disks would lead to a different situation. A new disk would need to be added and be told to replace the removed disks. I'm not covering this case here (I have no more memory sticks). I'm plugging in the remaining disconnected disk in the hope to regain a complete configuration.

The command zpool status tells us about the actions being taken by Solaris:jack@opensolaris:/z2pool# zpool status -v z2pool
pool: z2pool
state: ONLINE
status:
One or more devices is currently being resilvered. The pool
will
continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
scrub: r
esilver in progress for 0h0m, 21.32% done, 0h0m to go
config:
NAME STATE READ WRITE CKSUM
z2pool ONLINE 0 0 0
raidz2 ONLINE 0 0 0
c4t0d0p0 ONLINE 0 0 0
c5t0d0p0 ONLINE 0 0 0
c6t0d0p0 ONLINE 0 0 0
c7t0d0p0 ONLINE 0 0 0
c8t0d0p0 ONLINE 0 0 0
c9t0d0p0 ONLINE 0 0 0
errors: No known data errors
ZFS put both disks back into the state online and it is resilvering the two disks. 21% of the synchronisation has been completed at the time I checked. Keep in mind that the resilvering process takes much longer if there is concurrent other IO happening. Be aware the the times to bring everything back in a correct state depends
on the medium,
the size of the volume,
the parallel IO.
Real disks will expose very different characteristics!
ZFS may decide as well that the reinserted USB sticks may be damaged and it takes them offline. In this case it takes a
jack@opensolaris:/zpool clear
command to pretend that the disk is OK. The disk may then need to be brought online with the command
jack@opensolaris:/zpool online
These extra operations seem to depend on the time the stick has been removed and the state the stick was in when it has been removed.
Low cost memory sticks aren't made for professional data center operations. They seem to degrade over time through the rude handling from my side. Use the scrub command to validate that they are functional:jack@opensolaris:/z2pool# zpool scrub z2pool
jack@opensolaris:/z2pool# zpool status -v z2pool
pool: z2pool
state: ONLINE
scrub: s
crub completed after 0h0m with 0 errors on Thu Jul 3 06:38:58
2008
config:
NAME STATE READ WRITE CKSUM
z2pool ONLINE 0 0 0
raidz2 ONLINE 0 0 0
c4t0d0p0 ONLINE 0 0 0
c5t0d0p0 ONLINE 0 0 0
c6t0d0p0 ONLINE 0 0 0
c7t0d0p0 ONLINE 0 0 0
c8t0d0p0 ONLINE 0 0 0
c9t0d0p0 ONLINE 0 0 0
Keep in mind that scrub will check the entire disk. This command may need significant time. Calling it when parallel IO happens makes it run much longer!
This it what it takes wo work with RAIDZ2 volumes. RAIDZ volumes with one parity bit and less redundancy work the same way.
You should have learned within this tutorial:
How to create a RAIDZ2 volume ZFS with 2 parity volumes out of 6 USB sticks
How to it recovers after disk failures through resilvering
How to scrub a zpool
Wrap Up: Observations
USB memory sticks seem to come with slightly different capacities. rmformat educates about the available capacity. This may create trouble with operations where equal sized media is expected like mirroring. There are overriding options to force ZFS to move on. You may want to be very cautious with these options in productive situations
Gnome dialog about inserted disk: Gnome and the volume manager see that a ZFS labelled disk has been attached. It shows a modal dialog with an error message which states that a disk belonging to a named zpool has not been able to be mounted. The volume manager is unfortunately not smart enough to mount a multi disk ZFS file system automatically after all disks have been attached. The little modal dialog is however quite useful since it tells the user that the device has been recognized
Which hub and which sticks to pick? No idea. I purchased the cheapest available USB 2.0 components. They worked. Please drop a comment if you know more.
Which Solaris to use?
Solaris 10U4 on a Ultra 20: worked
Solaris Developer Express 1/08 on a Tecra A5: worked
OpenSolaris 2008.05 as live CD on a Ultra 20: worked best!
OpenSolaris 2008.05 in a VmWare image with Fusion on a MacPro seems to work as well
Solaris Developer Express 1/08 in VmWare image with VmWare Player on Windows XP didn't work for me
The simplest way to exercise the tutorial seems to be the OpenSolaris Live CD booted straight from CD. It worked like a charm and there is no significant risk to damage something.
I hope you'll enjoy this tutorial as much as I did. Use the ZFS Administration Manual to learn about the correct usage of ZFS. Consider to use the newest available Solaris version. OpenSolaris 2008.05 as a live CD worked best for me.
Released parts of the hands on tutorial up to now are:
Getting started, pool creation import and export of pools
Mirrors, managing disk failures and spare disks
RAIDZ2

Friday, July 24, 2009

Step Install Oracle 10g R2 on Solaris 10 x86

Step Install Oracle 10g R2 on Solaris 10 x86 from AZIZ’s BLOG
September 4, 2007 in Oracle, Solaris
Tags: Install Oracle 10g R2, Solaris 10 x86

Checking Requirement:

—————————-

#/usr/sbin/prtconf grep “Memory size” [Check RAM size]
# /usr/sbin/swap -s [check swap]
# df -k /tmp [check /tmp size (>400mb)]
# uname -r [check solaris version]

# pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibm SUNWlibms SUNWsprot SUNWsprox SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs SUNWxwfnt

# cat /etc/nsswitch.conf grep hosts
# hostname
# domainname

RUN INSTALL:
—————-
A. create group name “dba”, oracle inventory group “oinstall” and “oracle” user

# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba

{Determine oracle user exist or not
# id -a oracle
{if exist, should be look like this=
uid=440(oracle) gid=200(oinstall) groups=201(dba),202(oper)

{create oracle user=
# useradd -d /export/home/oracle -g dba -G oinstall -m -s /bin/ksh oracle

#mkdir /export/home/oracle
#chown oracle:dba /export/home/oracle

{set password=
# passwd -r files oracle

{to determine nobody user=
# id nobody
# /usr/sbin/useradd nobody >>run if does not exist

B. EDIT FILE /export/home/oracle/.profile
————————————–
umask 022
TMP=/tmp
TMPDIR=$TMP
DISPLAY=localhost:0.0
export TMP TMPDIR DISPLAY
ORACLE_BASE=/u01/app/oracle [replace with ur Oracle base Directory]
ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1 [replace with ur Oracle home Directory]

ORACLE_SID=jktdb [replace with your database]
PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH

C. Configure Kernel Parameter
—————————–
Note: Do not follow the official installation instruction, they contain misleading and out errors of fact!

#projadd oracle [This command will create a new 'resource project']
edit the /etc/user_attr file:
adm::::profiles=Log Management
lp::::profiles=Printer Management
root::::auths=solaris.*,solaris.grant;profiles=Web Console Management,All;lock_after_retries=no

oracle::::project=oracle [add this line]

then:

#su – oracle
$ id -p
$ prctl -n project.max-shm-memory -i project oracle

The display look like this:
project: 100: oracle
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
project.max-shm-memory
privileged 126MB – deny -
system 16.0EB max deny -

leaving the oracle user still connected in the original one Then, as root in the new terminal, you can issue this command:

#prctl -n project.max-shm-memory -v 4gb -r -i project oracle [create max memory to 4GB]

As soon as you’ve issued that command, switch back to the oracle user’s session and re-issue the earlier command:

$ prctl -n project.max-shm-memory -i project oracle

Note:
#prctl -n project.max-shm-memory -v 4gb -r -i project oracle [this setting will lost after reboot]
to set permanently, run this: #projmod -s -K “project.max-shm-memory=(priv,4gb,deny)” oracle

D. Performing the Oracle Installation
————————————-
#su – oracle
$xhost +
$export DISPLAY=localhost;0.0
$ xhost + >>run this if you install from remote PC
$ cd /export/home/database/ [the source unzipped here]

./runInstaller

FOR SOLARIS SPARC:
====================
$ gunzip ship_rel10_sol64_db.cpio.gz
$ cpio -idm < ship_rel10_sol64_db.cpio

$./runInstaller

If you found unsufficient SWAP disk space on your disk, create folder under / then run this command:
—————————————————
$ TMP=/directory
$ TMPDIR=/directory
$ export TMP TMPDIR

Follow the screen>>NEXT>>NEXT

last, run this as root user:
—————————-
/u01/app/oracle/oraInventory/orainstRoot.sh
/u01/app/oracle/product/10.2.0/db_1/root.sh

Create db:
———-
orc1
jktdb

E. 6.0 On-going Administration
——————————–
Finally, it’s time to get the web-based Enterprise Manager database administration tool up and running.
Since we’re using 10g Release 2, you should be able to launch a browser (Launch -> Web Browser) and simply navigate to : http://localhost:1158/em

If you do not know the correct port number to use, look for the following line in the $ORACLE_HOME/install/portlist.ini file.

in order to be able to log on as SYS with a password of whatever you supplied to the first screen of the Oracle installation wizard. In fact, getting a meaningful result at this point relies on three things having been performed successfully:

1. starting a listener (lsnrctl start)
2. opening the database (sqlplus / as sysdba then startup)
3. starting the Enterprise Manager agent (emctl start dbconsole)

F. Automating Database Startup
———————————————–
edit file “/var/opt/oracle/oratab” script to find lines with ‘Y’ at their ends
Create file “/etc/init.d/dbora”
——-
#!/bin/sh
ORA_HOME=/u01/app/oracle/product/10.2.0/db_1
ORA_OWNER=oracle

if [ ! -f $ORA_HOME/bin/dbstart ]
then
echo “Oracle startup: cannot start”
exit
fi

case “$1″ in
’start’)
su – $ORA_OWNER -c “$ORA_HOME/bin/dbstart”
;;
’stop’)
su – $ORA_OWNER -c “$ORA_HOME/bin/dbshut”
;;
esac

———
#chmod 777 /etc/init.d/dbora
#/etc/init.d/dbora stop

To integrate dbora file to standart Solaris startup and shutdown process:
————————————————————————
#ln -s /etc/init.d/dbora /etc/rc0.d/K01dbora
#ln -s /etc/init.d/dbora /etc/rc2.d/S99dbora

IF u found error this:
———————–
ORACLE_HOME_LISTNER is not SET, unable to auto-stop Oracle Net Listener

edit file “dbstart” & “dbshut”, find line $ORACLE_HOME_LISTNER=$1

and change to = $ORACLE_HOME_LISTNER=/u01/app/oracle/product/10.2.0/db_1

RECOMMENDED DIRECTORY STRUCTURE:
———————————————-

[Oracle Base Directory:]
/u01/app/oracle
/u01/app/orauser
/opt/oracle/app/oracle

[Oracle Inventory Directory:]
ORACLE_BASE/oraInventory

[Oracle Home Directory:]

ORACLE_BASE/product/10.2.0/db_1

[Identify an existing oracle base directory:]
#more /var/opt/oracle/oraInst.loc
[the output should be:]

inventory_loc=/u01/app/oracle/oraInventory
inst_group=oinstall

# more /var/opt/oracle/oratab

*:/u03/app/oracle/product/10.2.0/db_1:N

*:/opt/orauser/infra_904:N

*:/oracle/9.2.0:N

COMMON INSTALLATION ERROR:
===========================
Unable to convert from “UTF-8″ to “646″ for NLS!
Solution: Install SUNWuiu8 package.

error adduser:
———————
UX: useradd: ERROR: Inconsistent password files. See pwconv(1M)

This is because the /etc/passwd and /etc/shadow files are out of synchronization on your machine. [CSCdi74894]
To fix this, run the pwconv command, and then rerun cwconfigure.

try to run:

wc -l /etc/passwd /etc/shadow

————–
ERROR Checking monitor: must be configured to display at least 256 colors >>> Could not execute auto check for
display colors using command /usr/openwin/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed <<<<
Some requirement checks failed. You must fulfill these requirements before continuing with theinstallation, at which time they will be rechecked.

Solution(s):
1. Install SUNWxwplt package
2. Set DISPLAY variable
3. Execute xhost + on target (set in DISPLAY) computer

———————————————————-
Exception in thread “main” java.lang.UnsatisfiedLinkError:
… libmawt.so: ld.so.1: java: fatal: libXm.so.4: open failed: No such file or directory

Solution: Install the SUNWmfrun package.

—————————————————————————————————-
Can’t load ‘/usr/perl5/5.8.4/lib/i86pc-solaris-64int/auto/Sun/Solaris/Project/Project.so’ for module
Sun::Solaris::Project: ld.so.1: perl: fatal: libpool.so.1: open failed: No such file or directory at
/usr/perl5/5.8.4/lib/i86pc-solaris-64int/DynaLoader.pm line 230. at /usr/sbin/projadd line 19 Compilation
failed in require at /usr/sbin/projadd line 19. BEGIN failed–compilation aborted at /usr/sbin/projadd line 19.

Solution: Install the SUNWpool SUNWpoolr packages.

———————————————————————–
bash-3.00$ /u01/app/oracle/product/10.2.0/db_1/bin/./emctl start dbconsole
Exception in getting local host
java.net.UnknownHostException: -a: -a
at java.net.InetAddress.getLocalHost(InetAddress.java:1191)
at oracle.sysman.emSDK.conf.TargetInstaller.getLocalHost(TargetInstaller.java:4977)
at oracle.sysman.emSDK.conf.TargetInstaller.main(TargetInstaller.java:3758)
Exception in getting local host

Solution : check server hostname and /etc/hosts
————————————————————————-

UNINSTALL ORACLE 10G:
———————
1. remove all database, by running $dbca
2. stop any oracle process running:
Database Control : $ORACLE_HOME/bin/emctl stop dbconsole
Oracle Net listener : $ORACLE_HOME/bin/lsnrctl stop
iSQL*Plus : $ORACLE_HOME/bin/isqlplusctl stop
Ultra Search : $ORACLE_HOME/bin/searchctl stop

3. Start Oracle Universal installer:

$ORACLE_HOME/oui/bin/runInstaller

4. In the Welcome window, click Deinstall Products.
5. In the Inventory screen, select the Oracle home and the products that you want to remove,
then click Remove.

Possibly related posts: (automatically generated)

* Solaris Network configuration
* Oracle Enterprise Manager 10g R2
* Oracle 10g Administration in Simple Steps
* Tuning RHEL for Oracle 9i and 10g


Configuring IP Network Multipathing on Solaris

Configuring IP Network Multipathing on Solaris « AZIZ’s BLOG
Configuring IP Network Multipathing on Solaris

May 8, 2009 in Solaris
Tags: configure IPMP on Solaris, IP Network Multipathing, IPMP, IPMP failover

IPMP has the following features:

1. It eliminates a single network adapter as a single point of failure in these cases, ( a. Network adapter failure b. Network link failure)
2. It enables interfaces to fail over within approximately 10 seconds when using the default configuration.
3. It can be configured by adjusting the parameters in the ”/etc/default/mpathd” file.
4. It can be configured for use with both IPv4 and IPv6.
5. It enables interfaces to be configured as standby interfaces.

{IPMP failure detection:
Probe­-based failure detection
-detects network error by sending ICMP ECHO_REQUEST messages
Link based failure detection
-detects network error by checking the IFF_RUNING

How to Configure IPMP on Solaris

*PROBE-BASED IPMP*

{Probe-­Based IPMP Requirements:

* The Solaris 8 10/00 OS, as a minimum, must be installed.
* Unique MAC addresses must be configured on each network interface.
* Multiple network adapter interfaces must be connected on each subnet.
* An IPMP group name must be assigned to the group of interfaces.
* A test address is assigned to an interface.
* Additional hosts or devices must exist on the same subnet.

{Configuring Probe­-Based IPMP:

Sample:

IPMP FAILOVER WITH 2 FLOATING/PUBLIC IP ADDRESS:

{2 NIC address:
e1000g0 ip : 192.168.1.1
e1000g1 ip : 192.168.1.2

{2 floating/public address:
192.168.1.3
192.168.1.4

{edit /etc/hosts with your 4 IP address:

192.168.1.3 server-1 server loghost
192.168.1.4 server-2 loghost
192.168.1.1 server-e1000g0 loghost
192.168.1.2 server-e1000g1 loghost

Here are the step:

1. # cat /etc/release
2. # eeprom ”local-­mac-­address?=true”
3. # ifconfig e1000g0 192.168.1.1 netmask + broadcast + group ipmpserver deprecated -failover up
4. # ifconfig e1000g0 addif 192.168.1.3 netmask + broadcast + failover up
5. # ifconfig e1000g1 192.168.1.2 netmask + broadcast + group ipmpserver deprecated -failover standby up
6. # ifconfig e1000g1 addif 192.168.1.4 netmask + broadcast + ­failover up
7. # ifconfig ­-a

{Using configuration files:
1. # cat /etc/hostname.e1000g0
server-e1000g0 netmask + broadcast + group ipmpserver deprecated -failover up \
addif server-1 netmask + broadcast + failover up

2. # cat /etc/hostname.e1000g1
server-e1000g1 netmask + broadcast + group ipmpserver deprecated -failover standby up \
addif server-2 netmask + broadcast + failover up

3. # init 6

IPMP FAILOVER WITH 1 FLOATING/PUBLIC IP ADDRESS:

{2 NIC address:
e1000g0 ip : 192.168.1.1
e1000g1 ip : 192.168.1.2

{1 floating/public address:
192.168.1.3

{edit /etc/hosts with your 3 IP address:

192.168.1.3 server loghost
192.168.1.1 server-e1000g0
192.168.1.2 server-e1000g1

{Using configuration files:
1. # cat /etc/hostname.e1000g0
server-e1000g0 netmask + broadcast + group ipmpserver deprecated -failover up \
addif server netmask + broadcast + failover up

2. # cat /etc/hostname.e1000g1
server-e1000g1 netmask + broadcast + group ipmpserver deprecated -failover standby up

3. # init 6

*LINK-BASED IPMP*

{Link­-Based IPMP Requirements:

* Solaris 9 12/02 OS, at a minimum, must be installed.
* Network interfaces must use any of the following drivers: hme, eri, ce, ge, bge, qfe, dmfe, e1000g, ixgb, nge, nxge, rge, xge
* Unique MAC addresses must be configured on each of the interfaces.
* An IPMP group name must be assigned to interfaces

{Configuring Link­-Based IPMP

1. # cat /etc/release
2. # eeprom ”local­mac­address=true”
3. # ifconfig e1000g0 192.168.1.1 netmask + broadcast + group up
4. # ifconfig e1000g1 192.168.1.2 netmask + broadcast + group standby up
5. # ifconfig ­a

{Configuring Link­-IPMP – Administration Guide – IP ServicesBased IPMP using configuration files
1. # cat /etc/hostname.e1000g0
server-e1000g0 netmask + broadcast + group up

2. # cat /etc/hostname.e1000g1
server-e1000g1 netmask + broadcast + group standby up

3. # init 6

{Edit file “/etc/default/mpathd” to adjust failover detection timeout.

find the line “FAILURE_DETECTION_TIME=10000″.

the default config is 10000, it mean the failover will take around 10 seconds.

To test the interface failover and failback, use these commands:

#if_mpadm -d e1000g0 >> Dettach interface and force failover
#if_mpadm -r e1000g0 >> Reattach interface and failback

NOTE:

deprecated =the interface will not used for data traffic
-failover = the test interface (physical NIC) will not failover
+failover = the floating/public ip address will failover.


Reference:

IPMP – Administration Guide – IP Services

man ifconfig
man in.mpathd
docs.sun.com

——————————————————
COMMON ERROR Messages and Diagnostics
——————————————————
Test address address is not unique; disabling probe based failure detection on interface_name

Description:
For in.mpathd to perform probe-based failure detection, each test address in the group must be unique. Since the IPv6 test address is a link-local address derived from the MAC address, each IP interface in the group must have a unique MAC address.

——-
NIC interface_name of group group_name is not plumbed for IPv[4|6] and may affect failover capability

Description:
All NICs in a multipathing group must be homogeneously plumbed. For example, if a NIC is plumbed for IPv4, then all NICs in the group must be plumbed for IPv4. The streams modules pushed on all NICs must be identical.

——-
No test address configured on interface interface_name disabling probe-based failure detection on it

Description:
In order for in.mpathd to perform probe-based failure detection on a NIC, it must be configured with a test address: IPv4, IPv6, or both.

——-
The link has come up on interface_name more than 2 times in the last minute; disabling failback until it stabilizes.

Description:
In order to prevent interfaces with intermittent hardware, such as a bad cable, from causing repeated failovers and failbacks, in.mpathd does not failback to interfaces with frequently fluctuating link states.
——-

Invalid failure detection time assuming default 10000

Description:
An invalid value was encountered for FAILURE_DETECTION_TIME in the /etc/default/mpathd file.

——-
Too small failure detection time of time assuming minimum 100

Description:
The minimum value that can be specified for FAILURE_DETECTION_TIME is currently 100 milliseconds.
——-
Invalid value for FAILBACK value

Description:
Valid values for the boolean variable FAILBACK are yes or no.

——-
Invalid value for TRACK_INTERFACES_ONLY_WITH_GROUPS value

Description:
Valid values for the boolean variable TRACK_INTERFACES_ONLY_WITH_GROUPS are yes or no.
——-

Cannot meet requested failure detection time of time ms on (inet[6] interface_name) new failure detection time for group group_name is time ms

Description:
The round trip time for ICMP probes is higher than necessary to maintain the current failure detection time. The network is probably congested or the probe targets are loaded. in.mpathd automatically increases the failure detection time to whatever it can achieve under these conditions.
——-

Improved failure detection time time ms on (inet[6] interface_name) for group group_name

Description:
The round trip time for ICMP probes has now decreased and in.mpathd has lowered the failure detection time correspondingly.
——-

NIC failure detected on interface_name

Description:
in.mpathd has detected NIC failure on interface_name, and has set the IFF_FAILED flag on NIC interface_name.
——-

Successfully failed over from NIC interface_name1 to NIC interface_name2

Description:
in.mpathd has caused the network traffic to failover from NIC interface_name1 to NIC interface_name2, which is part of the multipathing group.
——-
NIC repair detected on interface_name

Description:

in.mpathd has detected that NIC interface_name is repaired and operational. If the IFF_FAILED flag on the NIC was previously set, it will be reset.

——-
Successfully failed back to NIC interface_name

Description:
in.mpathd has restored network traffic back to NIC interface_name, which is now repaired and operational.

——-
The link has gone down on interface_name

Description:
in.mpathd has detected that the IFF_RUNNING flag for NIC interface_name has been cleared, indicating the link has gone down.

——-
The link has come up on interface_name

Description:
in.mpathd has detected that the IFF_RUNNING flag for NIC interface_name has been set, indicating the link has come up.


Overview of Link Aggregation

To Configure Link Aggregation in a Solaris Environment

1. Aggregate e1000g0, e1000g1, e1000g2, and e1000g3 to form an aggregation and a random number as key, for example 33.

a. Unplumb the interfaces to be aggregated:

# ifconfig down unplumb e1000g0
# ifconfig down unplumb e1000g1
# ifconfig down unplumb e1000g2
# ifconfig down unplumb e1000g3


b. Create a link-aggregation group with key 33 without specifying mode:

# dladm create-aggr -d e1000g0 -d e1000g1 -d e1000g2 -d e1000g3 33


As the command returns, one line appears in the /etc/aggregation.conf file and indicates that the default mode is off, as shown in the following example:

# tail -1 /etc/aggregation.conf
# Use is subject to license terms.
#
# ident "@(#)aggregation.conf 1.1 05/09/01 SMI"
#
# DO NOT EDIT OR PARSE THIS FILE!
#
# Use the dladm(1m) command to change the contents of this file.

33 L4 2 e1000g4/0,e1000g5/0 auto off short
# dladm show-link aggr33
aggr33 type: non-vlan mtu: 1500 aggregation: key 33


2. Plumb up the interface aggrkey, which is aggr33 is this case:

# ifconfig aggr33 plumb
# ifconfig aggr33
aggr33: flags=1000842 mtu 1500 index 8
inet 0.0.0.0 netmask 0
ether 0:3:ba:d8:9d:e8

# ifconfig aggr33 192.168.1.1/24 broadcast + up

# ifconfig aggr33
aggr33: flags=1000843 mtu 1500 index 8
inet 192.168.1.1 netmask ffffff00 broadcast 192.168.1.255
ether 0:3:ba:d8:9d:e8


3. Show link aggregation status again.

Now the state should become attached:

# dladm show-aggr
key: 33 (0x0021) policy: L4 address: 0:14:4f:6c:11:8 (auto)
device address speed duplex link state
e1000g0 0:14:4f:6c:11:8 1000 Mbps full up attached
e1000g1 0:14:4f:6c:11:9 1000 Mbps full up attached
e1000g2 0:14:4f:6c:11:a 1000 Mbps full up attached
e1000g3 0:14:4f:6c:11:b 1000 Mbps full up attached


4. Use the dladm show-aggr -s command to display statistics:

# dladm show-aggr -s
key: 33 ipackets rbytes opackets obytes %ipkts %opkts
Total 380354 25872976 28 2648
e1000g0 95089 6468278 7 662 25.0 25.0
e1000g1 95089 6468278 7 662 25.0 25.0
e1000g2 95089 6468278 7 662 25.0 25.0
e1000g3 95087 6468142 7 662 25.0 25.0




5. Use the dladm show-aggr -L command to display LACP specific information:

# dladm show-aggr -L
key: 33 (0x0021) policy: L4 address: 0:14:4f:6c:11:8 (auto)
LACP mode: off LACP timer: short
device activity timeout aggregatable sync coll dist defaulted expired
e1000g0 passive short yes no no no no no
e1000g1 passive short yes no no no no no
e1000g2 passive short yes no no no no no
e1000g3 passive short yes no no no no no


For more information refer to the man pages for dladm, man dladm.

Solaris Link Aggregation - AZIZ’s BLOG

AZIZ’s BLOG
Link aggregation or IEEE 802.1AX-2008, is a computer networking term which describes using multiple network cables/ports in parallel to increase the link speed beyond the limits of any one single cable or port, and to increase the redundancy for higher availability.

Most implementations now conform to what used to be clause 43 of IEEE 802.3-2005 Ethernet standard, usually still referred to by its working group name of “IEEE 802.3ad”. The Link Aggregation definition has since been moved to a standalone IEEE 802.1AX standard. (wikipedia.org)

Here’s the sample of setup aggregation link between :

e1000g0 and e1000g1
e1000g2 and e1000g3

Make sure your eeprom’s local-mac-address? variable is set to true (you don’t need this for x86):

# eeprom local-mac-address?
local-mac-address=false

# eeprom local-mac-address? = true

# eeprom local-mac-address?
local-mac-address?=true

1. Unplumb the interfaces to be aggregated:
# ifconfig e1000g0 down unplumb
# ifconfig e1000g1 down unplumb
# ifconfig e1000g2 down unplumb
# ifconfig e1000g3 down unplumb

2. Create a link-aggregation group with key 1 and 2:

{format= dladm create-aggr -d

interface Represents the device name of the interface to become part of the aggregation.
key Is the number that identifies the aggregation. The lowest key number is 1. Zeroes are not allowed as keys.

# dladm create-aggr -d e1000g0 -d e1000g1 1
# dladm create-aggr -d e1000g2 -d e1000g3 2

# dladm show-link aggr1
# dladm show-link aggr2

3. Plumb up the interface aggrkey, add ip address:

# ifconfig aggr1 plumb
# ifconfig aggr2 plumb

# ifconfig aggr1 192.168.1.1 netmask 255.255.255.0 up
# ifconfig aggr2 192.168.1.2 netmask 255.255.255.0 up

4. Show link aggregation status:

# dladm show-aggr >>check the status
# dladm show-aggr -s >>to display statistics
# dladm show-aggr -L >>to display LACP specific information

5. Make the IP configuration of the link aggregation persist across reboots

create “/etc/hostname.aggrkey” file
# vi /etc/hostname.aggr1
192.168.1.1
# vi /etc/hostname.aggr2
192.168.1.2

for further reference:

http://docs.sun.com/source/820-3084-10/link_aggregation.html