Friday, December 28, 2012

RedHat: sudo enablement

there are 2 files should be changed:

/etc/sudoers

1. Add user:
aniu01 ALL=(ALL) ALL
or
aniu01 ALL= NOPASSWD: /sbin
or
aniu01, %ccusers ALL= NOPASSWD: /sbin/pvscan, /sbin/vgscan
2. Add group
%wheel ALL=(ALL) ALL
or
%ccusers ALL= NOPASSWD: /sbin/pvscan, /sbin/vgscan

/etc/pam.d/su
add below entry:
auth            required        pam_ccusers.so use_uid

Thursday, December 13, 2012

Cognos: java.lang.InvalidClassChangeError

http://www-01.ibm.com/support/docview.wss?uid=swg21504307

Problem(Abstract)

Certain malformed inputs, when sent to IBM Cognos Business Intelligence v10.1.0 URLs or parameters, can cause the JIT compiled code to crash and effectively disable IBM Cognos Business Intelligence v10.1.0.

Symptom

IBM Cognos Business Intelligence v10.1.0 becomes unresponsive and report portlets that display IBM Cognos Business Intelligence v10.1.0 data might display errors similar to java.lang.InvalidClassChangeError.

Resolving the problem

Disable the Store Sinking optimization of the JIT for both IBM Cognos Business Intelligence v10.1.0 application servers, CognosX_GW and CognosX_Disp. To disable the Store Sinking optimization, set the parameter -Xjit:disableStoreSinking in the JVM arguments for both the CognosX_GW server and the CognosX_Disp server. Use the following steps:
  1. Open a WebSphere Application Server administrative console and log on as an administrative user.
  2. Click Servers -> Server Types -> WebSphere Application Servers -> CognosX_GW.
  3. Click Server Infrastructure -> Java and Process Management -> Process definition.
  4. Click Additional Properties -> Java Virtual Machine.
  5. At the beginning of the Generic JVM arguments field, before the existing arguments, enter the following value followed by a space : -Xjit:disableStoreSinking
  6. Click Apply and save the configuration.
  7. Restart the CognosX_GW WebSphere Application Server.
  8. Repeat steps 1-7 but replace the CognosX_GW server with the CognosX_Disp server.

Thursday, December 6, 2012

Tuesday, December 4, 2012

How to start and stop Oracle

Quoted from: http://www.thegeekstuff.com/2009/01/oracle-database-startup-and-shutdown-procedure/

log in as oracle


Connect to oracle sysdba

Make sure ORACLE_SID and ORACLE_HOME are set properly as shown below.
 $ env | grep ORA
ORACLE_SID=TESTDB
ORACLE_HOME=/opt/oracle/product/10.2.0


connect using either “/ as sysdba” or an oracle account that has DBA privilege.
 $ sqlplus '/ as sysdba'

SQL>




Start Oracle Database

The default SPFILE (server parameter file) is located under $ORACLE_HOME/dbs. Oracle will use this SPFILE during startup, if you don’t specify PFILE.

Oracle will look for the parameter file in the following order under $ORACLE_HOME/dbs. If any one of them exist, it will use that particular parameter file.
 1.spfile$ORACLE_SID.ora
 2.spfile.ora
 3.init$ORACLE_SID.ora


Type “startup” at the SQL command prompt to startup the database as shown below.
 SQL> startup


How To Shutdown Oracle Database

Following three methods are available to shutdown the oracle database:
  1. Normal Shutdown
  2. Shutdown Immediate
  3. Shutdown Abort

1. Normal Shutdown

During normal shutdown, before the oracle database is shut down, oracle will wait for all active users to disconnect their sessions. As the parameter name (normal) suggest, use this option to shutdown the database under normal conditions.
SQL> shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>

2. Shutdown Immediate

During immediate shutdown, before the oracle database is shut down, oracle will rollback active transaction and disconnect all active users. Use this option when there is a problem with your database and you don’t have enough time to request users to log-off.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>

3. Shutdown Abort

During shutdown abort, before the oracle database is shutdown, all user sessions will be terminated immediately. Uncomitted transactions will not be rolled back. Use this option only during emergency situations when the “shutdown” and “shutdown immediate” doesn’t work.
$ sqlplus '/ as sysdba'
SQL*Plus: Release 10.2.0.3.0 - Production on Sun Jan 18 11:11:33 2009
Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.
Connected to an idle instance.

SQL> shutdown abort
ORACLE instance shut down.

Thursday, November 29, 2012

WAS ND 8: Migration


Based on the problem description, you are planning to migrate WASv7.0 ND environment to WASv8.5. You can use migration wizard in a graphical environment or migration tool (WASPreUpgrade and  WASPostUpgrade commands) in a non-graphical environment. For the best practice guide, please refer to the following document links:

Migration Planning and Best Practices Guide
http://www-01.ibm.com/support/docview.wss?rs=180&uid=swg27008724#presentation

Migrating product configurations
http://pic.dhe.ibm.com/infocenter/wasinfo/v8r5/index.jsp?topic=%2Fcom.ibm.websphere.migration.nd.doc%2Fae%2Ftmig_admin.html

Friday, November 23, 2012

MQ: Practice

crtmqm -c "ART Actimize POC QMgr" -ll -lp 2 -ls 3 -u ART.DEAD.LETTER.QUEUE ART.ACTIMIZE.QMGR
 strmqm -x ART.ACTIMIZE.QMGR
nohup runmqlsr -t tcp -p 1415 -m ART.ACTIMIZE.QMGR >/dev/null 2>&1 &
runmqsc ART.ACTIMIZE.QMGR
DEFINE QLOCAL('ART.DEAD.LETTER.QUEUE')
ALTER QMGR DEADQ('ART.DEAD.LETTER.QUEUE')
DEFINE CHANNEL('ART.ACTIMIZE.CHL') CHLTYPE(SVRCONN)
START CHANNEL('ART.ACTIMIZE.CHL')
START CHANNEL('ART.ACTIMIZE.SVRCONN')
dltmqm ART.QMGR

Thursday, November 15, 2012

Java: Add Certificate to cacert

1. change folder to $JAVA_HOME/jre/lib/security using user root
# cd $JAVA_HOME/jre/lib/security
2. backup cacerts
3. aquire certificate will be imported as /var/tmp/ARTICYFG-root-cert.cert
4. import it into cacerts
# keytool -import -alias ARTICYFG-ROOT-CERT -keystore cacerts -file /var/tmp/ARTICYFG-root-cert.cert
5. verify the imported certificate
#  keytool -list -v -keystore cacerts -alias ARTICYfg-root-cert

