Monday, October 15, 2012
Script to find out space saving with HCC
The following scrips loops through a list of tables and displays estimated compression ratio for all the tables for all types of HCC compression :
set serveroutput on
spool all.out
declare
v_blkcnt_cmp pls_integer;
v_blkcnt_uncmp pls_integer;
v_row_cmp pls_integer;
v_row_uncmp pls_integer;
v_cmp_ratio number;
v_comptype_str varchar2(60);
type Str_Array is VARRAY(10) of VARCHAR2(50);
v_array Str_Array ;
begin
v_array:= Str_Array('lineitem','nation');
for i in v_array.first .. v_array.last loop
dbms_output.put_line('hello ' || v_array(i));
end loop;
for i in v_array.first .. v_array.last
loop
for j in 1..5
loop
dbms_compression.get_compression_ratio(
scratchtbsname => upper('scratch1'),
ownname => upper('tpch'),
tabname => upper(v_array(i)),
partname => NULL,
comptype => power(2,j),
blkcnt_cmp => v_blkcnt_cmp,
blkcnt_uncmp => v_blkcnt_uncmp,
row_cmp => v_row_cmp,
row_uncmp => v_row_uncmp,
cmp_ratio => v_cmp_ratio,
comptype_str => v_comptype_str,
subset_numrows => -1) ;
dbms_output.put_line('OUTPUT FOR ' || v_comptype_str ||' FOR TABLE ' || v_array(i)) ;
dbms_output.put_line('Estimated Compression Ratio: '||to_char(v_cmp_ratio));
dbms_output.put_line('Blocks used by compressed sample: '||to_char(v_blkcnt_cmp));
dbms_output.put_line('Blocks used by uncompressed sample: '||to_char(v_blkcnt_uncmp));
end LOOP;
end LOOP;
end;
/
;
Friday, October 12, 2012
Cannot open database due to corrupt file
If you cannot open database due to some non-critical datafile being corrupt or not found and you do not have the backup either, you can offline the corrupt file and restart the database ....
Starting the database gave the following error:
SQL> SQL> ORACLE instance started.
Total System Global Area 1.4008E+11 bytes
Fixed Size 2166320 bytes
Variable Size 5.3687E+10 bytes
Database Buffers 8.5899E+10 bytes
Redo Buffers 489947136 bytes
Database mounted.
ORA-01122: database file 166 failed verification check
ORA-01110: data file 166: '/test1/sf1000/scratch_ts'
ORA-01210: data file header is media corrupt
Login to the database and offline that particular datafile
-bash-4.1$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Tue Aug 28 14:38:51 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
SQL> alter database datafile '/test1/sf1000/scratch_ts' offline for drop
2 ;
Database altered.
SQL> alter database open;
Database altered.
Starting the database gave the following error:
SQL> SQL> ORACLE instance started.
Total System Global Area 1.4008E+11 bytes
Fixed Size 2166320 bytes
Variable Size 5.3687E+10 bytes
Database Buffers 8.5899E+10 bytes
Redo Buffers 489947136 bytes
Database mounted.
ORA-01122: database file 166 failed verification check
ORA-01110: data file 166: '/test1/sf1000/scratch_ts'
ORA-01210: data file header is media corrupt
Login to the database and offline that particular datafile
-bash-4.1$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Tue Aug 28 14:38:51 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
SQL> alter database datafile '/test1/sf1000/scratch_ts' offline for drop
2 ;
Database altered.
SQL> alter database open;
Database altered.
Tuesday, September 25, 2012
iSCSIADM: Cannot see iSCSI luns on server side
On the storage side , the LUNs are created. However you cannot see them on the server side. This post explains the steps needed to debug and fix the issue.
Issue list command to see if you can see the LUNs on the server side:
Issue list command to see if you can see the LUNs on the server side:
- iscsiadm list target -vS
If there are no LUNs listed, verify which discovery method is enabled
root@dat01:/# iscsiadm list discovery
Discovery:
Static: disabled
Send Targets: enabled
iSNS: disabled
Verify which address is enabled in send targets discovery
iscsiadm list discovery-address
Discovery Address: 10.129.195.209:3260
If the discovery-address is correct and you you cannot still see the luns, do the following:
Check /var/adm/messages for any error message
Restart the iscsi service on storage side
Readd the address to send targets discovery as under:
iscsiadm remove discovery-address 10.129.195.209
root@dat01:/var/adm# iscsiadm list discovery-address
root@dat01:/var/adm# iscsiadm add discovery-address 10.129.195.209
root@dat01:/var/adm# iscsiadm list discovery-address
Discovery Address: 10.129.195.209:3260
Monday, August 13, 2012
Installing Oracle Database on Solaris 11 : Issue resoution
While installing the Oracle 11gR2 (11.2.0.1) grid infrastructure software on Solaris 11 , I got the following errors:
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-11-10_06-23-31PM. Please wait ...oracle@len01:~/download/grid$ You can find the log of this install session at:
/u01/app/oraInventory/logs/installActions2011-11-10_06-23-31PM.log
Error in checking existance of the link, errno:11:/u01/app/oracle/product/11.2.0/grid/jdk/jre/lib/sparcv9/server/libjsig.so: Invalid argument
Error in checking existance of the link, errno:11:/u01/app/oracle/product/11.2.0/grid/jdk/jre/lib/sparc/client/libjsig.so: Invalid argument
Error in checking existance of the link, errno:11:/u01/app/oracle/product/11.2.0/grid/jdk/jre/lib/sparcv9/libjdgaSUNWafb.so: Invalid argument
Error in checking existance of the link, errno:11:/u01/app/oracle/product/11.2.0/grid/jdk/jre/lib/sparcv9/server/libjsig_g.so: Invalid argument
Error in checking existance of the link, errno:11:/u01/app/oracle/product/11.2.0/grid/jdk/jre/lib/sparc/libjvm.so: Invalid argument
Error in checking existance of the link, errno:11:/u01/app/oracle/product/11.2.0/grid/jdk/jre/lib/sparc/libjdgaSUNWafb.so: Invalid argument
Error in checking existance of the link, errno:11:/u01/app/oracle/product/11.2.0/grid/jdk/jre/javaws/javaws: Invalid argument
Error in checking existance of the link, errno:11:/u01/app/oracle/product/11.2.0/grid/jdk/jre/lib/sparc/server/libjsig_g.so: Invalid argument
Error in checking existance of the link, errno:11:/u01/app/oracle/product/11.2.0/grid/jdk/jre/lib/sparc/client/libjsig_g.so: Invalid argument
Error in checking existance of the link, errno:11:/u01/app/oracle/product/11.2.0/grid/jdk/jre/lib/sparc/server/libjsig.so: Invalid argument
Error in checking existance of the link, errno:11:/u01/app/oracle/product/11.2.0/grid/lib/libocci.so: No such file or directory
Error in checking existance of the link, errno:11:/u01/app/oracle/product/11.2.0/grid/bin/lbuilder: Invalid argument
Error in checking existance of the link, errno:11:/u01/app/oracle/product/11.2.0/grid/lib/libagtsh.so: No such file or directory
Error in checking existance of the link, errno:11:/u01/app/oracle/product/11.2.0/grid/lib/libodm11.so: No such file or directory
Error in checking existance of the link, errno:11:/u01/app/oracle/product/11.2.0/grid/lib/libodm11.so: No such file or directory
Error in checking existance of the link, errno:11:/u01/app/oracle/product/11.2.0/grid/JRE: No such file or directory
In the error message where it says invalid argument, the installer copies the file instead of creating a link. And for the error message that states No such file or directory, the corresponding file does not get copied over.
And then the ASM install fails with the error : ORACLE not available.
I got the similar message for Oracle database install as well.
It turns out 11.2.0.1 is not supported on Solaris11. 11.2.0.3 and beyond are supported on S11. Installing 11.2.0.3 resolved the issue.
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-11-10_06-23-31PM. Please wait ...oracle@len01:~/download/grid$ You can find the log of this install session at:
/u01/app/oraInventory/logs/installActions2011-11-10_06-23-31PM.log
Error in checking existance of the link, errno:11:/u01/app/oracle/product/11.2.0/grid/jdk/jre/lib/sparcv9/server/libjsig.so: Invalid argument
Error in checking existance of the link, errno:11:/u01/app/oracle/product/11.2.0/grid/jdk/jre/lib/sparc/client/libjsig.so: Invalid argument
Error in checking existance of the link, errno:11:/u01/app/oracle/product/11.2.0/grid/jdk/jre/lib/sparcv9/libjdgaSUNWafb.so: Invalid argument
Error in checking existance of the link, errno:11:/u01/app/oracle/product/11.2.0/grid/jdk/jre/lib/sparcv9/server/libjsig_g.so: Invalid argument
Error in checking existance of the link, errno:11:/u01/app/oracle/product/11.2.0/grid/jdk/jre/lib/sparc/libjvm.so: Invalid argument
Error in checking existance of the link, errno:11:/u01/app/oracle/product/11.2.0/grid/jdk/jre/lib/sparc/libjdgaSUNWafb.so: Invalid argument
Error in checking existance of the link, errno:11:/u01/app/oracle/product/11.2.0/grid/jdk/jre/javaws/javaws: Invalid argument
Error in checking existance of the link, errno:11:/u01/app/oracle/product/11.2.0/grid/jdk/jre/lib/sparc/server/libjsig_g.so: Invalid argument
Error in checking existance of the link, errno:11:/u01/app/oracle/product/11.2.0/grid/jdk/jre/lib/sparc/client/libjsig_g.so: Invalid argument
Error in checking existance of the link, errno:11:/u01/app/oracle/product/11.2.0/grid/jdk/jre/lib/sparc/server/libjsig.so: Invalid argument
Error in checking existance of the link, errno:11:/u01/app/oracle/product/11.2.0/grid/lib/libocci.so: No such file or directory
Error in checking existance of the link, errno:11:/u01/app/oracle/product/11.2.0/grid/bin/lbuilder: Invalid argument
Error in checking existance of the link, errno:11:/u01/app/oracle/product/11.2.0/grid/lib/libagtsh.so: No such file or directory
Error in checking existance of the link, errno:11:/u01/app/oracle/product/11.2.0/grid/lib/libodm11.so: No such file or directory
Error in checking existance of the link, errno:11:/u01/app/oracle/product/11.2.0/grid/lib/libodm11.so: No such file or directory
Error in checking existance of the link, errno:11:/u01/app/oracle/product/11.2.0/grid/JRE: No such file or directory
In the error message where it says invalid argument, the installer copies the file instead of creating a link. And for the error message that states No such file or directory, the corresponding file does not get copied over.
And then the ASM install fails with the error : ORACLE not available.
I got the similar message for Oracle database install as well.
It turns out 11.2.0.1 is not supported on Solaris11. 11.2.0.3 and beyond are supported on S11. Installing 11.2.0.3 resolved the issue.
Installing Oracle database in Solaris Container: Issue resolution
I was trying to install Oracle clusterware on 11.2.0.2 on Solaris container. I got the following error:
Adding daemon to inittab
ACFS-9459: ADVM/ACFS is not supported on this OS version: 'Solaris Container: Solaris 10 update 10'
ACFS-9201: Not Supported
ACFS-9459: ADVM/ACFS is not supported on this OS version: 'Solaris Container: Solaris 10 update 10'
CRS-2672: Attempting to start 'ora.mdnsd' on 'dszone1'
CRS-2676: Start of 'ora.mdnsd' on 'dszone1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'dszone1'
CRS-2676: Start of 'ora.gpnpd' on 'dszone1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'dszone1'
CRS-2672: Attempting to start 'ora.gipcd' on 'dszone1'
CRS-2676: Start of 'ora.cssdmonitor' on 'dszone1' succeeded
CRS-2676: Start of 'ora.gipcd' on 'dszone1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'dszone1'
CRS-2672: Attempting to start 'ora.diskmon' on 'dszone1'
CRS-2676: Start of 'ora.diskmon' on 'dszone1' succeeded
CRS-2674: Start of 'ora.cssd' on 'dszone1' failed
CRS-2679: Attempting to clean 'ora.cssd' on 'dszone1'
CRS-2681: Clean of 'ora.cssd' on 'dszone1' succeeded
CRS-2673: Attempting to stop 'ora.diskmon' on 'dszone1'
CRS-2677: Stop of 'ora.diskmon' on 'dszone1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'dszone1'
CRS-2677: Stop of 'ora.gipcd' on 'dszone1' succeeded
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'dszone1'
CRS-2677: Stop of 'ora.cssdmonitor' on 'dszone1' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'dszone1'
CRS-2677: Stop of 'ora.gpnpd' on 'dszone1' succeeded
CRS-2673: Attempting to stop 'ora.mdnsd' on 'dszone1'
CRS-2677: Stop of 'ora.mdnsd' on 'dszone1' succeeded
CRS-5804: Communication error with agent process
CRS-4000: Command Start failed, or completed with errors.
The exlusive mode cluster start failed, see Clusterware alert log for more information
Initial cluster configuration failed. See /u01/app/11.2.0/grid/cfgtoollogs/crsconfig
The alert log under /u01/app/11.2.0/grid/log/<nodename> has the following error:
[cssd(8886)]CRS-1656:The CSS daemon is terminating due to a fatal error; Details at (:CSSSC00011:) in /u01/app/11.2.0/grid/
log/dszone1/cssd/ocssd.log
And the ocssd.log has following error:
2012-08-07 06:06:57.599: [ CSSD][1]clssscSetPrivEnv: Setting priority to 4
2012-08-07 06:06:57.607: [ CSSD][1]clssscSetPrivEnv: unable to set priority to 4
2012-08-07 06:06:57.607: [ CSSD][1]SLOS: cat=-2, opn=scls_set_priority_realtime, dep=1, loc=setsched
unable to escalate to real time
2012-08-07 06:06:57.607: [ CSSD][1](:CSSSC00011:)clssscExit: A fatal error occurred during initialization
Restarting the container with following privileges fixed the issue:
set limitpriv="default,proc_priocntl,proc_clock_highres,sys_time"
Refer to metalink note ID 1340694.1 for detailed information.
Adding daemon to inittab
ACFS-9459: ADVM/ACFS is not supported on this OS version: 'Solaris Container: Solaris 10 update 10'
ACFS-9201: Not Supported
ACFS-9459: ADVM/ACFS is not supported on this OS version: 'Solaris Container: Solaris 10 update 10'
CRS-2672: Attempting to start 'ora.mdnsd' on 'dszone1'
CRS-2676: Start of 'ora.mdnsd' on 'dszone1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'dszone1'
CRS-2676: Start of 'ora.gpnpd' on 'dszone1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'dszone1'
CRS-2672: Attempting to start 'ora.gipcd' on 'dszone1'
CRS-2676: Start of 'ora.cssdmonitor' on 'dszone1' succeeded
CRS-2676: Start of 'ora.gipcd' on 'dszone1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'dszone1'
CRS-2672: Attempting to start 'ora.diskmon' on 'dszone1'
CRS-2676: Start of 'ora.diskmon' on 'dszone1' succeeded
CRS-2674: Start of 'ora.cssd' on 'dszone1' failed
CRS-2679: Attempting to clean 'ora.cssd' on 'dszone1'
CRS-2681: Clean of 'ora.cssd' on 'dszone1' succeeded
CRS-2673: Attempting to stop 'ora.diskmon' on 'dszone1'
CRS-2677: Stop of 'ora.diskmon' on 'dszone1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'dszone1'
CRS-2677: Stop of 'ora.gipcd' on 'dszone1' succeeded
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'dszone1'
CRS-2677: Stop of 'ora.cssdmonitor' on 'dszone1' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'dszone1'
CRS-2677: Stop of 'ora.gpnpd' on 'dszone1' succeeded
CRS-2673: Attempting to stop 'ora.mdnsd' on 'dszone1'
CRS-2677: Stop of 'ora.mdnsd' on 'dszone1' succeeded
CRS-5804: Communication error with agent process
CRS-4000: Command Start failed, or completed with errors.
The exlusive mode cluster start failed, see Clusterware alert log for more information
Initial cluster configuration failed. See /u01/app/11.2.0/grid/cfgtoollogs/crsconfig
The alert log under /u01/app/11.2.0/grid/log/<nodename> has the following error:
[cssd(8886)]CRS-1656:The CSS daemon is terminating due to a fatal error; Details at (:CSSSC00011:) in /u01/app/11.2.0/grid/
log/dszone1/cssd/ocssd.log
And the ocssd.log has following error:
2012-08-07 06:06:57.599: [ CSSD][1]clssscSetPrivEnv: Setting priority to 4
2012-08-07 06:06:57.607: [ CSSD][1]clssscSetPrivEnv: unable to set priority to 4
2012-08-07 06:06:57.607: [ CSSD][1]SLOS: cat=-2, opn=scls_set_priority_realtime, dep=1, loc=setsched
unable to escalate to real time
2012-08-07 06:06:57.607: [ CSSD][1](:CSSSC00011:)clssscExit: A fatal error occurred during initialization
Restarting the container with following privileges fixed the issue:
set limitpriv="default,proc_priocntl,proc_clock_highres,sys_time"
Refer to metalink note ID 1340694.1 for detailed information.
Oracle Database Listener Service Registration
- I do not have listener.ora file. How is service registration working:
Service registration can happen dynamically or statically. By default, listener uses dynamic service registration before attempting static registration. For dynamic configuration, listener.ora file is not needed.
Dynamic service registration is configured in the database initialization file. It does not require any configuration in the listener.ora file. For dynamic registration to work, you should set service_names and instance_names in init.ora. or it defaults to default value (INSTANCE_NAME is set to ORACLE_SID and service_names is set to global database name: DB_NAME +DB_DOMAIN). If your local listener is listening on a non-default port, you need to set LOCAL_LISTENER parameter and remote_listener ,typically used in RAC, needs to set with remote_listener parameter.
The static configuration reads information from listener.ora file to configure the services. An instance with status UNKNOWN is statically registered. For additional info check out the following:
http://www.oaktable.net/content/little-things-worth-knowing-static-and-dynamic-listener-registration
- How do I know which naming method is being used to connect:
Tnsping utility can be used to determine whether the listener for a service on an Oracle net network can be reached.
If you can ping the server host from client, use tnsping to test if client can reach Oracle net service. Tnsping also states the naming method which was used to connect.
Additional info:
http://edstevensdba.wordpress.com/2011/03/19/ora-12514/ ( look for all post under TNS category)
Setting swap on Solaris 11
- After the system is installed, swap areas and swap files are listed in /etc/vfstab file
- Create swap
zfs create -V 2G rpool/swap2
swap -a /dev/zvol/dsk/rpool/swap2
Increase the swap size to 40G
root@dat02:~# zfs get volsize rpool/swap
NAME PROPERTY VALUE SOURCE
rpool/swap volsize 4G local
root@dat02:~# zfs set volsize=40G rpool/swap
root@dat02:~# zfs get volsize rpool/swap
NAME PROPERTY VALUE SOURCE
rpool/swap volsize 40G local
Has the system previously swapped
Check if kthr:w has non-zero value in vmstat output. Refer to following blog for additional info:
http://ritukamboj.blogspot.com/2012/03/vmstat-shows-high-value-in-w-column.html
Is the system currently swapping
Check out the sr field of vmstat output
What is the total swap available
swap field of vmstat output as well swap -s displays the value of available swap
root@etchst8:~# vmstat 2
kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr s3 s1 s1 s1 in sy cs us sy id
0 0 0 169977852 94409120 1192 930 341 0 0 0 1064 6 2 0 2 2793 6433 3146 0 1 99
0 0 0 175557112 93864204 29 44 0 0 0 0 0 0 0 0 1 2268 1540 1531 0 0 100
0 0 0 175556024 93863128 0 4 0 0 0 0 0 0 0 0 0 2450 1411 1620 0 0 100
0 0 0 175554632 93861728 0 1 0 0 0 0 0 1 0 0 0 2382 1385 1581 0 0 100
^Croot@etchst8:~# swap -s -h
total: 552M allocated + 217M reserved = 768M used, 167G available
Additional info:
http://www.solarisinternals.com/wiki/index.php/ZFS_Troubleshooting_Guide#Resizing_ZFS_Swap_and_Dump_Devices
https://blogs.oracle.com/observatory/entry/zone_swap_space
http://www.softpanorama.org/Solaris/Processes_and_memory/swap_space_management.shtml
Tuesday, July 24, 2012
Using DBCA to generate database creation scripts
Invoke dbca . Select "Create Database" and then Advanced Options. Select your options to create the DB.
Select <Custom Database template> on Database Template page (If you do not use custom db template, all other templates will result in a script that does rman restore from a backup that comes with the product). Selecting 'custom database template' will result in scripts built around "Create database" sql statement
On the creation options page, deselect Create Database and select Generate DB creation Scripts before you finish. Note the directory name where scripts will be generated.
Select <Custom Database template> on Database Template page (If you do not use custom db template, all other templates will result in a script that does rman restore from a backup that comes with the product). Selecting 'custom database template' will result in scripts built around "Create database" sql statement
On the creation options page, deselect Create Database and select Generate DB creation Scripts before you finish. Note the directory name where scripts will be generated.
Friday, July 13, 2012
FC: Which storage/controller is HBA connected to
- Get info about the HBA
The output below indicates that I have 2 HBAs and both of them are online.
root@dat01:~# fcinfo hba-port | ggrep "HBA Port" root@dat01:~# fcinfo hba-port | ggrep "State"
HBA Port WWN: 21000024ff30b222
HBA Port WWN: 21000024ff30b223
- What remote device is the HBA connected to. Does it have SCSI target.
The output below indicates that both the HBAs have SCSI targets.
Active FC4 Types:
SCSI Target: yes
Port Symbolic Name:
Node WWN: 20060080e5249ad6
root@dat01:~# fcinfo remote-port -p 21000024ff30b223
Remote Port WWN: 20370080e5249ad6
Active FC4 Types:
SCSI Target: yes
Port Symbolic Name:
Node WWN: 20060080e5249ad6
The first HBA is connected to remote device 20360080e5249ad6 and the second HBA is connected to remote device 20370080e5249ad6
- Get detailed info about the SCSI targets (Optional)
Detailed info about the SCSI targets can be obtained by following 2 commands:
- fcinfo remote-port -sl -p 21000024ff30b223
- fcinfo lu -v
- Get WWNs from the storage
Storage has following WWN:
Node WWN: 20:06:00:80:E5:24:9A:D6
Array WWN: 60:08:0E:50:00:24:A7:7C:00:00:00:00:4E:CC:74:CF
It has two controllers:
Both the controllers have 4 ports out of which only 2 ports are enabled:
Both the controllers have 4 ports out of which only 2 ports are enabled:
Controller A: port 1:
Controller A: port 2
Controller B: Port 1
Controller B: Port 2
Note that the node WWN for all ports is identical: 20060080E5249AD6 (which is the node WWN of the storage)
20:36:00:80:E5:24:9A:D6
| |
20:06:00:80:E5:24:9A:D6
|
Controller A: port 2
20:46:00:80:E5:24:9A:D6
| |
20:06:00:80:E5:24:9A:D6
|
Controller B: Port 1
20:37:00:80:E5:24:9A:D6
| |
20:06:00:80:E5:24:9A:D6
|
Controller B: Port 2
20:47:00:80:E5:24:9A:D6
| |
20:06:00:80:E5:24:9A:D6
|
Note that the node WWN for all ports is identical: 20060080E5249AD6 (which is the node WWN of the storage)
- Find out which controller is connected to which HBA
Combining output from storage and fcinfo remote-port, we conclude that controller A port 1 is connected to first HBA and Controller B port 1 is connected to second HBA
- Additional info:
http://www.sunsolarisadmin.com/hardware/how-to-find-the-wwn-world-wide-name-in-sun-solaris/
http://docs.oracle.com/cd/E19082-01/819-2240/fcinfo-1m/index.html
http://blogs.warwick.ac.uk/peggleton/entry/disks_cfgadm_fcinfo/
State: online
State: online
Tuesday, June 19, 2012
NFS setup for Oracle install
- On the client side:
mkdir /test1
Edit the /etc/vfstab file and add the following line to mount the file system as NFS
10.129.195.224:/export/test1 - /test1 nfs - yes rw,bg,hard,nointr,rsize=32768,wsize=32768,proto=tcp,noac,forcedirectio,vers=3,suid
or
zfssaIp:/fs - /clientfs nfs - yes {mount options}
Refer to following metalink doc for mount option info
Mount Options for Oracle files when used with NFS on NAS devices [ID 359515.1]
You can unmount the filesystem with the following command
umount /test1
- On the storage side:
Create a storage pool (Configuration ->Storage).
Create a new project (Shares->Project)
Create a FS under that project (Shares->Shares)
- Issue resolution:
- Direct NFS: Failed to set socket buffer size.wtmax=[1048576] rtmax=[1048576], errno=-1
You have to increase tcp_buf_size. Kindly set the value of the tcp buffer to a value higher than wtmax and rtmax specified above. Setting to the same value does not resolve the issue.
You can issue the following commands to set and display the values:
# /usr/sbin/ndd -set /dev/tcp tcp_max_buf 1056768
# /usr/sbin/ndd -set /dev/tcp tcp_xmit_hiwat 1056768
# /usr/sbin/ndd -set /dev/tcp tcp_recv_hiwat 1056768
#
# /usr/sbin/ndd /dev/tcp tcp_max_buf
1056768
# /usr/sbin/ndd /dev/tcp tcp_xmit_hiwat
1056768
# /usr/sbin/ndd /dev/tcp tcp_recv_hiwat
1056768
You can issue the following commands to set and display the values:
# /usr/sbin/ndd -set /dev/tcp tcp_max_buf 1056768
# /usr/sbin/ndd -set /dev/tcp tcp_xmit_hiwat 1056768
# /usr/sbin/ndd -set /dev/tcp tcp_recv_hiwat 1056768
#
# /usr/sbin/ndd /dev/tcp tcp_max_buf
1056768
# /usr/sbin/ndd /dev/tcp tcp_xmit_hiwat
1056768
# /usr/sbin/ndd /dev/tcp tcp_recv_hiwat
1056768
Refer to MOS ID 1352886.1 for details.
- Additional info:
https://blogs.oracle.com/taylor22/entry/nfs_root_access_on_sun
http://robpetti.com/?p=85 : NFS mounts as nobody:nobody
Backup Solaris Zones
Find out zonepath of the zone you need to backup
root@isve-111-116:~# zonecfg -z rac4Zone info zonepath
zonepath: /zonepools/zones/rac4Zone
Find out the data-set of zonepath
root@isve-111-116:~# zfs list -H -o name /zonepools/zones/rac4Zone
zonepools/zones/rac4Zone
Create a snapshot of the zonepath
root@isve-111-116:~# zfs snapshot -r zonepools/zones/rac4Zone@backup1
Verify that snapshot was successfully created
zfs snapshot -r zonepools/zones/rac4Zone@backup1
root@isve-111-116:~# zfs list -t snap -r zonepools/zones/rac4Zone
NAME USED AVAIL REFER MOUNTPOINT
zonepools/zones/rac4Zone@backup1 0 - 34K -
zonepools/zones/rac4Zone/rpool@backup1 0 - 31K -
zonepools/zones/rac4Zone/rpool/ROOT@backup1 0 - 31K -
zonepools/zones/rac4Zone/rpool/ROOT/solaris@install 6.97M - 291M -
zonepools/zones/rac4Zone/rpool/ROOT/solaris@backup1 387K - 5.36G -
zonepools/zones/rac4Zone/rpool/ROOT/solaris/var@install 27.4M - 66.2M -
zonepools/zones/rac4Zone/rpool/ROOT/solaris/var@backup1 0 - 82.5M -
zonepools/zones/rac4Zone/rpool/dump@backup1 0 - 16K -
zonepools/zones/rac4Zone/rpool/export@backup1 0 - 32K -
zonepools/zones/rac4Zone/rpool/export/home@backup1 6.24M - 1.83G -
zonepools/zones/rac4Zone/rpool/swap@backup1 0 - 16K -
Archive the zonepath
zfs send -rc zonepools/zones/rac4Zone@backup1 > /cont/rac4
Verify that the archive of the zonepath is created
root@isve-111-116:/cont# file /cont/rac4
/cont/rac4: ZFS snapshot stream
root@isve-111-116:~# zonecfg -z rac4Zone info zonepath
zonepath: /zonepools/zones/rac4Zone
Find out the data-set of zonepath
root@isve-111-116:~# zfs list -H -o name /zonepools/zones/rac4Zone
zonepools/zones/rac4Zone
Create a snapshot of the zonepath
root@isve-111-116:~# zfs snapshot -r zonepools/zones/rac4Zone@backup1
Verify that snapshot was successfully created
zfs snapshot -r zonepools/zones/rac4Zone@backup1
root@isve-111-116:~# zfs list -t snap -r zonepools/zones/rac4Zone
NAME USED AVAIL REFER MOUNTPOINT
zonepools/zones/rac4Zone@backup1 0 - 34K -
zonepools/zones/rac4Zone/rpool@backup1 0 - 31K -
zonepools/zones/rac4Zone/rpool/ROOT@backup1 0 - 31K -
zonepools/zones/rac4Zone/rpool/ROOT/solaris@install 6.97M - 291M -
zonepools/zones/rac4Zone/rpool/ROOT/solaris@backup1 387K - 5.36G -
zonepools/zones/rac4Zone/rpool/ROOT/solaris/var@install 27.4M - 66.2M -
zonepools/zones/rac4Zone/rpool/ROOT/solaris/var@backup1 0 - 82.5M -
zonepools/zones/rac4Zone/rpool/dump@backup1 0 - 16K -
zonepools/zones/rac4Zone/rpool/export@backup1 0 - 32K -
zonepools/zones/rac4Zone/rpool/export/home@backup1 6.24M - 1.83G -
zonepools/zones/rac4Zone/rpool/swap@backup1 0 - 16K -
Archive the zonepath
zfs send -rc zonepools/zones/rac4Zone@backup1 > /cont/rac4
Verify that the archive of the zonepath is created
root@isve-111-116:/cont# file /cont/rac4
/cont/rac4: ZFS snapshot stream
iSCSI setup
This blog describes the steps to setup S7420 storage as iSCSI device.
Verify that the iscsi initiator service is enabled on the Solaris initiator. If not, enable the service.
root@dat02:~# svcs | grep initiator
online Jun_08 svc:/system/fcoe_initiator:default
online Jun_08 svc:/network/iscsi/initiator:default
Log on to Solaris initiator and find out the IQN value of the server and the number of configured sessions
root@dat02:~# iscsiadm list initiator-node
Initiator node name: iqn.1986-03.com.sun:01:002128f52ca4.4fb2e431
Initiator node alias: dat02
Login Parameters (Default/Configured):
Header Digest: NONE/-
Data Digest: NONE/-
Max Connections: 65535/-
Authentication Type: NONE
RADIUS Server: NONE
RADIUS Access: disabled
Tunable Parameters (Default/Configured):
Session Login Response Time: 60/-
Maximum Connection Retry Time: 180/-
Login Retry Time Interval: 60/-
Configured Sessions: 1
Solaris initiator can use the target only after configuring a discovery method (a way to identify targets on the network). Solaris supports three discovery methods
The following commands list which discovery method is enabled
root@dat02:~# iscsiadm list discovery
Discovery:
Static: disabled
Send Targets: enabled
iSNS: disabled
The following commands enables the sendTarget discovery method
SendTargets:
Enable the send target discovery method and add the IP address of the target (storage) to the discovery address.
root@dat02:~# iscsiadm modify discovery --sendtarget enable
root@dat02:~# iscsiadm add discovery-address 10.129.195.222
You can list the IP address of target that is discovered by the server using the list command:
root@dat01:/etc# iscsiadm list discovery-address
Discovery Address: 10.129.195.222:3260
The following commands deletes a particular iSCSI target from discovery list :
root@dat01:/etc# iscsiadm remove discovery-address 10.129.195.222
root@dat01:/etc# iscsiadm list target -vS
This discovery method can be disabled as under:
iscsiadm modify discovery --sendtargets disable
Once the initiator is configured with a valid discovery method, the initiator should see one or more targets by issuing the list target subcommand
iscsiadm list target
root@dat02:~# iscsiadm list target
Target: iqn.1986-03.com.sun:02:b3c7500a-b7ca-c791-a949-d79bf0862c17
Alias: iscsi-target
TPGT: 2
ISID: 4000002a0000
Connections: 1
To get the list of all the LUNs exposed to the server, use -S option
root@dat02:~# iscsiadm list target -help
iscsiadm: '-h': invalid option
iscsiadm list target [OPTIONS] [<target-name ...>]
OPTIONS:
-v, --verbose
-S, --scsi-target
For more information, please see iscsiadm(1M)
root@dat02:~# iscsiadm list target -vS
Target: iqn.1986-03.com.sun:02:b3c7500a-b7ca-c791-a949-d79bf0862c17
Alias: iscsi-target
TPGT: 2
ISID: 4000002a0000
Connections: 1
CID: 0
IP address (Local): 10.129.195.190:32957
IP address (Peer): 10.129.195.222:3260
Discovery Method: SendTargets
Login Parameters (Negotiated):
Data Sequence In Order: yes
Data PDU In Order: yes
Default Time To Retain: 20
Default Time To Wait: 2
Error Recovery Level: 0
First Burst Length: 65536
Immediate Data: yes
Initial Ready To Transfer (R2T): yes
Max Burst Length: 262144
Max Outstanding R2T: 1
Max Receive Data Segment Length: 32768
Max Connections: 32
Header Digest: NONE
Data Digest: NONE
LUN: 3
Vendor: SUN
Product: ZFS Storage 7420
OS Device Name: /dev/rdsk/c0t600144F0EE8675B100004FD626260006d0s2
LUN: 2
Vendor: SUN
Product: ZFS Storage 7420
OS Device Name: /dev/rdsk/c0t600144F0EE8675B100004FD61BBC0005d0s2
LUN: 1
Vendor: SUN
Product: ZFS Storage 7420
OS Device Name: /dev/rdsk/c0t600144F0EE8675B100004FD39DE50004d0s2
LUN: 0
Vendor: SUN
Product: ZFS Storage 7420
OS Device Name: /dev/rdsk/c0t600144F0EE8675B100004FD39CC80003d0s2
On the storage side:
Go to Configuration->SAN-> and setup target and initiator portal. There is a default target and initiator created which can be used as well.
Go to Confiiguration->Storage pool and create a new storage pool if required
Go to Shares->Project and create a new project.
Add LUNS to these project and select the target and initiator portals for the LUNS.(the default ones or the ones you created for extra security). You can select the target and initiator options under the Protocol sections when you edit the LUN
You do not need to create target and initiator group. The default ones work one. If you can discovery address and cannot view the target, check /var/adm/messages for any error messages. Try restarting iSCSI service on target ZFSSA and reboot the Solaris server , if needed.
Additional info:
http://prefetch.net/articles/solarisiscsi.html
http://sosc-dr.sun.com/bigadmin/features/articles/7000_oracle_iscsi_asm.pdf
http://www.youtube.com/watch?feature=endscreen&NR=1&v=iETgvITMQ1w
http://www.oracle.com/technetwork/articles/servers-storage-admin/o11-104-iscsi-luns-linux-518400.html
Verify that the iscsi initiator service is enabled on the Solaris initiator. If not, enable the service.
root@dat02:~# svcs | grep initiator
online Jun_08 svc:/system/fcoe_initiator:default
online Jun_08 svc:/network/iscsi/initiator:default
Log on to Solaris initiator and find out the IQN value of the server and the number of configured sessions
root@dat02:~# iscsiadm list initiator-node
Initiator node name: iqn.1986-03.com.sun:01:002128f52ca4.4fb2e431
Initiator node alias: dat02
Login Parameters (Default/Configured):
Header Digest: NONE/-
Data Digest: NONE/-
Max Connections: 65535/-
Authentication Type: NONE
RADIUS Server: NONE
RADIUS Access: disabled
Tunable Parameters (Default/Configured):
Session Login Response Time: 60/-
Maximum Connection Retry Time: 180/-
Login Retry Time Interval: 60/-
Configured Sessions: 1
Solaris initiator can use the target only after configuring a discovery method (a way to identify targets on the network). Solaris supports three discovery methods
- static discovery
- SendTargets
- iSNS
The following commands list which discovery method is enabled
root@dat02:~# iscsiadm list discovery
Discovery:
Static: disabled
Send Targets: enabled
iSNS: disabled
The following commands enables the sendTarget discovery method
SendTargets:
Enable the send target discovery method and add the IP address of the target (storage) to the discovery address.
root@dat02:~# iscsiadm modify discovery --sendtarget enable
root@dat02:~# iscsiadm add discovery-address 10.129.195.222
You can list the IP address of target that is discovered by the server using the list command:
root@dat01:/etc# iscsiadm list discovery-address
Discovery Address: 10.129.195.222:3260
The following commands deletes a particular iSCSI target from discovery list :
root@dat01:/etc# iscsiadm remove discovery-address 10.129.195.222
root@dat01:/etc# iscsiadm list target -vS
This discovery method can be disabled as under:
iscsiadm modify discovery --sendtargets disable
Once the initiator is configured with a valid discovery method, the initiator should see one or more targets by issuing the list target subcommand
iscsiadm list target
root@dat02:~# iscsiadm list target
Target: iqn.1986-03.com.sun:02:b3c7500a-b7ca-c791-a949-d79bf0862c17
Alias: iscsi-target
TPGT: 2
ISID: 4000002a0000
Connections: 1
To get the list of all the LUNs exposed to the server, use -S option
root@dat02:~# iscsiadm list target -help
iscsiadm: '-h': invalid option
iscsiadm list target [OPTIONS] [<target-name ...>]
OPTIONS:
-v, --verbose
-S, --scsi-target
For more information, please see iscsiadm(1M)
root@dat02:~# iscsiadm list target -vS
Target: iqn.1986-03.com.sun:02:b3c7500a-b7ca-c791-a949-d79bf0862c17
Alias: iscsi-target
TPGT: 2
ISID: 4000002a0000
Connections: 1
CID: 0
IP address (Local): 10.129.195.190:32957
IP address (Peer): 10.129.195.222:3260
Discovery Method: SendTargets
Login Parameters (Negotiated):
Data Sequence In Order: yes
Data PDU In Order: yes
Default Time To Retain: 20
Default Time To Wait: 2
Error Recovery Level: 0
First Burst Length: 65536
Immediate Data: yes
Initial Ready To Transfer (R2T): yes
Max Burst Length: 262144
Max Outstanding R2T: 1
Max Receive Data Segment Length: 32768
Max Connections: 32
Header Digest: NONE
Data Digest: NONE
LUN: 3
Vendor: SUN
Product: ZFS Storage 7420
OS Device Name: /dev/rdsk/c0t600144F0EE8675B100004FD626260006d0s2
LUN: 2
Vendor: SUN
Product: ZFS Storage 7420
OS Device Name: /dev/rdsk/c0t600144F0EE8675B100004FD61BBC0005d0s2
LUN: 1
Vendor: SUN
Product: ZFS Storage 7420
OS Device Name: /dev/rdsk/c0t600144F0EE8675B100004FD39DE50004d0s2
LUN: 0
Vendor: SUN
Product: ZFS Storage 7420
OS Device Name: /dev/rdsk/c0t600144F0EE8675B100004FD39CC80003d0s2
On the storage side:
Go to Configuration->SAN-> and setup target and initiator portal. There is a default target and initiator created which can be used as well.
Go to Confiiguration->Storage pool and create a new storage pool if required
Go to Shares->Project and create a new project.
Add LUNS to these project and select the target and initiator portals for the LUNS.(the default ones or the ones you created for extra security). You can select the target and initiator options under the Protocol sections when you edit the LUN
You do not need to create target and initiator group. The default ones work one. If you can discovery address and cannot view the target, check /var/adm/messages for any error messages. Try restarting iSCSI service on target ZFSSA and reboot the Solaris server , if needed.
Additional info:
http://prefetch.net/articles/solarisiscsi.html
http://sosc-dr.sun.com/bigadmin/features/articles/7000_oracle_iscsi_asm.pdf
http://www.youtube.com/watch?feature=endscreen&NR=1&v=iETgvITMQ1w
http://www.oracle.com/technetwork/articles/servers-storage-admin/o11-104-iscsi-luns-linux-518400.html
Tuesday, April 24, 2012
About Life
Swara Yoga:
- http://www.proutjournal.com/health/role-of-nostrils-a-subtle-aspect-of-meditation.html
- http://www.sanatansociety.org/yoga_and_meditation/swara_yoga.htm
The Five Secrets of CreationBy Sri Sri Ravi Shankar----------------------------------Deepening the mystery of creation is science. Deepening the mystery of self is spirituality.The purpose of the technology is to comfort human beings. When spiritual values—human values are ignored and neglected, technology brings fear and destruction instead of comfort.Technology without human values would see nature as a dead object. Science gives insight into the life of nature, and spirituality makes nature come alive. For example, in the eyes of the children, there is nothing dead in the world, animals, trees, the sun the moon all are alive, and have emotions and feelings. But in the eyes of the stressed and ignorant person, even human beings are like robots or objects!Technology without spirituality is destructive. Spirituality is the technology of consciousness, and the whole world is the play and display of consciousness.One whose eyes are not opened is not amazed by the magnificence of the creation. Tell me, what in the creation is not mystery? Birth is a mystery, Death is a mystery and life itself is certainly a greater mystery.Samadhi is being completely immersed in the mystery of life and in this creation. Your knowing or believing in really does not matter.This creation is an unfathomable secret! A wise person makes no effort to conceal a secret. But does he make an effort to reveal a secret either? For example, you do not talk about menstruation or death to a five-year-old. But as children grow older, these things are not hidden from them. These become known as a matter of course.There are five secrets that are sacred and guarded by subtle beings and angels in this creation.Janama Rahasya or secret of birth : Birth is a secret. How a soul takes a body, and the criteria for selecting the place and time of birth, type of body, and parents are all a secret.Marana Rahasya or secret of death : Death is a highly guarded secret. Death remains a mystery. The process of separation of spirit from matter and its journey from then is a secret.Raja Rahasya or the secret of governance : The principles of governing and the principles of maintaining orderliness in creation are secret.Prakriti Rahasya or the secret of the nature : Nature is a mystery. The more you know about nature, more the mystery deepens. The more a scientist knows, more he realizes there is to know. Science, though appearing to resolve the mystery in creation, has deepened it. Knowledge of particles, wave functions, black holes and the vacuum state have only deepened the mystery.Mantra Rahasya or the secret of Mantras : Mantras are impulses or rhythms of consciousness. The mantras and their effect, influence, method and mode of working are all a mystery.In the West, a secret is usually shameful and dishonest. However, in the East, a secret is honored and considered sacred. Mysteries of creation only deepen. Getting steeped in the mystery is devotion.Deepening the mystery of creation is science. Deepening the mystery of self is spirituality. They are two sides of the same coin. If neither science nor spirituality can create wonder and devotion in you, then you are in deep slumber.Whenever you consider a symbol, place, time, person or act as sacred, your attention is undivided and whole. When the things are the same, you tend to slip into unawareness and inertia. Why does an act that is performed repeatedly lose its sacredness? This happened when your memory overpowers your consciousness and you loose your sensitivity. For example, people living in Varanasi (Benaras), a holy city in India , do not feel that it is a sacred place. Through living in a present moment and throughSadhana, spiritual practices, we can preserve that feeling of sacredness in our acts.There is a pleasure in rest and there is pleasure in activity. The pleasure in activity is momentary and causes fatigue. The pleasure in rest is magnanimous and energizing. To one who has tasted pleasure in rest (Samadhi), the pleasure in activity is insignificant. But in order to have deep rest, one must be active. The proper balance of both is essential.The Mind :Let us examine the five factors that influence the mind. : space, time, food, past impressions, associations and actions.Space : The place you are in. Every place you are in has a different impact on the mind. Even in your house, you can see that you feel different in different rooms. A place where there has been singing, chanting and meditation has different influence on mind. Suppose you like a particular place, you may find a little later it will not be the same.Time : Time is also a factor. Different times of the day and year have different influences on the mind.Food : Different types of food that you eat influence you for a few days.Past impressions or Karmas have a different impact on the mind. Awareness, alertness, knowledge and meditation all help erase past impressions.Associations and actions : The people and events you are associated with influence your mind. With certain people your mind behaves one way and with others a different way.Although these five factors influence your life and your mind, know that Self is more powerful. As you grow in knowledge, you influence them all.Restlessness:Now let us examine the types of restlessness and its remedies. There are five types of restlessness :The first is due to place you are in. When you move away from certain places, streets or houses, you immediately feel better. Chanting, singing, or the innocence of children playing and laughing can change this atmospheric restlessness. If you chant and sing, the vibration in the place changes.The second type of restlessness is in the body. Eating the wrong food, Vata or aggravating food, eating at odd times, not exercising, and overworking can all cause physical restlessness. The remedy for this is exercise, moderation in the work habits and a one to two day vegetable or juice diet.The third type of restlessness is mental restlessness. It is caused by ambition, strong thoughts, likes or dislikes. Knowledge alone can cure this restlessness; this includes seeing life from a broader perspective, knowing about the Self and realizing the impermanence of everything. If you achieve everything, so what? After your achievement you will die. Knowledge of your death or life, confidence in the Self and in the divine can all calm down mental restlessness.There is also emotional restlessness. Any amount of knowledge does not help here.Sudarshan Kriya helps! All that emotional restlessness vanishes. Also the presence of the Guru, a wise person, or a saint will help calm emotional restlessness.The fifth type of restlessness is rare. It is the restlessness of the Soul. When everything feels empty and meaningless, know you are very fortunate. Do not try to get rid of it.Embrace it! This restlessness of the Soul can bring authentic prayer in you. It brings perfection, Siddhis and miracles in life. It is so precious to get that longing for the Divine.Satsang and presence of enlightened once, soothe the restlessness of the Soul. Do not look for the Divine somewhere else in the sky. See God in every pair of eyes, in the mountains, water, trees and animals. How? Only when you see God in yourself. Only Gods can worship Gods.Heightened awareness brings you close to the reality. And for this you have toincrease your Prana. This can be done through 1. fasting and eating fresh food 2. Pranayams, Sudarshan Kriya, and meditation 3. Silence 4. Cold water baths 5. The right amount of sleep 6. Emotional contentment 7. Presence of the Master 8. Singing and chanting 9. Giving without Givership and service without Doership.All these together are called as Yagya. When you have reverence for the whole universe, you are in harmony with the whole universe. Then, you do not need to reject or renounce anything. When you have reverence in all your relationships, your own consciousness expands; Even small things appear to be significant and big. Every little creature appears dignified. It is the reverence in every relationship that saves the relationship. Cultivate the skill of having reverence for every moment of your life
- Why do we return to the world:
Most of us come into this world with the seed in us, "It's not OK". And all our life we try to correct events, people and situations. How much can you correct? It's like trying to rearrange the clouds in the sky. This seed does not allow you to be happy, to smile from your heart, to be loving and loveable. It's there all the time like a thorn - irritating, irritating.
This seed, "It's not OK," brings you back into this world again and again. How do you burn this seed?
First recognize that it is there. This can happen in deep introspection and meditation.
Sometimes you feel your body, mind, intellect, memory and ego are also not OK. You justify them or find fault with them. These are also part of the world. Acknowledge what you see as an imperfection and offer it to the Divine.
Have faith in the infinite organizing power of the Supreme Intelligence and have the sincere feeling, "Let thy will be done." Then the seed, "It's not OK," gets burned. "Thy will be done" is a state of total contentment, a state of just love.
We need not even make it a statement about the future. "Thy will alone is happening now."
Question:So everything happening is God's will?
Guruji:Yes, including the thought, "This shouldn't be happening."
Thursday, April 5, 2012
Solaris 11: pkg basics
- Find out if the pkg exist
- pkg info gcc or pkg list | head
- Find the pkg
- pkg search gcc
- List the publisher
- pkg publisher
- Set the publisher
- pkg set-publisher -g http://pkg.example.com/release example.com
- For publisher name and origin refer to : http://ipkg.us.oracle.com/repos.html
- Install the pkg
- pkg search gcc
- pkg install gcc-45
- Uninstall the pkg
- pkg uninstallgcc
- Additional info:
- http://docs.oracle.com/cd/E19963-01/html/820-6572/cmd_line.html
- Reset the publisher
- Say the publisher is set to http://ivy2.us.oracle.com and you need to set it to newURL.Remove the old URL with -G and add new one with -g option
- root@dat03:~# pkg publisher
- PUBLISHER TYPE STATUS P LOCATION
- solaris origin online F http://ivy2.us.oracle.com/support/sru/
- pkg set-publisher -G "*" -g http://ipkg.us.oracle.com/solaris12/dev/ solaris
- root@dat03:~# pkg publisher
- PUBLISHER TYPE STATUS P LOCATION
- solaris origin online F http://ipkg.us.oracle.com/solaris12/dev/
emctl : Can't locate CompEMdbconsole.pm in @INC error.
If you are starting emctl from grid home , you will see error like:
Can't locate CompEMdbconsole.pm in @INC error.
emctl start dbconsole
Can't locate CompEMdbconsole.pm in @INC (@INC contains: %s_javapOracleHome%/sysman/admin/scripts %s_javapOracleHome%/bin /u01/app/11.2.0.3/grid/perl/lib/5.10.0/sun4-solaris
Start emctl from Oracle home to resolve this error.
cd $ORACLE_HOME/bin
./emctl start dbconsole
Can't locate CompEMdbconsole.pm in @INC error.
emctl start dbconsole
Can't locate CompEMdbconsole.pm in @INC (@INC contains: %s_javapOracleHome%/sysman/admin/scripts %s_javapOracleHome%/bin /u01/app/11.2.0.3/grid/perl/lib/5.10.0/sun4-solaris
Start emctl from Oracle home to resolve this error.
cd $ORACLE_HOME/bin
./emctl start dbconsole
Wednesday, March 14, 2012
Vmstat : Shows high value in w column (kthr:w)
vmstat show a large number of jobs in the W column:
Server1-bash-3.2# vmstat 3
kthr memory page disk
faults cpu
r b w swap free re mf pi po fr de sr sd sd sd sd in
sy cs us sy id
0 0 68 76448832 36343640 166 310 23 43 44 0 257 6 6 6 8
7067 21823 8140 2 1 98
0 0 63 68541064 19006448 191 175 0 3 3 0 0 0 0 0 2 4782
28848 5270 0 0 99
0 0 63 68540680 19006352 234 373 0 21 21 0 0 0 0 0 2 5088
10180 5829 0 0 99
0 0 63 68535824 19001768 191 304 0 0 0 0 0 0 0 0 2 4572
6873 4896 2 0 98
This happens when your server ran out of RAM previously, due to which the
swapper had to swap out entire threads out of memory.
You can issue sar -q 1 to find out how long the threads have been swapped out and you can issue iostat -xnPz 1 on the swap device to see how busy it has been.
You can issue sar -q 1 to find out how long the threads have been swapped out and you can issue iostat -xnPz 1 on the swap device to see how busy it has been.
You can run the following command to view the process that have been swapped out :
- echo "::walk thread thr |::print kthread_t t_schedflag|::grep .'==0 '|::eval p_pidp->pid_id" | mdb -k
or
- echo "::walk thread thr |::print kthread_t t_schedflag|::grep ==0 |::eval <thr=K|::print kthread_t t_procp->p_user.u_comm" | mdb -k
A non-zero number in kthr:w field indicates that
certain threads have been swapped out to the
(swap) disk as there was a shortage of physical
memory. Even when the system frees the memory,
those processes continue to swap out till you make
them do something (like just truss the process
....)
If the number of processes that are swapped out are not increasing , you are ok. However, if you want to find out which processes have been swapped out and remove them from swap, then you can issue the aboce mentioned command to get the list of swapped processes and issue truss on them or kill them ..
If the processes are application related, merely restarting the app or rebooting the server will do it.
If the number of processes that are swapped out are not increasing , you are ok. However, if you want to find out which processes have been swapped out and remove them from swap, then you can issue the aboce mentioned command to get the list of swapped processes and issue truss on them or kill them ..
If the processes are application related, merely restarting the app or rebooting the server will do it.
Tuesday, March 13, 2012
LDOM : Links
- To remove a domain
- ldm stop-domain -a
- ldm unbind-domain ldom1
- ldm remove-domain -a
- To remove all domains and set to factory-default
- Reference documentation for ldm command
- http://docs.oracle.com/cd/E23120_01/html/821-2855/ldm-1m.html#scrolltoc
- Check ldm version
- ldm -V
- LDOM installation whitepaper:
- http://www.oracle.com/technetwork/articles/systems-hardware-architecture/vmsrvrsparc-reliability-163931.pdf
Friday, March 9, 2012
LDOMS :Getting started Part 2
- This post describes the steps to create 7 ldoms in a T4-2 core such that each LDOM uses a core from the first socket.
- Start the required services on the primary domain
NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME
primary active -n-c-- UART 128 130560M 0.0% 9m
# ldm list-services
# ldm add-vds primary-vds0 primary
# ldm add-vcc port-range=5000-51000 primary-vcc0 primary
# ldm add-vsw net-dev=net0 primary-vsw0 primary
# ldm list-services
VCC
NAME LDOM PORT-RANGE
primary-vcc0 primary 5000-5100
VSW
NAME LDOM MAC NET-DEV ID DEVICE LINKPROP DEFAULT-VLAN-ID PVID VID MTU MODE INTER-VNET-LINK
primary-vsw0 primary 00:14:4f:f9:59:1c net0 0 switch@0 1 1 1500 on
VDS
NAME LDOM VOLUME OPTIONS MPGROUP DEVICe
primary-vds0 primary
- STart vntsd service
# svcs vntsd
STATE STIME FMRI
online 14:31:06 svc:/ldoms/vntsd:default
#
Add 7 disks for OS install for 7 ldoms
ldm add-vdsdev /dev/rdsk/c1t0d4s2 c1t0d4s2@primary-vds0
ldm add-vdsdev /dev/rdsk/c1t0d6s2 c1t0d6s2@primary-vds0
ldm add-vdsdev /dev/rdsk/c1t0d8s2 c1t0d8s2@primary-vds0
ldm add-vdsdev /dev/rdsk/c1t0d10s2 c1t0d10s2@primary-vds0
ldm add-vdsdev /dev/rdsk/c2t4d5s2 c2t4d5s2@primary-vds0
ldm add-vdsdev /dev/rdsk/c2t4d7s2 c2t4d7s2@primary-vds0
ldm add-vdsdev /dev/rdsk/c2t4d9s2 c2t4d9s2@primary-vds0
Or export ZFS volume for OS install
#ldm rm-vdisk disk1 ldom1
#zpool destroy ldom1P
zpool create ldom1P c1t0d4s2
zfs create ldom1P/ldom1
zfs create -V 20gb ldom1P/ldom1/disk0
ldm add-vdsdev /dev/zvol/dsk/ldom1P/ldom1/disk0 ldom1_disk@primary-vds0
zpool create ldom2P c1t0d6s2
zfs create ldom2P/ldom
zfs create -V 20gb ldom2P/ldom/disk0
ldm add-vdsdev /dev/zvol/dsk/ldom2P/ldom/disk0 ldom2_disk@primary-vds0
zpool create ldom3P c1t0d8s2
zfs create ldom3P/ldom
zfs create -V 20gb ldom3P/ldom/disk0
ldm add-vdsdev /dev/zvol/dsk/ldom3P/ldom/disk0 ldom3_disk@primary-vds0
zpool create ldom4P c1t0d10s2
zfs create ldom4P/ldom
zfs create -V 20gb ldom4P/ldom/disk0
zpool create -f ldom5P c2t4d5s2
zfs create ldom5P/ldom
zfs create -V 20gb ldom5P/ldom/disk0
ldm add-vdsdev /dev/zvol/dsk/ldom5P/ldom/disk0 ldom5_disk@primary-vds0
zpool create -f ldom6P c2t4d7s2
zfs create ldom6P/ldom
zfs create -V 20gb ldom6P/ldom/disk0
ldm add-vdsdev /dev/zvol/dsk/ldom6P/ldom/disk0 ldom6_disk@primary-vds0
zpool create -f ldom7P c2t4d9s2
zfs create ldom7P/ldom
zfs create -V 20gb ldom7P/ldom/disk0
ldm add-vdsdev /dev/zvol/dsk/ldom7P/ldom/disk0 ldom7_disk@primary-vds0
Set up the primary domain with 1 core and 7680M of memory
ldm start-reconf primary
ldm set-memory 7680M primary
ldm set-core cid=0 primary
ldm add-config initial
Power cycle the server
reset /SYS
Create the 7 ldoms as under:
ldm add-domain ldom1
ldm set-core cid=1 ldom1
ldm add-vdisk disk1 ldom1_disk@primary-vds0 ldom1
ldm add-vnet vnet1 primary-vsw0 ldom1
ldm set-variable auto-boot\?=true ldom1
ldm set-variable boot-device=disk1 ldom1
ldm add-domain ldom2
ldm set-core cid=2 ldom2
ldm add-vdisk disk2 ldom2_disk@primary-vds0 ldom2
ldm add-vnet vnet2 primary-vsw0 ldom2
ldm set-variable auto-boot\?=true ldom2
ldm set-variable boot-device=disk2 ldom2
ldm add-domain ldom3
ldm set-core cid=3 ldom3
ldm add-vdisk disk3 ldom3_disk@primary-vds0 ldom3
ldm add-vnet vnet3 primary-vsw0 ldom3
ldm set-variable auto-boot\?=true ldom3
ldm set-variable boot-device=disk3 ldom3
ldm add-domain ldom4
ldm set-core cid=4 ldom4
ldm add-vdisk disk4 ldom4_disk@primary-vds0 ldom4
ldm add-vnet vnet4 primary-vsw0 ldom4
ldm set-variable auto-boot\?=true ldom4
ldm set-variable boot-device=disk4 ldom4
ldm add-domain ldom5
ldm set-core cid=5 ldom5
ldm add-vdisk disk5 ldom5_disk@primary-vds0 ldom5
ldm add-vnet vnet5 primary-vsw0 ldom5
ldm set-variable auto-boot\?=true ldom5
ldm set-variable boot-device=disk5 ldom5
ldm add-domain ldom6
ldm set-core cid=6 ldom6
ldm add-vdisk disk6 ldom6_disk@primary-vds0 ldom6
ldm add-vnet vnet6 primary-vsw0 ldom6
ldm set-variable auto-boot\?=true ldom6
ldm set-variable boot-device=disk6 ldom6
ldm add-domain ldom7
ldm set-core cid=7 ldom7
ldm add-vdisk disk7 ldom7_disk@primary-vds0 ldom7
ldm add-vnet vnet7 primary-vsw0 ldom7
ldm set-variable auto-boot\?=true ldom7
ldm set-variable boot-device=disk7 ldom7
ldm add-domain park
ldm set-vcpu -c 8 park
Assign them memory
ldm add-memory 8G park
ldm add-memory 8G ldom1
ldm add-memory 8G park
ldm add-memory 8G ldom2
ldm add-memory 8G park
ldm add-memory 8G ldom3
ldm add-memory 8G park
ldm add-memory 8G ldom4
ldm add-memory 8G park
ldm add-memory 8G ldom5
ldm add-memory 8G park
ldm add-memory 8G ldom6
ldm add-memory 8G park
ldm add-memory 8G ldom7
ldm add-memory 8G park
Bind the domains:
ldm bind-domain ldom1
ldm bind-domain ldom2
ldm bind-domain ldom3
ldm bind-domain ldom4
ldm bind-domain ldom5
ldm bind-domain ldom6
ldm bind-domain ldom7
ldm bind-domain park
Thursday, March 8, 2012
LDOMS: Getting started
- Verify if LDOM is already installed
- svcs ldmd
- if not, install LDOM using the following command
- pkg install ldomsmanager
- Verify that primary domain exist
- ldm list primary
- Check if the primary domain have the required services
- ldm ldm list-services primary
- If services are not available in primary domain, add these services. Add a virtual disk server, virutal console concentrator and virutal switch to the primary domain. These virtual services must be created to use the control domain as a service domain and to create virtual devices for other domains.
- Create a virtual disk server to allow importing virtual disks into a logical domain
- ldm add-vds primary-vds0 primary
- Export physical disks as virtual disks . Later these disks can be assigned to guest domain
- ldm add-vdsdev /dev/rdsk/c3t0d1s2 c3t0d1s2@primary-vds0
- Verify that virtual disks has been added to virtual disk server by checking the VDS section of the following output
- ldm list-bindings
- Add a virtual console concentrator
- ldm add-vcc port-range=5000-5100 primary-vcc0 primary
- Find the primary network interface (dladm show-phys) and add a virtual switch associated with primary network card. Virtual switch service enables networking between virtual network (vnet) devices in logical domains. The following command creates vritual switch named primary-vsw0 on net0 interface in the primary domain
- ldm add-vsw net-dev=net0 primary-vsw0 primary
- Verify that vsw0 device is created by issue dlam show-phys command
- # dladm show-phys
LINK MEDIA STATE SPEED DUPLEX DEVICE
net1 Ethernet unknown 0 unknown igb1
net4 Ethernet up 10 full usbecm2
net3 Ethernet unknown 0 unknown igb3
net0 Ethernet up 1000 full igb0
net2 Ethernet unknown 0 unknown igb2
net6 Ethernet up 1000 full vsw0 - Also , verify that switch is created over on net0 interface
- VSW
NAME MAC NET-DEV ID DEVICE LINKPROP DEFAULT-VLAN-ID PVID VID MTU MODE INTER-VNET-LINK
primary-vsw0 00:14:4f:fb:3f:ea net0 0 switch@0 1 1 1500 on
- Verify the services have been created by using the list-services command
- ldm list-services primary
- Remove some resources from primary domain so it can be allocated to guest domains. Configure the control domain with 32 virutal CPUs and 16GB of memory
- # ldm start-reconf primary
- # ldm set-vcpu 32 primary
- # ldm set-memory 16G primary
- # ldm set-crypto 4 primary
- Save the configuration and reboot the system
- ldm add-config initial
- ldm list-config
- init 6
- Enable the virtual network terminal server daemon to provide access to the virtual console to each logical domain
- svcadm enable vntsd
- svcs vntsd
- Create the guest domain ldom1 from the control domain. Assign 48 VCPUs and 24G of memory to it.
- # ldm create ldom1
- # ldm set-vcpu 48 ldom1
- # ldm set-memory 24G ldom1
- # ldm set-crypto 6 ldom1
- Assign the disk to your domain
- ldm add-vdisk pdisk c3t0d1s2@primary-vds0 ldom1
- Set auto-boot? and boot-device variables for the guest domain
- ldm set-variable auto-boot\?=true ldom1
- ldm set-variable boot-device=pdisk ldom1
- Assign vnet to the domain
- ldm add-vnet vnet1 primary-vsw0 ldom1
Thursday, January 19, 2012
Creating volume with Sun StorageTek Common Array Manager (CAMS)
Some terminology:
If you do not care about which disks are getting assigned and you want to create 7 volumes for LDOM OS disk, you can create a profile namely ldom_disk and assign it 7 disks. You can then create a pool out of it and create 7 volumes from that pool with each containing one virtual disk.
On the server side,run devfsadm -Cv. Also, check the OS device name on which the HBA is attached and issue cfgadm -al | grep c<portnumber> to verify that you can view all the volumes. You can also run the following command : cfgadm -al -o show_FCP_dev c2 to see all the FC devices on the C<portnumber> controller
Storage Pool: We can now take all or part of the disks in the array and attach a profile to it. This would mean that all the disks in this pool would have the RAID level, the segment size, read ahead property, etc of the storage profile that was attached to it.
Virtual Disks: We can think of virtual disks as groups of physical disks on which the volumes are created.
Volumes: From the Storage Pool that we created we could create one or more volumes. The volume that we create will be the ones that the servers see as disks. We can then mount filesystems on them, or use them as raw devices from the server side.
Mappings: The volumes that we create are now mapped onto controllers. A volume can only be mapped/attached to one controller. It's through the ports of the controller that the volume talks to the server.
Controller Ports: Controller usually have multiple ports, where each port could have a speed of say 2Gbps or 4 Gbps or something. If our controller has 4 x 4 Gbps ports, and you have connected Links from the 4 ports to the server, then you'll have 4 different paths leading to the same LUN.We could use MpxIO to fold the 4 paths into a single path on the server side.
Note that if we are using only 1 x 4 Gbps port of your controller, and converting Gbps to MB/sec, that you can get a throughput of around 500 MB/sec.
Here are the steps to create a Volume using Sun StorageTek Common Array Manager(CAMS):
Start with creating a Profile → Storage Pool → Create a new Volume → Map the Volume to a controller.
Now when you do a format from the server(Solaris) side you'll see the LUNs that you have created.
Documentation : http://docs.sun.com/app/docs/prod/stor.arrmgr66?l=en&a=view
f you want to create 7 volumes out of 14 disks, each having 2 disk, first create a profile with 2 disks name : raid0_RA Raid : RAID) Segment L 512KB Noof disk: 2 Disk type : Any Assign that profile to a pool name : RA_POOL storage profile: raid0_RA Create volume out of that pool, select Currently unassigned disk ; Select specific disks to be used; choose two disk from the list; give a volume name, select number ot create as 1; assign it a controller ; Map to the default storage domain and select ok.;
Volume Name: | vol7 |
Volume Capacity: | Fill One Virtual Disk with volumes of size 930.523 GB |
Pool Name: | raid0_pool |
Storage Profile: | raid0 |
Storage Characteristics: | RAID:0, Segment Size: 512 KB, Read-Ahead: false, Number Of Disks: 2, Disk Type: ANY |
Virtual Disk Name: | Create New Virtual Disk Using the Following Drives: [t85d16, t85d15] |
Controller: | B |
Mapping To: | Default Storage Domain - LUN:7 |
If you do not care about which disks are getting assigned and you want to create 7 volumes for LDOM OS disk, you can create a profile namely ldom_disk and assign it 7 disks. You can then create a pool out of it and create 7 volumes from that pool with each containing one virtual disk.
On the server side,run devfsadm -Cv. Also, check the OS device name on which the HBA is attached and issue cfgadm -al | grep c<portnumber> to verify that you can view all the volumes. You can also run the following command : cfgadm -al -o show_FCP_dev c2 to see all the FC devices on the C<portnumber> controller
Friday, January 6, 2012
Setup domainname in Solaris 11
- svcadm disable nis/domain
- svccfg -s svc:/network/nis/domain listprop config/domainname
- svccfg -s svc:/network/nis/domain setprop config/domainname = <your domain name>
- svccfg -s nis/domain:default refresh
- svcadm enable nis/domain
- Verify that domainname is setup correctly
- domainname
Vi : Some tricks
- Perform case insensitive search
- Global search and replace
- You can remove carriage return (
^M
) characters with the following command: - :1,$s/^M//g
Note: To input the
^M
character, pressCtrl-v
, and then pressEnter
orreturn
.
Sudo Installation
- As root issue visudo
- Ensure you have sudo binary under /usr/bin/sudo
- Search for root ALL=(ALL) ALL
- add the following line after the above line:
- <youruser> ALL=(ALL) NOPASSWD:ALL
- More info:
Open Office : Some tricks
- Convert text to columns in Open Office:
- http://www.oooninja.com/2008/01/text-columns-calc-convert-openoffice.htm.
- lf you are inserting more than one row and the row has tab seperated columns , than Open office opens the "text import" window by default. You can select the seperator option to be "Fixed Width" and click on the scale at the top to determine the column length.
- How to copy formula result from cell:
- How to add a non-changing column to a formula
- http://user.services.openoffice.org/en/forum/viewtopic.php?f=9&t=26752&start=0
- Add $ to a cell reference to make it absolute. ie Column D27 can be made absolute by =(D$27
- To insert spreadsheet or chart into presentation (Open Office Impress)
- Insert->Object ->OLE Objects -> Spreadsheet
- If slide panel is not docking back to its original position
- Click View, check Slide Panel so that you can view Slide Panel
- Hold down CTRL then double click on the gray area near the word "Slides" on the Slide Panel and it will dock itself in the right place
- Create graph from existing values
- Say you want Column A as X axis and Column B as y axis.
- Select the two columns and select "insert graph" option from the menu.
- The DATA RANGE will show:
- $Sheet1.$A$1:$B$101 replace that with
- $B1:$B$101 (the start and end row number of Column B)
- Click next: On data series , insert the following in categories:
$A$1:$A$101 (The start and end row number of Column A )
Fiber Channel Storage: Figure out what is attached
- Find out how many HBA ports the server has
- fcinfo hba-port | grep HBA
- HBA Port WWN: 2100001b32016904
- HBA Port WWN: 2101001b32216904
- HBA Port WWN: 2100001b3214bf2b
- HBA Port WWN: 2101001b3234bf2b
- fcinfo hba-port | grep "OS Device Name"
- OS Device Name: /dev/cfg/c8
- OS Device Name: /dev/cfg/c9
- OS Device Name: /dev/cfg/c1
- OS Device Name: /dev/cfg/c10
- fcinfo hba-port | grep State
- State: online
- State: online
- State: online
- State: online
- Issue cfgadm command to find out the ports attached to the OS devices
- cfgadm -al | more
- Ap_Id Type Receptacle Occupant Condition
- c1 fc-private connected configured unknown
- c1::201400a0b8563966 disk connected configured unknown
- c8::200600a0b82aa8e3 disk connected configured unknown
- c9 fc-private connected configured unknown
- c9::200700a0b82aa8e3 disk connected configured unknown
- c10 fc-private connected configured unknown
- c10::201500a0b8563966 disk connected configured unknown
- On the storage side, find the ports and match them with the ids next to OS device name
- To find out the disk name as listed in format command, refer to the WWN number listed in the volume sections of the storage
Volume name Controller LUN
V1 A 0
This matches to <controller id for A>,0 on format command
- Verify if multipathing is enabled on a disk
- mpathadm show lu
/dev/rdsk/c0t600A0B800056396600000FDB4EBC22C4d0s0
Subscribe to:
Posts (Atom)