Wednesday, November 14, 2012

Restricting or allowing access to the administrative console based on client IP or DNS hostname

Question

Is it possible to restrict access to the WebSphere Application Server administrative console to specific client IPs?

Answer

If a client has a requirement to allow access to the administrative console from only certain originating IPs, then it can be configured as follows.
  1. Open the Deployment Manager Console to WebSphere Application Server Network Deployment (it can be the base Application Server as well) to the following:

    Servers > Application servers > server_name > Web container transport chains > WCInboundAdminSecure > TCP inbound channel
  2. Under General Properties, work with the following 4 fields:

    Note: Multiple IPs or hostnames can be added in any of the preceding fields (as needed), but they need to be separated by a comma.

Tuesday, November 13, 2012

Thread dump & heap dump — Presentation Transcript

https://www.ibm.com/developerworks/community/groups/service/html/communityview?communityUuid=2245aa39-fa5c-4475-b891-14c205f7333c


From http://www.slideshare.net/josephamrithraj/thread-dump-heap-dump-4008612

Resources:

Thread dump & heap dump — Presentation Transcript

  • 1. Thread dump & Heap Dump in websphere
  • 2. In this session, What is Thread/Heap dump? When to generate ? How to generate ? How to debug ?
  • 3. Thread Dump
    What is a Thread Dump? A thread represents a work item or task, such as a servlet request. Java processes are usually multi-threaded. This means there can be many tasks occurring simultaneously (multi-threading) within one JVM process. Java thread dumps provide a Java view of a failing JVM process. A Java dump provides information about the executing Java classes and allows the problem determination process to reference the Java source code.
  • 4. When to generate
    If you get unexplained server hangs under WebSphere, you can obtain, from the WebSphere server, a thread dump to help diagnose the problem. In the case of a server hang, you can force an application to create a thread dump. If an application server spontaneously dies, look for a file. The JVM creates the file in the product directory structure, with a name like javacore[number].txt.
  • 5. How to generate
    On unix/Linux machines find the process id (PID) of the hung JVM and issue kill -3 PID. Look for an output file in the installation root directory with a name like javacore.date.time.id.txt. Using wasadminprompt:get the handle of the server wsadmin>set jvm [$AdminControlcompleteObjectName type=JVM,process=server1,*] then execute wsadmin>$AdminControl invoke $jvmdumpThreads
  • 6. Analysis
    Download thread analyzer from IBM website to analyze the generated thread dumps. - http://www.alphaworks.ibm.com/tech/jca
  • 7. Heap Dump
    A heapdump is a snapshot of JVM memory. it shows the live objects on the heap along with references between objects. It is used to determine memory usage patterns and memory leak suspects. When to generate? Memory leaks in the Java heap produce java.lang.OutOfMemoryError exceptions in log files. However, not all out-of-memory errors are caused by Java heap memory leaks. Out-of-memory errors can also be caused by the following conditions: Java heap fragmentation. This fragmentation occurs when no contiguous chunk of free Java heap space is available from which to allocate Java objects. Various causes for this problem exist, including the presence of pinned or dosed objects or because of the repeated allocation of large objects. Memory leaks in native heap. This problem occurs when a native component, like DB2 connections, is leaking.
  • 8. How to generate
    To enable automated heap dump generation support, perform the following steps in the administrative console: (heap dump will generated upon receiving the out.of.memoryexceptios) 1. Click Servers > Application servers in the administrative console navigation tree. 2. Click server_name >Runtime Performance Advisor Configuration. 3. Click the Runtime tab. 4. Select the Enable automatic heap dump collection check box. 5. Click OK. To generate manually use kill -3 PID on unix/linux machines. Using WSADMIN tool Invoke the generateHeapDump operation on a JVMMBean, for example, * Finding JVMobjectName: <wsadmin> set objectName [$AdminControlqueryNamesWebSphere:type=JVM,process=<servername>,node=<nodename>,*] * Invoking the generateHeapDump operation on JVMMBean: <wsadmin> $AdminControl invoke $objectNamegenerateHeapDump
  • 9. Analysis
    heap dumps can be found under profile_rootprofile-name with naming heapdump.<date>..<timestamp><pid>.phdUse HeapAnalyzer or MDD4J for analyzing heap dumps

Thursday, November 8, 2012

WAS: PCT Response file questions

Scenario 1: 4 nodes
Node 1: DeploymentManager + ApplicationServer1

Node 2: ApplicationServer2
Node 3: IHS WebServer1
Node 4: IHS WebServer2
 
Node1 and Node2 clustered.
 
Question 1: which server hostname should be for wasMachineHostName? Deployment manager server hostname? Or ApplicationServer1 hostname? Or ApplicationServer2 hostname?
ANSWER:   It does not matter which hostname.  I would probably use the hostname of the deployment manager myself.  But it really does not matter ether way.  Be sure to choose REMOTE in the PCT, and also you will want to configure the IHS Admin Server  so that you can remotely manage both IHS web servers from the WAS Admin Console.

 
Scenario 2: 2 nodes
Node 1: DeploymentManager + ApplicationServer1 +  IHS WebServer1
Node 2: ApplicationServer2 + IHS WebServer2
 
Question 1: how to decide configType value for WebServer1 and WebServer2
ANSWER:  If the web server is on the same system as the WAS appserver, then it is LOCAL.  In this case, use LOCAL for both of them.

Question 2: what should be the value of profileName for WebServer1?
ANSWER:  for LOCAL scenario, always use the profile name of the WAS node (ie. AppSrv01).  Never use the deployment manager profile name (ie. Dmgr01).

Question 3: What should be the value of wasMachineHostName for WebServer1?
ANSWER:  wasMachineHostName is only used for REMOTE scenario.  So, you do not need that variable at all in this LOCAL case.

Question 4: what should be the value of profileName for WebServer2?
ANSWER:   use the name of the WAS node profile (ie. AppSrv01).

Question 5: what should be the value of wasMachineHostName for WebServer2?
ANSWER:  this is a LOCAL scenario so wasMachineHostName is not needed.

Monday, November 5, 2012

WebSphere: Compile JSP

/opt/IBM/WebSphere/AppServer/profiles/LTSLUATAppNode2/bin/JspBatchCompiler.sh -enterpriseapp.name BPS -webmodule.name BPS.war -cell.name LTSLUATCell -node.name LTSLUATAppNode2 -server.name LTSLUATAppServer2 -filename LTSCAFApi.jsp -keepgenerated true -forceCompilation true -log.level FINEST > jspbatchcompiler.out 2>&1

Saturday, November 3, 2012

Set up Samba on Linux

Set Up Steps

The following samba modules are required:
# rpm -qa | grep -i samba
samba-common-3.0.33-3.29.el5_5.1
samba-client-3.0.33-3.29.el5_5.1
samba-3.0.33-3.29.el5_5.1
perl-5.8.8-27.el5.x86_64.rpm
perl-Convert-ASN1-0.20-1.1.noarch.rpm  

mount /net/todnfs03/vol/archive/RedHat/RHEL5-U4-x86_64/rhel-server-5.4-x86_64-dvd.iso /mnt -o loop

cd Server



# rpm -ivh ./perl-5.8.8-27.el5.x86_64.rpm                                                                                          ! Check if already installed. Rpm –qa | grep –i perl
warning: ./perl-5.8.8-27.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
        package perl-5.8.8-27.el5.x86_64 is already installed
# rpm -ivh perl-Convert-ASN1-0.20-1.1.noarch.rpm                                                                          ! Check if already installed
warning: perl-Convert-ASN1-0.20-1.1.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:perl-Convert-ASN1      ########################################### [100%]
# rpm -ivh ./samba-3.0.33-3.14.el5.x86_64.rpm                                                                                ! Due to yum updates, install this module with --nodeps
warning: ./samba-3.0.33-3.14.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:samba                  ########################################### [100%]


Register the server with RHN for updates. Due to a shortage of licenses, currently the server cannot be patched to the latest updated. Check with Ziyan to manually patch Samba to samba-3.0.33-3.29.el5_5.1

rhnreg_ks --activationkey 1-91f9873ace9acf35defa1c52f6348616 --serverUrl https://inf-bcclu1rhn01.goweekend.ca/XMLRPC --sslCACert=/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT
An error has occurred:

Error Message:
    Registration failed: RHN Software Management service entitlements exhausted
Error Class Code: 91
Error Class Info: Registration token unable to entitle system: maximum membership exceeded
Explanation:
    Your organization does not have enough Management entitlements to register this
    system to Red Hat Network. Please notify your organization administrator of this error.
    You should be able to register this system after your organization frees existing
    or purchases additional entitlements. Additional entitlements may be purchased by your
    organization administrator by logging into Red Hat Network and visiting
    the 'Subscription Management' page in the 'Your RHN' section of RHN.

    A common cause of this error code is due to having mistakenly setup an
    Activation Key which is set as the universal default.  If an activation key is set
    on the account as a universal default, you can disable this key and retry to avoid
    requiring a Management entitlement.
See /var/log/up2date for more information
#

scp inf-fcplx1svc03:/etc/samba/smb.conf /etc/samba/                             ! copy sample samba.conf file . Check for “fnettest” for shared samba entry

==========================================smb.conf =====================

[global]
        workgroup = SACMCM
        server string = CRM
        netbios name = crm-bccldvapp01
        guestok = no
      
      
        hosts allow = 10.115. , 10.193.
        # logs split per machine
        log file = /var/log/samba/smbd.log
        # max 50KB per log file, then rotate
        max log size = 50
        security = ADS
        realm = ADROOT.GOWEEKEND.CA
        password server = kdc.goweekend.ca
        encrypt passwords = yes
        smb passwd file = /etc/samba/smbpasswd
  unix password sync = Yes
  passwd program = /usr/bin/passwd %u
  passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
  username map = /etc/samba/smbusers
  socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
        # the login script name depends on the machine name
        # the login script name depends on the unix user used
        # disables profiles support by specifing an empty path
        local master = no
        wins support = yes
        dns proxy =  no
  preserve case = yes
  short preserve case = yes
  case sensitive = yes
        load printers = no
        cups options = raw
        #obtain list of printers automatically on SystemV
        map archive = no
        map hidden = no
        map system = no
   idmap uid = 16777216-33554431
   idmap gid = 16777216-33554431
   template shell = /bin/false
   winbind use default domain = no
[crm]
   comment = MVDR Log
   path = /apps/crm
   valid users = aniu01 mj08
   read list = aniu01
   write list = aniu01 ydong09
   force user = aniu01
   public = no
   writable = yes
   printable = no

====================================End of smb.conf ========================


# net ads join -U adm-userid
adm-userid's password:                                                                     ! Enter domain adm password
Failed to set password for machine account (NT_STATUS_ACCESS_DENIED)
Failed to join domain: Access denied                                                     ! Work with AD admin to enable machine to join domain

#

Modify /etc/hosts to add the following lines

9.115.97.49  samba.goweekend.ca samba


Start Samba

/etc/smb start


Goto workstation

Start>Run>\\samba.goweekend.ca


Tuesday, October 30, 2012

WAS: Configure Secure File Transfer

 Configure Secure File Transfer


The filetransferSecured application shall be installed to ensure that the deployment manager only responds to file transfer requests from trusted servers in the cell, when it communicates configuration updates to node agents.

The commands to install the filetransferSecured application (if not already installed as part of default) are:

Ø              cd <profilehome>\bin
Ø              wsadmin.bat -user <wasadminuser> -password <waspassword>
Ø              wsadmin> source ../../../bin/redeployFileTransfer.jacl
Ø              wsadmin>fileTransferAuthenticationOn <your cell name> <dmgr node name> dmgr
Ø              wsadmin>$AdminConfig save

This will ensure that configuration updates are legitimate and eliminates the risk of configuration settings getting compromised.


To determine the current state of the file transfer authentication, see the systemapps.xml file in the <WAS_INSTALL_DIR>/AppServer/profiles/<PROFILE>/config/cells/cell_name/nodes/node_name directory:

·         This entry indicates that authentication is on:

<deployedApplications>${app_server_root}/
   systemApps/filetransferSecured.ear</deployedApplications>

·         This entry indicates that authentication is off:

<deployedApplications>${app_server_root}/
   systemApps/filetransfer.ear</deployedApplications>

Thursday, October 25, 2012

WAS: enable JVM trace

1. Add both of the following Generic JVM Arguments in the WebSphere     
Admin Console:                                                          
                                                                        
-Xtrace:none -Xtrace:maximal=mt,methods={com/ibm/jsse2/SSLSocketImpl.<init>} -Xtrace:trigger=method{com/ibm/jsse2/SSLSocketImpl,jstacktrace} -Xtrace:stackdepth=25,output={sslsockettrace,50m} -Xdump:system:events=systhrow,filter=java/lang/OutOfMemoryError                                       
                                                                        
The use of -Xtrace:none at the beginning turns off the default Java     
trace, which can be verbose. This allows us to see the java stack traces
we want more clearly in the trace file.                                 
                                                                        
2. This setting is expected to produce a binary trace file named        
sslsockettrace. Once the OOM has been reproduced, please format the     
binary trace created from the argument above by issuing the following   
command from the WPS install root/java/bin directory. Here's an example:
                                                                        
D:/IBM/WPS/java/bin/java com.ibm.jvm.format.TraceFormat sslsockettrace  
                                                                        
3. Then send in the formatted file, which will be named:                
                                                                        
sslsockettrace.fmt          

Tuesday, October 23, 2012

PCT/WCT Logs

The following configuration files and logs should be collected to investigate
failures related to PCT configuration actions. This includes problems with the
execution of the underlying ant scripts, utilization of input parameters, creation
of the IBM HTTP Adminstration Service (windows), creation of the
configurewebserver(x).bat, etc..
LOGS:
1. WebServerPluginConfiguration.log
2. wct.log
3. configure_<WEBSERVER_TYPE>_webserver.log
4. install<WEBSERVER_TYPE>Plugin.log
5. IHSAdminConfiguration.log
(if configuring IBM HTTP Administration Server)

Friday, October 19, 2012

Certificate: Load certificate into Java JRE Key Store

keystore default password is changeit
1. change folder to $JAVA_HOME/jre/lib/security using user root
# cd $JAVA_HOME/jre/lib/security
2. backup cacerts
3. aquire certificate will be imported as /var/tmp/my-root-cert.cert
4. import it into cacerts
# keytool -import -alias MY-ROOT-CERT -keystore cacerts -file /var/tmp/my-root-cert.cert
5. verify the imported certificate
# keytool -list -v -keystore cacerts
Alias name: my-root-cert
Creation date: 19-Oct-2012
Entry type: trustedCertEntry
Owner: O=MY, C=CA
Issuer: O=MY, C=CA
Serial number: 4eb0261b
Valid from: Tue Nov 01 12:32:27 EDT 2011 until: Sat Nov 01 13:02:27 EDT 2031
Certificate fingerprints:
         MD5:  97:F6:B9:70:6B:FA:A6:BD:B9:17:52:77:2E:E7:AC:11
         SHA1: D6:CF:7E:5A:BD:6A:76:EF:54:7D:95:B0:EC:4E:80:B1:62:9D:61:A1
or
#  keytool -list -v -keystore cacerts -alias my-root-cert

Thursday, October 18, 2012

Power Path: Linux to discover new LUN


1. display existing LUN using powermt command

# powermt display dev=all

save the output to compare later

2. list disks using command fdisk
# fdisk -l > /tmp/b4scan.txt

3. force system to scan new LUN
# echo - - - > /sys/class/scsi_host/host0/scan

4. list disks using command fdisk
# fdisk -l > /tmp/afterscan.txt

5. diff /tmp/afterscan.txt and /tmp/b4scan.txt to check if any new disk discovered.
# diff /tmp/afterscan.txt /tmp/b4scan.txt

6. force power path to rescan
# powermt config

7. verify if the new LUN discovered.

Monday, October 15, 2012

WebSphere: PCT command line

Problem:
wctcmd.bat -tool pct -defLocPathname "C:\Program Files (x86)\IBM\WebSphere\Plugins" -defLocName webserver1 -response C:\apps\dmgr.rsp


Launching tool pct ...
com.ibm.wsspi.profile.WSProfileException: File wasprofile.properties could not be located.

Resolution:

The solution to the problem is to use  "double" backward-slashes to replace the single backward-slashes in the paths in your response file. e.g,  d:\windows\a --> d:\\windows\\a

i.e.:

configType=local_distributed
enableAdminServerSupport=true
enableWinService=true
ihsAdminPort=8008
ihsWindowsStartupType=auto
mapWebServerToApplications=true
profileName=Dmgr01
wasExistingLocation=C:\\Program Files (x86)\\IBM\\WebSphere\\AppServer
wasMachineHostName=WASABCCWDVAPP02
webServerConfigFile1=C:\\Program Files (x86)\\IBM\\HTTPServer\\conf\\httpd.conf
webServerDefinition=webserver1
webServerHostName=WASABCCWDVAPP02.goweekend.ca
webServerInstallArch=32
webServerPortNumber=80
webServerSelected=ihs
webServerType=IHS

Friday, October 12, 2012

Solaris 10: Find LUN id

Step 1. Use format command to find your disk.

      12. c4t60060480000190105493533033443843d0 <EMC-SYMMETRIX-5773 cyl 65533 alt 2 hd 120 sec 269>
          /scsi_vhci/ssd@g60060480000190105493533033443843

Step 2. Find Logical Path of the disk

# luxadm probe|grep c4t60060480000190105493533033443843d0
    Logical Path:/dev/rdsk/c4t60060480000190105493533033443843d0s2

Step 3. Get Device Address
# luxadm display /dev/rdsk/c4t60060480000190105493533033443843d0s2
DEVICE PROPERTIES for disk: /dev/rdsk/c4t60060480000190105493533033443843d0s2
  Vendor:               EMC    
  Product ID:           SYMMETRIX      
  Revision:             5773
  Serial Num:           105493"R0
  Unformatted capacity: 1035787.500 MBytes
  Read Cache:           Enabled
    Minimum prefetch:   0x0
    Maximum prefetch:   0xffff
  Device Type:          Disk device
  Path(s):
  /dev/rdsk/c4t60060480000190105493533033443843d0s2
  /devices/scsi_vhci/ssd@g60060480000190105493533033443843:c,raw
   Controller           /devices/pci@500/pci@0/pci@9/SUNW,qlc@0/fp@0,0
    Device Address              50060482d531e552,335    Host controller port WWN    21000024ff3019ea
    Class                       primary
    State                       ONLINE
   Controller           /devices/pci@500/pci@0/pci@9/SUNW,qlc@0,1/fp@0,0
    Device Address              50060482d531e558,335    Host controller port WWN    21000024ff3019eb
    Class                       primary
    State                       ONLINE

Thursday, October 11, 2012

Solaris 10 HBA & NIC

bash-3.00# cfgadm -al -o show_SCSI_LUN
Ap_Id                          Type         Receptacle   Occupant     Condition
c2                             fc-fabric    connected    configured   unknown
c2::5006016646e04c1b,0         disk         connected    configured   unknown
c2::5006016646e04c1b,1         disk         connected    configured   unknown
c2::5006016c46e04c1b,0         disk         connected    configured   unknown
c2::5006016c46e04c1b,1         disk         connected    configured   unknown
c2::50060482d531e552,0         disk         connected    configured   unknown
c2::50060482d531e552,821       disk         connected    configured   unknown
c2::5006048ad52ea508,263       disk         connected    configured   unusable
c3                             fc-fabric    connected    configured   unknown
c3::5006016446e04c1b,0         disk         connected    configured   unknown
c3::5006016446e04c1b,1         disk         connected    configured   unknown
c3::5006016e46e04c1b,0         disk         connected    configured   unknown
c3::5006016e46e04c1b,1         disk         connected    configured   unknown
c3::50060482d531e558,0         disk         connected    configured   unknown
c3::50060482d531e558,821       disk         connected    configured   unknown
c3::5006048ad52ea507,263       disk         connected    configured   unusable

prtconf -D

                network, instance #0 (driver name: nxge)
                network, instance #1 (driver name: nxge)
                network, instance #2 (driver name: nxge)
                network, instance #3 (driver name: nxge)
bash-3.00# dladm show-dev
nxge0           link: up        speed: 100   Mbps       duplex: full
nxge1           link: up        speed: 1000  Mbps       duplex: full
nxge2           link: up        speed: 1000  Mbps       duplex: full
nxge3           link: unknown   speed: 0     Mbps       duplex: unknown
bash-3.00# dladm show-link
nxge0           type: non-vlan  mtu: 1500       device: nxge0
nxge1           type: non-vlan  mtu: 1500       device: nxge1
nxge2           type: non-vlan  mtu: 1500       device: nxge2
nxge3           type: non-vlan  mtu: 1500       device: nxge3
aggr1           type: non-vlan  mtu: 1500       aggregation: key 1

bash-3.00# fcinfo hba-port
HBA Port WWN: 21000024ff3019ea
        OS Device Name: /dev/cfg/c2
        Manufacturer: QLogic Corp.
        Model: 375-3356-02
        Firmware Version: 05.03.02
        FCode/BIOS Version:  BIOS: 2.02; fcode: 2.01; EFI: 2.00;
        Serial Number: 0402H00-1028846443
        Driver Name: qlc
        Driver Version: 3.00p
        Type: N-port
        State: online
        Supported Speeds: 1Gb 2Gb 4Gb
        Current Speed: 2Gb
        Node WWN: 20000024ff3019ea
HBA Port WWN: 21000024ff3019eb
        OS Device Name: /dev/cfg/c3
        Manufacturer: QLogic Corp.
        Model: 375-3356-02
        Firmware Version: 05.03.02
        FCode/BIOS Version:  BIOS: 2.02; fcode: 2.01; EFI: 2.00;
        Serial Number: 0402H00-1028846443
        Driver Name: qlc
        Driver Version: 3.00p
        Type: N-port
        State: online
        Supported Speeds: 1Gb 2Gb 4Gb
        Current Speed: 2Gb
        Node WWN: 20000024ff3019eb
bash-3.00# prtconf -vp | grep -i wwn
                    node-wwn:  20000024.ff3019ea
                    port-wwn:  21000024.ff3019ea
                    node-wwn:  20000024.ff3019eb
                    port-wwn:  21000024.ff3019eb
# prtpicl -v | grep wwn
:node-wwn  20  00  00  1b  32  xx  xx  xx
:port-wwn  21  00  00  1b  32  xx  xx  xx
:node-wwn  20  01  00  1b  32  yy  yy  yy
:port-wwn  21  01  00  1b  32  yy  yy  yy
bash-3.00# luxadm -e port
/devices/pci@500/pci@0/pci@9/SUNW,qlc@0/fp@0,0:devctl              CONNECTED
/devices/pci@500/pci@0/pci@9/SUNW,qlc@0,1/fp@0,0:devctl            CONNECTED


ndd
kstat


       8. c2t50060482D531E552d0 <EMC-SYMMETRIX-5773 cyl 1 alt 2 hd 15 sec 128>
          /pci@500/pci@0/pci@9/SUNW,qlc@0/fp@0,0/ssd@w50060482d531e552,0
       9. c3t50060482D531E558d0 <EMC-SYMMETRIX-5773 cyl 1 alt 2 hd 15 sec 128>
          /pci@500/pci@0/pci@9/SUNW,qlc@0,1/fp@0,0/ssd@w50060482d531e558,0
      10. c4t60060160C5302E0024E16D0B8177E111d0 <DGC-VRAID-0531 cyl 52214 alt 2 hd 255 sec 189>
          /scsi_vhci/ssd@g60060160c5302e0024e16d0b8177e111
      11. c4t60060480000190102164533030363039d0 <drive not available>
          /scsi_vhci/ssd@g60060480000190102164533030363039
      12. c4t60060480000190105493533033443843d0 <EMC-SYMMETRIX-5773 cyl 65533 alt 2 hd 120 sec 269>
          /scsi_vhci/ssd@g60060480000190105493533033443843

Wednesday, October 10, 2012

Aggregate multiple NIC’s with dladm in Solaris 10

ARTICLE UPDATED 05/22/2009 — Update at bottom of the page.
Likely old news to many of you, but dladm is pretty slick.
A company that I work with has some Sun X4500 boxes that they use for various tasks. The X4500, also known as Thumper, shipped with four e1000g interfaces and 24TB or 48TB of raw storage, all in a 4U 160 pound box. Though discontinued by Sun and replaced with the nicer x4540 box these old Thumpers are fine machines.
Recently I found the need to use three of the four interfaces for a larger pipe to a Cisco switch that allows port aggregation. The reasons for doing this or for using 3 ports are not really important, in your environment you might do things differently. After the box was racked and cabled the switch was configured for the ports used.
Moving on to the server, I was amazed at how simple it was to bond the three interfaces together in Solaris 10 using the dladm command.
On this hardware the devices were e1000g0 — > e1000g3:
The man page for dladm contained all I needed to get started.
First, a look at the devices. (switch ports were disabled at this time.)

root@thumper2 # dladm show-dev
e1000g0 link: down speed: 0 Mbps duplex: half
e1000g1 link: unknown speed: 0 Mbps duplex: half
e1000g2 link: unknown speed: 0 Mbps duplex: half
e1000g3 link: unknown speed: 0 Mbps duplex: half

To create an aggregate with the three devices and give it an integer as the aggregate instance the command was simply:

root@thumper2 # dladm create-aggr -d e1000g0 -d e1000g1 -d e1000g2 1
dladm: create operation failed: Device busy (invalid interface name)
root@thumper2 # ifconfig e1000g0 unplumb
root@thumper2 # dladm create-aggr -d e1000g0 -d e1000g1 -d e1000g2 1
root@thumper2 #

You can see from the output above that the devices must not be in use, e1000g0 was so the dladm command failed. That should be expected. Though e1000g0 had already been configured with an IP address, I was connected to the thumper via our Lantronix serial console. It would be unwise to unplumb the interface you came in on.
At this point ifconfig -a should not show anything (unless you have other devices or you’ve configured e1000g3, etc.).
Initially the switch ports were disabled at the Cisco, they were up for the following look at the aggregate created above.

root@thumper2 # dladm show-aggr
key: 1 (0x0001) policy: L4 address: 0:14:4f:ff:ff:ff (auto)
device address speed duplex link state
e1000g0 0:14:4f:ff:ff:ff 1000 Mbps full up attached
e1000g1 0:14:4f:ff:ff:ff 1000 Mbps full up attached
e1000g2 0:14:4f:ff:ff:ff 1000 Mbps full up attached

Your MAC addresses will not look like the modified example.
We can now see what appears to be a new device, the list shows all of the link devices. The one we are interested in is aggr1.

root@thumper2 # dladm show-link
e1000g0 type: non-vlan mtu: 1500 device: e1000g0
e1000g1 type: non-vlan mtu: 1500 device: e1000g1
e1000g2 type: non-vlan mtu: 1500 device: e1000g2
e1000g3 type: non-vlan mtu: 1500 device: e1000g3
aggr1 type: non-vlan mtu: 1500 aggregation: key 1
root@thumper2 #

All that is needed is to plumb up the interface (aggr1) and we are good to go.

root@thumper2 # ifconfig aggr1 plumb 192.168.1.2 netmask 255.255.255.0 up
root@thumper2 # ifconfig aggr1
aggr1: flags=1000843 mtu 1500 index 3
inet 192.168.1.2 netmask ffffff00 broadcast 192.168.1.255
ether 0:14:4f:fff:ff:ff
root@thumper2 #
root@thumper2 # ping thumper4
thumper4 is alive
root@thumper2 #

Make sure to rename /etc/hostname.e1000g0 to /etc/hostname.aggr1 if you want the machine to be available on the network after a reboot.
Nice, it just works!
Now to do some testing….film at 11.
Update 030909:
I forgot to mention that I’ll be trying this out with JumboFrames enabled (and disabled). To get there I’ve found better results with editing /kernel/drv/e1000g.conf then by using ndd. Same holds true for when you are forced to disable auto-negotiation and hard code the media settings. Have a look at /kernel/drv/e1000g.conf, comments in the file are sufficient.
Example entry for JumboFrames follows:
MaxFrameSize=3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3;
If you want to hardcode media/duplex e1000g you can edit /kernel/drv/e1000g.conf and reboot.
Update 052209:
After testing some zfs send / zfs rcv transfers from another thumper (using mbuffer) I decided to set LACP mode to active (both on the switch and the server).
Here is the info on how that was done.

[root@thumper2:~]# dladm modify-aggr -PL2 -l active 1
[root@thumper2:~]#
[root@thumper2:~]# dladm show-aggr -L
key: 1 (0x0001) policy: L2 address: 0:14:4f:99:99:99 (auto)
LACP mode: active LACP timer: short
device activity timeout aggregatable sync coll dist defaulted expired
e1000g0 active short yes yes yes yes no no
e1000g1 active short yes yes yes yes no no
e1000g2 active short yes yes yes yes no no
[root@thumper2:~]#

The switch involved runs CatOS and the following command is what was used there (for the ports 5/5 -> 5/7). This impacts the whole module so consider this carefully before pressing enter :)

set port lacp-channel 5/5,5/6,5/7 mode active

When time permits I’ll post some transfer times using mbuffer,rsync, etc.

Tuesday, October 2, 2012

Cleaning up the Operating System device tree after removing LUNs - Solaris 10 example

http://sfdoccentral.symantec.com/sf/5.0MP3/solaris/html/vxvm_admin/ch02s24s03.htm

Cleaning up the Operating System device tree after removing LUNs - Solaris 10 example

You must clean up the device tree after removing LUNs. The OS commands may vary for Solaris versions. This procedure uses Solaris 10 with Leadville stack as an example.
Contact Sun Support if any of the steps in this section fail to produce the wanted results.
To clean up the device tree after you remove LUNs
  1. The removed devices show up as drive not available in the output of the format command:
    413. c3t5006048ACAFE4A7Cd252 <drive not available>
            /pci@1d,700000/SUNW,qlc@1,1/fp@0,0/ssd@w5006048acafe4a7c,fc
  2. After the LUNs are unmapped using Array management or the command line, Solaris also displays the devices as either unusable or failing.
    bash-3.00# cfgadm -al -o show_SCSI_LUN | grep -i unusable
      c2::5006048acafe4a73,256   disk  connected  configured unusable
      c3::5006048acafe4a7c,255   disk  connected  configured unusable
    bash-3.00# cfgadm -al -o show_SCSI_LUN | grep -i failing
      c2::5006048acafe4a73,71    disk  connected configured  failing
      c3::5006048acafe4a7c,252   disk  connected configured  failing
  3. If the removed LUNs show up as failing, you need to force a LIP on the HBA. This operation probes the targets again, so that the device shows up as unusable. Unless the device shows up as unusable, it cannot be removed from the device tree.
    luxadm -e forcelip /devices/pci@1d,700000/SUNW,qlc@1,1/fp@0,0:devctl
  4. To remove the device from the cfgadm database, run the following commands on the HBA:
    cfgadm -c unconfigure -o unusable_SCSI_LUN c2::5006048acafe4a73
    cfgadm -c unconfigure -o unusable_SCSI_LUN c3::5006048acafe4a7c 
  5. Repeat step 2 to verify that the LUNs have been removed.
  6. Clean up the device tree. The following command removes the /dev/rdsk... links to /devices.
    $devfsadm -Cv 

Publish WAS logs on Web Server

Alias /waslogs /opt/IBM/WebSphere/AppServer/profiles/UATAppNode1/logs/UATAppServer1
<Directory "/opt/IBM/WebSphere/AppServer/profiles/UATAppNode1/logs/UATAppServer1">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

Thursday, September 27, 2012

Secure connection HTTP Server Admin and WAS Adminconsole

Export Web Admin Certificate from Web Admin Keystore and add it to cellDefaultTrustStore as signer certificate.

Wednesday, September 19, 2012

Change WASADMIN Console Session Timeout Time


1. Edit /opt/IBM/WebSphere/AppServer/profiles/Dmgr/config/cells/AUTOCell/applications/isclite.ear/deployments/isclite/deployment.xml
2.Locate the xml statement <tuningParams xmi:id="TuningParams_1088453565469" maxInMemorySessionCount="1000" allowOverflow="true" writeFrequency="TIME_BASED_WRITE" writeInterval="10" writeContents="ONLY_UPDATED_ATTRIBUTES" invalidationTimeout="30">
3.Change the invalidationTimeout value to the desired session timeout. The default is 30.
4.Save the deployment.xml file.
5.Restart the Deployment Manager.

IHS Diagnose

http://www-01.ibm.com/support/docview.wss?uid=swg24008409

Tuesday, September 18, 2012

WAS Jython Functions

AdminControl
completeObjectName
                Returns a String version of an object name given a template
                name
getAttribute_jmx
                Given ObjectName and name of attribute, returns value of
                attribute
getAttribute    Given String version of ObjectName and name of attribute,
                returns value of attribute
getAttributes_jmx
Given ObjectName and array of attribute names, returns
AttributeList.
getAttributes   Given String version of ObjectName and attribute names,
returns String of name value pairs. Given String version
of ObjectName, returns String of all name value pairs.
getCell         Returns the cell name of the connected server
getConfigId     Given String version of ObjectName, return a configuration
ID for the corresponding configuration object, if any
getDefaultDomain
Returns "WebSphere"
getDomainName   Returns "WebSphere"
getHost         Returns String representation of connected host
getMBeanCount   Returns number of registered beans
getMBeanInfo_jmx
                Given ObjectName, returns MBeanInfo structure for MBean
getNode         Returns the node name of the connected server
getObjectInstance
                Given String version of ObjectName, returns ObjectInstance
                object that match.
getPort         Returns String representation of port in use
getType         Returns String representation of connection type in use
help            Shows help information
invoke_jmx      Given ObjectName, name of method, array of parameters and
                signature, invokes method on MBean specified
invoke          Invokes a method on the specified MBean
isRegistered_jmx
                Returns true if supplied ObjectName is registered
isRegistered    Returns true if supplied String version of ObjectName is
                registered
makeObjectName  Returns an ObjectName built with the given string
queryNames_jmx  Given ObjectName and QueryExp, retrieves set of ObjectNames
                that match.
queryNames      Given String version of ObjectName, retrieves String of
                ObjectNames that match
queryMBeans     Given String version of ObjectName, returns a set of
                ObjectInstances object that match
reconnect       Reconnects with server
setAttribute_jmx
                Given ObjectName and Attribute object, sets attribute for MBean
                specified
setAttribute    Given String version of ObjectName, attribute name and
                attribute value, sets attribute for MBean specified
setAttributes_jmx
                Given ObjectName and AttributeList object, sets attributes for
                the MBean specified
setAttributes   Given String version of ObjectName, attribute name
                and value pairs, sets attributes for the MBean specified
startServer     Given the name of a server, starts that server
stopServer      Given the name of a server, stops that server
testConnection  Tests the connection to a DataSource object
trace           Sets the wsadmin trace specification

AdminApp
deleteUserAndGroupEntries
                Deletes all the user/group information for all the roles and
                all the user name/password information for RunAs roles for a
                given application
edit            Edits the properties of an application
editInteractive Edits the properties of an application interactively
export          Exports application to a file
exportDDL       Exports DDL from application to a directory
exportFile      Exports content of a single file from an application to a file
getDeployStatus Returns the combined Deployment status of the application
help            Shows help information
install         Installs an application, given a file name and an option string
installInteractive
                Installs an application in interactive mode, given a file name
                and an option string
isAppReady      Checks whether the application is ready to be run
list            Lists all installed applications
listModules     Lists the modules in a specified application
options         Shows the options available, for a given file, application,
                or in general
renameApplication       Rename a given application
publishWSDL     Publishs WSDL files for a given application
searchJNDIReferences
                Lists application that refers to the given JNDIName on a given
                node
taskInfo        Shows detailed information pertaining to a given install task
                for a given file
uninstall       Uninstalls an application, given an application name and
                an option string
update          Updates an installed application
updateAccessIDs Updates the user/group binding information with accessID
                from user registry for a given application
updateInteractive       Updates an installed application interactively
view            Views an application or module, given an application or
                module name

AdminConfig

attributes      Shows the attributes for a given type
checkin         Checks a file into the the configuration repository
convertToCluster
                Converts a server to be the first member of a new ServerCluster
create          Creates a configuration object, given a type, a parent, and
                a list of attributes, and optionally an attribute name for the
                new object
createClusterMember
                Creates a new server that is a member of an existing cluster
createDocument  Creates a new document in the configuration repository
createUsingTemplate
                Creates an object using a particular template type
defaults        Displays the default values for attributes of a given type
deleteDocument  Deletes a document from the configuration repository
existsDocument  Tests for the existence of a document in the configuration
                repository
extract         Extracts a file from the configuration repository
getCrossDocumentValidationEnabled
Returns true if cross-document validation is enabled
getid           Shows the configuration ID of an object, given a string version
of its containment
getObjectName   Given a configuration ID, returns a string version of the
                ObjectName for the corresponding running MBean, if any
getObjectType   Given a configuration ID, returns a string version of the
                object type
getSaveMode     Returns the mode used when "save" is invoked
getValidationLevel
                Returns the validation used when files are extracted from the
                repository.
getValidationSeverityResult
                Returns the number of messages of a given severity from the
                most recent validation
hasChanges      Returns true if unsaved configuration changes exist
help            Shows help information
installResourceAdapter
                Installs a J2C resource adapter with the given rar file name
                and an option string in the node
list            Lists all configuration objects of a given type
listTemplates   Lists all available configuration templates of a given type
modify          Changes specified attributes of a given configuration object
parents         Shows the objects which contain a given type
queryChanges    Returns a list of unsaved files
remove          Removes the specified configuration object
required        Displays the required attributes of a given type.
reset           Discards unsaved configuration changes
resetAttributes Resets value of the specified attributes.
save            Commits unsaved changes to the configuration repository
setCrossDocumentValidationEnabled
                Sets the cross-document validation enabled mode.
setSaveMode     Changes the mode used when "save" is invoked
setValidationLevel
                Sets the validation used when files are extracted from the
                repository.
show            Shows the attributes of a given configuration object
showall         Recursively shows the attributes of a given configuration
                object, and all the objects contained within each attribute.
showAttribute   Displays only the value for the single attribute specified.
types           Shows the possible types for configuration
uninstallResourceAdapter
                Uninstalls a J2C resource adapter with the given resource
                adapter configuration ID.
unsetAttributes Unsets value of the specified attributes.
validate        Invokes validation

Tuesday, September 11, 2012

Solaris: Create new swap partition

Searching for disks...done

AVAILABLE DISK SELECTIONS:
       0. c0t0d0 <DEFAULT cyl 8921 alt 2 hd 255 sec 63>
          /pci@0,0/pci1022,7450@2/pci1000,3060@3/sd@0,0
       1. c0t1d0 <DEFAULT cyl 8921 alt 2 hd 255 sec 63>
          /pci@0,0/pci1022,7450@2/pci1000,3060@3/sd@1,0
Specify disk (enter its number): 1
selecting c0t1d0
[disk formatted]
Warning: Current Disk has mounted partitions.
/dev/dsk/c0t1d0s0 is currently mounted on /var/sadm. Please see umount(1M).
/dev/dsk/c0t1d0s4 is currently mounted on /var/opt/SUNWuce. Please see umount(1M).
/dev/dsk/c0t1d0s5 is currently mounted on /opt/backup. Please see umount(1M).

FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        fdisk      - run the fdisk program
        repair     - repair a defective sector
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        save       - save new disk/partition definitions
        inquiry    - show vendor, product and revision
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit

format> p

PARTITION MENU:
        0      - change `0' partition
        1      - change `1' partition
        2      - change `2' partition
        3      - change `3' partition
        4      - change `4' partition
        5      - change `5' partition
        6      - change `6' partition
        7      - change `7' partition
        select - select a predefined table
        modify - modify a predefined partition table
        name   - name the current table
        print  - display the current table
        label  - write partition map and label to the disk
        !<cmd> - execute <cmd>, then return
        quit
partition> p
Current partition table (original):
Total disk cylinders available: 8921 + 2 (reserved cylinders)
Part      Tag    Flag     Cylinders        Size            Blocks
  0        var    wm    1177 - 2482       10.00GB    (1306/0/0)  20980890
  1 unassigned    wu    2483 - 2613        1.00GB    (131/0/0)    2104515
  2     backup    wm       0 - 8920       68.34GB    (8921/0/0) 143315865
  3       swap    wu    2614 - 3136        4.01GB    (523/0/0)    8401995
  4   reserved    wm       1 -  653        5.00GB    (653/0/0)   10490445
  5   reserved    wm     654 - 1176        4.01GB    (523/0/0)    8401995
  6 unassigned    wm       0               0         (0/0/0)            0
  7 unassigned    wm       0               0         (0/0/0)            0
  8       boot    wu       0 -    0        7.84MB    (1/0/0)        16065
  9 unassigned    wm       0               0         (0/0/0)            0

partition> 3  
Part      Tag    Flag     Cylinders        Size            Blocks
  3 unassigned    wm       0               0         (0/0/0)            0
Enter partition id tag[unassigned]: swap
Enter partition permission flags[wm]: wu
Enter new starting cyl[1]: 2614
Enter partition size[0b, 0c, 2614e, 0.00mb, 0.00gb]: 4gb
partition> p
Current partition table (unnamed):
Total disk cylinders available: 8921 + 2 (reserved cylinders)
Part      Tag    Flag     Cylinders        Size            Blocks
  0        var    wm    1177 - 2482       10.00GB    (1306/0/0)  20980890
  1 unassigned    wu    2483 - 2613        1.00GB    (131/0/0)    2104515
  2     backup    wm       0 - 8920       68.34GB    (8921/0/0) 143315865
  3       swap    wu    2614 - 3136        4.01GB    (523/0/0)    8401995
  4   reserved    wm       1 -  653        5.00GB    (653/0/0)   10490445
  5   reserved    wm     654 - 1176        4.01GB    (523/0/0)    8401995
  6 unassigned    wm       0               0         (0/0/0)            0
  7 unassigned    wm       0               0         (0/0/0)            0
  8       boot    wu       0 -    0        7.84MB    (1/0/0)        16065
  9 unassigned    wm       0               0         (0/0/0)            0
partition> h
Expecting one of the following: (abbreviations ok):
        0      - change `0' partition
        1      - change `1' partition
        2      - change `2' partition
        3      - change `3' partition
        4      - change `4' partition
        5      - change `5' partition
        6      - change `6' partition
        7      - change `7' partition
        select - select a predefined table
        modify - modify a predefined partition table
        name   - name the current table
        print  - display the current table
        label  - write partition map and label to the disk
        !<cmd> - execute <cmd>, then return
        quit
partition> label
Ready to label disk, continue? y
partition> p
Current partition table (unnamed):
Total disk cylinders available: 8921 + 2 (reserved cylinders)
Part      Tag    Flag     Cylinders        Size            Blocks
  0        var    wm    1177 - 2482       10.00GB    (1306/0/0)  20980890
  1 unassigned    wu    2483 - 2613        1.00GB    (131/0/0)    2104515
  2     backup    wm       0 - 8920       68.34GB    (8921/0/0) 143315865
  3       swap    wu    2614 - 3136        4.01GB    (523/0/0)    8401995
  4   reserved    wm       1 -  653        5.00GB    (653/0/0)   10490445
  5   reserved    wm     654 - 1176        4.01GB    (523/0/0)    8401995
  6 unassigned    wm       0               0         (0/0/0)            0
  7 unassigned    wm       0               0         (0/0/0)            0
  8       boot    wu       0 -    0        7.84MB    (1/0/0)        16065
  9 unassigned    wm       0               0         (0/0/0)            0

List Swap Space:
# swap -l
swapfile             dev    swaplo   blocks     free
/dev/dsk/c6t0d0s1   79,1         8  1048568  1048568

Turn off swap:
# swap -d /dev/dsk/c6t0d0s1
/dev/dsk/c6t0d0s1 was dump device --
invoking dumpadm(1M) -d swap to select new dump device
dumpadm: no swap devices are available

Notice you have no dump device
Disable swap from coming back on reboot:
#vi /etc/vfstab
there's a line to mount the swap space, remove it.. Look for your swap device, i.e. c6t0d0s1.

Add swap space (partition):
#swap -a /dev/desk/c6t0d0s1

Adding file based swap space:
#mkfile 250m /opt/myswapfile
#swap -a /opt/myswapfile