The command to see zone status and example results follow.
If the zone STATUS is:
“running” it is up,
“installed” means it can be booted,
“configured" means it can be installed,
“unavailable” problem, usually means the zone image (LUN) is missing
Zones ending in –zc are part of a zonecluster.root@ex2s2app01:~# zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / solaris shared 1 dr-ex-zc running /zones/dr-ex-zc solaris shared
↧
howto zone status
↧
howto create zones
https://docs.oracle.com/cd/E19044-01/sol.containers/817-1592/z.inst.task-1/index.html
https://blogs.oracle.com/mandalika/entry/solaris_10_zone_creation_for
A Technical Overview of Oracle SuperClusterhttp://www.oracle.com/technetwork/server-storage/sun-sparc-enterprise/documentation/o13-045-sc-t5-8-arch-1982476.pdf
Oracle SuperCluster - An Example of Automating the Creating of Application Zones (Doc ID 2041460.1)
Implementing Application Zones on Oracle SuperClusterhttp://www.oracle.com/us/products/servers-storage/servers/sparc/supercluster/wp-app-zones-supercluster-2611960.pdf
Best Practices for Deploying Oracle Solaris Zones with Oracle Database 11g on SPARC SuperClusterhttp://www.oracle.com/technetwork/server-storage/engineered-systems/sparc-supercluster/deploying-zones-11gr2-supercluster-1875864.pdf
https://technicalsanctuary.wordpress.com/2016/04/21/creating-an-application-zone-on-a-supercluster/
https://technicalsanctuary.wordpress.com/2015/05/15/changing-the-number-of-cpus-in-a-zones-processor-set-pooladm-solaris-11-1/
https://technicalsanctuary.wordpress.com/2015/01/07/escaping-out-of-a-zlogin-c/
https://technicalsanctuary.wordpress.com/2014/05/02/solaris-11-repo-which-solaris-releases-are-available/
https://technicalsanctuary.wordpress.com/2014/03/24/showing-the-supercluster-software-release-version/
https://technicalsanctuary.wordpress.com/2011/11/25/check-current-value-of-shmmax-on-solaris/
https://blogs.oracle.com/mandalika/entry/solaris_10_zone_creation_for
A Technical Overview of Oracle SuperClusterhttp://www.oracle.com/technetwork/server-storage/sun-sparc-enterprise/documentation/o13-045-sc-t5-8-arch-1982476.pdf
Oracle SuperCluster - An Example of Automating the Creating of Application Zones (Doc ID 2041460.1)
Implementing Application Zones on Oracle SuperClusterhttp://www.oracle.com/us/products/servers-storage/servers/sparc/supercluster/wp-app-zones-supercluster-2611960.pdf
Best Practices for Deploying Oracle Solaris Zones with Oracle Database 11g on SPARC SuperClusterhttp://www.oracle.com/technetwork/server-storage/engineered-systems/sparc-supercluster/deploying-zones-11gr2-supercluster-1875864.pdf
https://technicalsanctuary.wordpress.com/2016/04/21/creating-an-application-zone-on-a-supercluster/
https://technicalsanctuary.wordpress.com/2015/05/15/changing-the-number-of-cpus-in-a-zones-processor-set-pooladm-solaris-11-1/
https://technicalsanctuary.wordpress.com/2015/01/07/escaping-out-of-a-zlogin-c/
https://technicalsanctuary.wordpress.com/2014/05/02/solaris-11-repo-which-solaris-releases-are-available/
https://technicalsanctuary.wordpress.com/2014/03/24/showing-the-supercluster-software-release-version/
https://technicalsanctuary.wordpress.com/2011/11/25/check-current-value-of-shmmax-on-solaris/
↧
↧
step by step environment
Install rlwrap and set alias
-- if you are subscribed to the EPEL repo yum install rlwrap -- if you want to build from source # wget http://utopia.knoware.nl/~hlub/uck/rlwrap/rlwrap-0.37.tar.gz # tar zxf rlwrap-0.37.tar.gz # rm rlwrap-0.37.tar.gz The configure utility will shows error: you need the GNU readline library. It just needs the readline-devel package # yum install readline-devel* # cd rlwrap-0.37 # ./configure # make # make install # which rlwrap /usr/local/bin/rlwrap alias sqlplus='rlwrap sqlplus' alias rman='rlwrap rman'
Install environment framework - karlenv
# name: environment framework - karlenv # source URL: http://karlarao.tiddlyspot.com/#%5B%5Bstep%20by%20step%20environment%5D%5D # notes: # - I've edited/added some lines on the setsid and showsid from # Coskan's code making it suitable for most unix(solaris,aix,hp-ux)/linux environments http://goo.gl/cqRPK # - added lines of code before and after the setsid and showsid to get the following info: # - software homes installed # - get DBA scripts location # - set alias # # SCRIPTS LOCATION export TANEL=~/dba/tanel export KERRY=~/dba/scripts export KARL=~/dba/karao/scripts/ export SQLPATH=~/:$TANEL:$KERRY:$KARL # ALIAS alias s='rlwrap -D2 -irc -b'\''"@(){}[],+=&^%#;|\'\'' -f $TANEL/setup/wordfile_11gR2.txt sqlplus / as sysdba @/tmp/login.sql' alias s1='sqlplus / as sysdba @/tmp/login.sql' alias oradcli='dcli -l oracle -g ~/dbs_group' # alias celldcli='dcli -l root -g /root/cell_group' # MAIN cat `cat /etc/oraInst.loc | grep -i inventory | sed 's/..............\(.*\)/\1/'`/ContentsXML/inventory.xml | grep "HOME NAME" 2> /dev/null export PATH="" export PATH=$HOME/bin:/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$SQLPATH:~/dba/bin:$PATH export myid="`whoami`@`hostname`" export PS1='${myid}':'$PWD':'$ORACLE_SID $ ' export EDITOR=vi export GLOGIN=`ls /tmp/login.sql 2> /dev/null | wc -l` if [ "$GLOGIN" -eq 1 ] ; then echo "" else echo "SET SQLPROMPT \"_USER'@'_CONNECT_IDENTIFIER'>' \" SET LINES 260 TIME ON"> /tmp/login.sql fi setsid () { unset ORATAB unset ORACLE_BASE unset ORACLE_HOME unset ORACLE_SID export ORATAB_OS=`ls /var/opt/oracle/oratab 2> /dev/null | wc -l` if [ "$ORATAB_OS" -eq 1 ] ; then export ORATAB=/var/opt/oracle/oratab else export ORATAB=/etc/oratab fi export ORAENVFILE=`ls /usr/local/bin/oraenv 2> /dev/null | wc -l` if [ "$ORAENVFILE" -eq 1 ] ; then echo "" else cat $ORATAB | grep -v "^#" | grep -v "*" echo "" echo "Please enter the ORACLE_HOME: " read RDBMS_HOME export ORACLE_HOME=$RDBMS_HOME fi if tty -s then if [ -f $ORATAB ] then line_count=`cat $ORATAB | grep -v "^#" | grep -v "*" | sed 's/:.*//' | wc -l` # check that the oratab file has some contents if [ $line_count -ge 1 ] then sid_selected=0 while [ $sid_selected -eq 0 ] do sid_available=0 for i in `cat $ORATAB | grep -v "^#" | grep -v "*" | sed 's/:.*//'` do sid_available=`expr $sid_available + 1` sid[$sid_available]=$i done # get the required SID case ${SETSID_AUTO:-""} in YES) # Auto set use 1st entry sid_selected=1 ;; *) i=1 while [ $i -le $sid_available ] do printf "%2d- %10s\n" $i ${sid[$i]} i=`expr $i + 1` done echo "" echo "Select the Oracle SID with given number [1]:" read entry if [ -n "$entry" ] then entry=`echo "$entry" | sed "s/[a-z,A-Z]//g"` if [ -n "$entry" ] then entry=`expr $entry` if [ $entry -ge 1 ] && [ $entry -le $sid_available ] then sid_selected=$entry fi fi else sid_selected=1 fi esac done # # SET ORACLE_SID # export PATH=$HOME/bin:/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin:$ORACLE_HOME/bin:$ORACLE_PATH:$PATH export ORACLE_SID=${sid[$sid_selected]} echo "Your profile configured for $ORACLE_SID with information below:" unset LD_LIBRARY_PATH ORAENV_ASK=NO . oraenv unset ORAENV_ASK # #GIVE MESSAGE # else echo "No entries in $ORATAB. no environment set" fi fi fi } showsid() { echo "" echo "ORACLE_SID=$ORACLE_SID" echo "ORACLE_BASE=$ORACLE_BASE" echo "ORACLE_HOME=$ORACLE_HOME" echo "" } # Find oracle_home of running instance export ORATAB_OS=`ls /var/opt/oracle/oratab 2> /dev/null | wc -l` if [ "$ORATAB_OS" -eq 1 ] ; then ps -ef | grep _pmon | grep -v grep else ps -ef | grep pmon | grep -v grep | grep -v bash | grep -v perl |\ while read PMON; do INST=`echo $PMON | awk {' print $2, $8 '}` INST_PID=`echo $PMON | awk {' print $2'}` INST_HOME=`ls -l /proc/$INST_PID/exe 2> /dev/null | awk -F'>' '{ print $2 }' | sed 's/bin\/oracle$//' | sort | uniq` echo "$INST $INST_HOME" done fi # Set Oracle environment setsid showsid
Usage
[root@desktopserver ~]# su - oracle [oracle@desktopserver ~]$ [oracle@desktopserver ~]$ vi .karlenv <-- copy the script from the "Install environment framework - karlenv" section of the wiki link above [oracle@desktopserver ~]$ [oracle@desktopserver ~]$ ls -la | grep karl -rw-r--r-- 1 oracle dba 6071 Dec 14 15:58 .karlenv [oracle@desktopserver ~]$ [oracle@desktopserver ~]$ . ~oracle/.karlenv <-- set the environment <HOME_LIST> <HOME NAME="Ora11g_gridinfrahome1" LOC="/u01/app/11.2.0/grid" TYPE="O" IDX="1" CRS="true"/> <HOME NAME="OraDb11g_home1" LOC="/u01/app/oracle/product/11.2.0/dbhome_1" TYPE="O" IDX="2"/> </HOME_LIST> <COMPOSITEHOME_LIST> </COMPOSITEHOME_LIST> 1- +ASM 2- dw Select the Oracle SID with given number [1]: 2 <-- choose an instance Your profile configured for dw with information below: The Oracle base has been set to /u01/app/oracle ORACLE_SID=dw ORACLE_BASE=/u01/app/oracle ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 oracle@desktopserver.local:/home/oracle:dw $ s <-- rlwrap'd sqlplus alias, also you can use the "s1" alias if you don't have rlwrap installed SQL*Plus: Release 11.2.0.3.0 Production on Thu Jan 5 15:41:15 2012 Copyright (c) 1982, 2011, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, Automatic Storage Management, OLAP and Real Application Testing options USERNAME INST_NAME HOST_NAME SID SERIAL# VERSION STARTED SPID OPID CPID SADDR PADDR -------------------- ------------ ------------------------- ----- -------- ---------- -------- --------------- ----- --------------- ---------------- ---------------- SYS dw desktopserver.local 5 8993 11.2.0.3.0 20111219 27483 24 27480 00000000DFB78138 00000000DF8F9FA0 SQL> @gas <-- calling one of Kerry's scripts from the /home/oracle/dba/scripts directory INST SID PROG USERNAME SQL_ID CHILD PLAN_HASH_VALUE EXECS AVG_ETIME SQL_TEXT OSUSER MACHINE ----- ----- ---------- ------------- ------------- ------ --------------- ------------ --------------- ----------------------------------------- ------------------------------ ------------------------- 1 5 sqlplus@de SYS bmyd05jjgkyz1 0 79376787 3 .003536 select a.inst_id inst, sid, substr(progra oracle desktopserver.local 1 922 OMS SYSMAN 2b064ybzkwf1y 0 0 50,515 .004947 BEGIN EMD_NOTIFICATION.QUEUE_READY(:1, :2 oracle desktopserver.local SQL> SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, Automatic Storage Management, OLAP and Real Application Testing options oracle@desktopserver.local:/home/oracle:dw
making a generic environment script.. called as "dbaenv"
1)- mkdir -p $HOME/dba/bin
- then add the $HOME/dba/bin on the path of .bash_profile
$ cat .bash_profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin:$HOME/dba/bin export PATH export ORACLE_HOME=/u01/app/oracle/product/11.2.0.3/dbhome_1 export PATH=$ORACLE_HOME/bin:.:$PATH2) copy the code of .karlenv above then create it as dbaenv file on the $HOME/dba/bin directory
3) call it as follows on any directory
. dbaenv4) for rac one node this pmoncheck is also helpful to have on the $HOME/dba/bin directory
$ cat pmoncheck dcli -l oracle -g /home/oracle/dbs_group ps -ef | grep pmon | grep -v grep | grep -v ASM
↧
Exadata infiniband listener
↧
howto restart LDOM
And restart the domains using the ldm command, stop and start from the primary. Since you have two LDOMS per compute node, you won’t need to worry, but in my case, you always must shut down the middle domain before any of the borders. This domain uses virtualized resources from the border ones.
↧
↧
howto restart zones
The zones are simpler: To list: zoneadm list -civ To Stop: zoneadm –z zone_name halt To start: zoneadm –z zone_name boot To restart: zoneadm –z zone_name reboot
↧
howto connect/login to zones
zlogin <zone name> To log into zones you use the zlogin command, no need for root password. To log into the zone console zlogin –C
↧
howto configure zone
To configure a zone you have to use zonecfg –z zone_name and install if first before booting it up.
↧
howto identify LDOM primary domain
how do you know if that zone is a primary domain?
The primary LDOM, it’s usually called Primary Domain, and can also be a Global Zone if you have zones in it. So basically the first LDOM created on a Sparc system is the primary domain, below labelled control domain. The first Solaris install created within any LDOM is the global zone. Subsequent zones are just called non-global zones. root@enksc1client01:~# virtinfo -a Domain role: LDoms control I/O service root <- SHOWS "CONTROL" WORD Domain name: primary Domain UUID: 60e3bff3-1ff5-4c5c-df53-8ed3ce79bd09 Control domain: enksc1client01 Chassis serial#: AK00263379 Also root@enksc1client01:~# ldm list NAME STATE FLAGS CONS VCPU MEMORY UTIL NORM UPTIME primary active -n-cv- UART 384 785152M 0.2% 0.2% 21d 22h 30m ssccn1-dom1 active -n---- 5001 128 256G 0.0% 0.0% 21d 22h 30m The ldm command doesn’t run on NON primary LDOMs as the Logical Domain Manager only runs on the primary LDOM. The above naming convention is in EVERY SuperCluster.
also see howto connect/login to LDOM
↧
↧
howto connect/login to LDOM
The primary LDOM, it’s usually called Primary Domain, and can also be a Global Zone if you have zones in it.
You can restart it or shutdown from the console, if the autoboot is set to on, it will restart, or will wait on the OpenBoot, the OK prompt.
also see howto identify LDOM primary domain
login to console using ILOM
You can access the console using the ILOM, you have 1 per compute node. So per rack you have two. root@sct01-appclient0101:~# ssh sct01-node1-ilom.sky.local Password: Oracle(R) Integrated Lights Out Manager Version 3.2.5.90.a r108602 Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. Warning: HTTPS certificate is set to factory default. Hostname: sct01-node1-ilom -> show / Targets: HOST System SP Properties: Commands: cd show -> start /HOST/console Are you sure you want to start /HOST/console (y/n)? y Serial console started. To stop, type #. sct01-appclient0101 console login: sct01-appclient0101 console login: sct01-appclient0101 console login: sct01-appclient0101 console login: At this point, root password is required.
login to console using telnet
From the primary domain, you can connect to the console of the other domains using telnet: root@sct01-appclient0101:~# ldm list NAME STATE FLAGS CONS VCPU MEMORY UTIL NORM UPTIME primary active -n-cv- UART 256 511G 1.0% 1.0% 49d 5h 27m ssccn1-dom1 active -n---- 5001 128 256G 0.1% 0.1% 35d 5h 48m ssccn1-dom2 active -n--v- 5002 128 256G 0.0% 0.0% 5d 21h 55m root@sct01-appclient0101:~# telnet localhost 5001 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Connecting to console "ssccn1-dom1" in group "ssccn1-dom1" .... Press ~? for control options .. sct01-appclient0102 console login:
↧
howto NFS on Solaris
how to add the following types of NFS mounts to each server (both app and database)
The mounts are specific to each server (exports on the ZFS has unique names).
Below are the Linux version of the mounts that we need help converting to Solaris:
# ZFS mounts (for SAP) - Environment specific (by application name/environment) 10.10.10.10:/export/sapmntCBP /sapmnt/CBP nfs rw,bg,hard,rsize=32768,wsize=32768,timeo=10,intr,proto=tcp,noac,vers=3,suid,_netdev 0 0 10.10.10.10:/export/ifaceCBP/nonprod /iface/CBP nfs rw,bg,hard,rsize=32768,wsize=32768,timeo=10,intr,proto=tcp,noac,vers=3,suid,_netdev 0 0 10.10.10.10:/export/cbpci/usrsap /usr/sap nfs rw,bg,hard,rsize=32768,wsize=32768,timeo=10,intr,proto=tcp,noac,vers=3,suid,_netdev 0 0 10.10.10.10:/export/cbpci/oracle /oracle nfs rw,bg,hard,rsize=32768,wsize=32768,timeo=10,intr,proto=tcp,noac,vers=3,suid,_netdev 0 0 10.10.10.10:/export/usrsaptrans_ce_np /usr/sap/trans nfs rw,bg,hard,rsize=32768,wsize=32768,timeo=10,intr,proto=tcp,noac,vers=3,suid,_netdev 0 0 # All SAP servers - For install only (then unmount) 10.243.204.253:/export/linux /sw nfs rsize=8192,wsize=8192,timeo=14,intr,_netdev 0 0 10.10.10.10:/export/SAP_media /SAP_media nfs rw,bg,hard,rsize=32768,wsize=32768,timeo=10,intr,proto=tcp,noac,vers=3,suid,_netdev 0 0 - 10.10.10.10:/export/Install /Install nfs rw,bg,hard,rsize=32768,wsize=32768,timeo=10,intr,proto=tcp,noac,vers=3,suid,_netdev 0 0
Solaris version
Generally the vfstab entry would be like this example: #device device mount FS fsck mount mount #to mount to fsck point type pass at boot options IP:/export/file - /stage nfs - yes rw,bg,hard,nointr,rsize=32768,wsize=32768,proto=tcp,noac,vers=3 The “suid" option is set by default but you can use it or “nosuid” if it needs to be off. There is no “_netdev" option, my understanding is in linux “_" options are ignored by the mount utility but are kept in the mount table as a flag apps can access with the mount command. I don’t know that I would use timeo=10 but if it is working for you now, try it. So your first entry below would look something like: 10.10.10.10:/export/sapmntCBP - /sapmnt/CBP nfs – yes rw,bg,hard,intr,rsize=32768,wsize=32768,timeo=10,proto=tcp,noac,vers=3,suid
↧
howto restart OSC (solaris cluster) , resource groups
cluster status – shows OSC Status clzc status – Cluster Zones Status clzc halt zone_name clzc boot zone_name clzc reboot zone_name To check for resource groups, you can use clrg status from the global zone or from inside the zone. root@ssc1p1app02:~# clzonecluster status === Zone Clusters === --- Zone Cluster Status --- Name Brand Node Name Zone Host Name Status Zone Status ---- ----- --------- -------------- ------ ----------- gts-zc solaris ssc1p1app02 ssc1zgts015v-i Online Running ssc1p2app01 ssc1zgts016v-i Online Running ssc1p1app01 ssc1zgts057v-i Online Running ssc1p2app02 ssc1zgts058v-i Online Running grc-zc solaris ssc1p1app02 ssc1zgrc031v-i Online Running ssc1p2app01 ssc1zgrc032v-i Online Running ssc1p1app01 ssc1zgrc053v-i Online Running ssc1p2app02 ssc1zgrc054v-i Online Running rhl-zc solaris ssc1p1app02 ssc1zrgt019v-i Online Running ssc1p1app01 ssc1zrhl011v-i Online Running ssc1p2app01 ssc1zrhl012v-i Online Running ssc1p2app02 ssc1zrhl056v-i Online Running ecc-zc solaris ssc1p1app02 ssc1zecc001v-i Online Running ssc1p2app01 ssc1zecc002v-i Online Running ssc1p1app01 ssc1zecc003v-i Online Running ssc1p2app02 ssc1zecc055v-i Online Running po-zc solaris ssc1p1app02 ssc1zpo035v-i Online Running ssc1p2app01 ssc1zpo036v-i Online Running ssc1p1app01 ssc1zpo051v-i Online Running ssc1p2app02 ssc1zpo052v-i Online Running bw-zc solaris ssc1p1app02 ssc1zbw027v-i Online Running ssc1p2app01 ssc1zbw028v-i Online Running ssc1p1app01 ssc1zbw020v-i Online Running ssc1p2app02 ssc1zbw021v-i Online Running
↧
howto status zone, zone status
The command to see zone status and example results follow.
If the zone STATUS is:
“running” it is up,
“installed” means it can be booted,
“configured" means it can be installed,
“unavailable” problem, usually means the zone image (LUN) is missing
Zones ending in –zc are part of a zonecluster.root@ex2s2app01:~# zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / solaris shared 1 dr-ex-zc running /zones/dr-ex-zc solaris shared
↧
↧
howto loop commands on zones
for i in `zoneadm list|grep -v global`; do echo "Check Zone $i #############################################"; zlogin $i "ps -ef | grep [p]mon"; done Check Zone er2s1vm01 ############################################# root 29013 27567 0 Jan 31 ? 1:12 /usr/bin/perl -w /opt/oracle.cellos/compmon/exadata_mon_hw_asr.pl -server oracle 40582 27567 0 Jan 31 ? 1:55 asm_pmon_+ASM1 oracle 7520 27567 0 Jan 31 ? 4:14 ora_pmon_dbm011 Check Zone er2s1vm02 ############################################# root 31551 30062 0 Jan 31 ? 1:13 /usr/bin/perl -w /opt/oracle.cellos/compmon/exadata_mon_hw_asr.pl -server oracle 45618 30062 0 Jan 31 ? 1:56 asm_pmon_+ASM1
root@ssc1p1app01:~# for i in `zoneadm list -cv | nawk '/running/{print $2}' | grep -v global`; do echo "Check Zone $i"; zlogin $i "ps -ef"; done Check Zone ssc1zboe047v-i UID PID PPID C STIME TTY TIME CMD root 62699 61237 0 20:54:59 ? 0:00 /usr/lib/inet/inetd start daemon 62316 61237 0 20:54:51 ? 0:00 /lib/crypto/kcfd root 62351 61237 0 20:54:52 ? 0:03 /lib/inet/in.mpathd root 62727 62213 0 20:54:59 console 0:00 /usr/sbin/ttymon -g -d /dev/console -l console -m ldterm,ttcompat -h -p ssc1zboe root 62659 61237 0 20:54:58 ? 0:00 /usr/sbin/cupsd -C /etc/cups/cupsd.conf root 62322 61237 0 20:54:51 ? 0:00 /usr/lib/pfexecd netcfg 62291 61237 0 20:54:49 ? 0:01 /lib/inet/netcfgd root 62213 61237 0 20:54:45 ? 0:08 /lib/svc/bin/svc.startd daemon 62679 61237 0 20:54:59 ? 0:00 /usr/sbin/rpcbind root 61237 61237 0 20:54:37 ? 0:00 zsched root 62028 61237 0 20:54:44 ? 0:00 /usr/sbin/init root 62691 61237 0 20:54:59 ? 0:00 /usr/lib/autofs/automountd root 62215 61237 0 20:54:45 ? 0:13 /lib/svc/bin/svc.configd root 62388 61237 0 20:54:52 ? 0:00 /usr/lib/rad/rad -sp netadm 62328 61237 0 20:54:52 ? 0:01 /lib/inet/ipmgmtd netadm 62495 61237 0 20:54:54 ? 0:01 /lib/inet/nwamd root 62358 61237 0 20:54:52 ? 0:00 /usr/lib/dbus-daemon --system root 62648 61237 0 20:54:58 ? 0:00 /usr/sbin/cron root 62697 61237 0 20:54:59 ? 0:00 /usr/lib/fm/fmd/fmd root 62730 61237 0 20:54:59 ? 0:00 /usr/sbin/syslogd daemon 62392 61237 0 20:54:52 ? 0:00 /usr/lib/utmpd root 62695 62691 0 20:54:59 ? 0:00 /usr/lib/autofs/automountd root 62589 61237 0 20:54:57 ? 0:00 /usr/lib/zones/zoneproxy-client -s localhost:1008 root 62687 61237 0 20:54:59 ? 0:00 /usr/lib/inet/in.ndpd root 62775 61237 0 20:55:00 ? 0:00 /usr/lib/fm/notify/smtp-notify root 62653 61237 0 20:54:58 ? 0:02 /usr/sbin/nscd root 62719 61237 0 20:54:59 ? 0:00 /usr/lib/ssh/sshd smmsp 62767 61237 0 20:54:59 ? 0:01 /usr/lib/sendmail -Ac -q15m root 62768 61237 0 20:54:59 ? 0:02 /usr/lib/sendmail -bl -q15m root 2441 61237 0 15:58:05 ? 0:00 /usr/bin/su root -c ps -ef root 2443 2441 0 15:58:05 ? 0:00 ps -ef
root@ssc1p1app01:~# for i in `zoneadm list -cv | nawk '/running/{print $2}' | grep -v global`; do echo "Check Zone $i"; zlogin $i "uname -a"; done Check Zone ssc1zboe047v-i SunOS ssc1zboe047v-i 5.11 11.2 sun4v sparc sun4v Check Zone bw-zc SunOS ssc1zbw020v-i 5.11 11.2 sun4v sparc sun4v Check Zone ecc-zc SunOS ssc1zecc003v-i 5.11 11.2 sun4v sparc sun4v Check Zone grc-zc SunOS ssc1zgrc053v-i 5.11 11.2 sun4v sparc sun4v
↧
howto check filesystem layout ZFS
root@ssc1p1db01:~# zpool list NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT ssc1p1vm01 164G 62.7G 101G 38% 1.00x ONLINE - ssc1p1vm02 164G 60.9G 103G 37% 1.00x ONLINE - ssc1p1vm03 164G 61.8G 102G 37% 1.00x ONLINE - rpool 556G 277G 279G 49% 1.00x ONLINE - root@ssc1p1db01:~# zpool status rpool pool: rpool state: ONLINE scan: resilvered 276G in 26m30s with 0 errors on Tue Jan 31 23:15:52 2017 config: NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 c0t5000CCA02D021FFCd0s0 ONLINE 0 0 0 c0t5000CCA02D0212ACd0s0 ONLINE 0 0 0 root@ssc1p1db01:~# zpool status ssc1p1vm01 pool: ssc1p1vm01 state: ONLINE scan: none requested config: NAME STATE READ WRITE CKSUM ssc1p1vm01 ONLINE 0 0 0 c0t600144F0D6E5A8510000563790A30003d0 ONLINE 0 0 0
↧
SolarisCommands
cpu count
check memory
http://oraclepoint.com/oralife/2011/02/09/different-ways-to-check-memory-usage-on-solaris-server/
http://www.solarisinternals.com/wiki/index.php/CPU/Processor <-- good stuff reference http://blogs.oracle.com/sistare/entry/cpu_to_core_mapping <-- good script mpstat |tail +2 |wc -l # psrinfo -v /usr/sbin/psrinfo /usr/platform/sun4u/sbin/prtdiag uname -p prtdiag prtconf swap -l top prtconf | grep "Memory" check Total physical memory: # prtdiag -v | grep Memory # prtconf | grep Memory --- check Free physical Memory: # top (if available) # sar -r 5 10 Free Memory=freemen*8 (pagesize=8k) # vmstat 5 10 Free Memory = free --- For swap: # swap -s # swap -l
check memory
http://oraclepoint.com/oralife/2011/02/09/different-ways-to-check-memory-usage-on-solaris-server/
Unix Commands 1. echo ::memstat | mdb –k 2. prstat –t 3. ps -efo pmem,uid,pid,ppid,pcpu,comm | sort -r 4. /usr/proc/bin/pmap -x <process-id> Scripts & Tools 1. NMUPM utility (Oracle Support) How to Check the Host Memory Usage on Solaris via NMUPM Utility [ID 741004.1]
nmupm_mem.sh : #!/bin/ksh PAGESZ="/usr/bin/pagesize" BC="/bin/bc" SCALE=2 WAIT=300 MAXCOUNT=3 NMUPM="$ORACLE_HOME/bin/nmupm osLoad" echo "Calulates average memory (interval $WAIT (s)) usage on Solaris using nmupm" PAGESIZE=`$PAGESZ` result1=`$NMUPM | awk -F"|" '{print $14 }'` REALMEM=`$NMUPM | awk -F"|" '{print $13 }'` #echo $result1 X=0 while [ $X -le $MAXCOUNT ] do sleep $WAIT result2=`$NMUPM | awk -F"|" '{print $14 }'` #echo $result2 DIFF="($result2 - $result1) * $PAGESIZE / 1024 / $WAIT" RESULT=$($BC << EOF scale=$SCALE (${DIFF}) EOF) MEMREL="$RESULT / $REALMEM * 100" MEMPCT=$($BC << EOF scale=$SCALE (${MEMREL}) EOF) #echo $result1 echo "Memory $REALMEM [kB] Freemem $RESULT [kB] %Free $MEMPCT" result1=$result2 X=$((X+1)) done
how to login on pdom <- ilom (use to connect,restart,get info)
how to login on ldom <- global/non-global
how to login on zones <- zlogin
what is a solaris cluster <- clustered filesystem (tied with zones availability so use clzc)
how rac is configured <- zone level or ldom level
↧
how to move zone to another ldom
Solaris 10 11/06: Migrating a Non-Global Zone to a Different Machine https://docs.oracle.com/cd/E18752_01/html/817-1592/gentextid-12492.html
Migrating a Non-Global Zone to a Different Machine https://docs.oracle.com/cd/E23824_01/html/821-1460/migrat.html
Moving Oracle Solaris 11 Zones between physical servers https://blogs.oracle.com/openomics/entry/solaris_zone_migration
Migrating a Non-Global Zone to a Different Machine https://docs.oracle.com/cd/E23824_01/html/821-1460/migrat.html
Moving Oracle Solaris 11 Zones between physical servers https://blogs.oracle.com/openomics/entry/solaris_zone_migration
For app zones
it's easyFor database zones
The article https://blogs.oracle.com/openomics/entry/solaris_zone_migration makes it look easy and it is for the App zones but it is not easy to migrate database zones on the SuperCluster.
Database zones that are configured in the DB Domains are configured by the Oracle SuperCluster setup utilities and disk groups from the Cell Servers are assigned to zones for setup during the exadata installation portion of the install. All this happens when the SuperCluster config is applied. The only way I know to move zones and remain in a supported configuration is to reset the system and build new Database zones.
You could maybe move databases from one database zone to another.
↧
↧
howto boot a zone
https://docs.oracle.com/cd/E19044-01/sol.containers/817-1592/z.inst.task-13/index.html
zoneadm -z <zone name> boot
↧
HOWTO loop through ASM/RDBMS instances on each zone from the Global Zone
/* Table of Contents */
- Here’s the step by step:
- Tableau calculated field DGTYPE
- Visualization
Alright, here’s something that’s working. This script/command/process can be fired from just the Global Zone and will output the data on each running instances on every non-Global Zone.
We don’t have to login on each zone then su- to oracle and set the environment for every database. This is useful for resource accounting and general monitoring.
You can also modify the scripts to pull anything you want from the instances and format it in such a way that’s easily grep’able. Let’s say you can put “Zone :” and “Instance :” in front of every output so you can easily grep it on the final text file. The advantage of this zlogin (this is how we login on every zone) method over using dcli is it’s native and we don’t have to mess with SSH keys on every zone.
Moving forward I’ll put all the scripts under /root/dba/scripts/ for Global Zones and under /export/home/oracle/dba/scripts/ for non-Global zones
Sample output below:
################################################ Zone : ssc1s1vm04 Oracle Corporation SunOS 5.11 11.3 August 2016 Instance : +ASM1 Instance : dbm041 ################################################ Zone : ssc1s1vm05 Oracle Corporation SunOS 5.11 11.3 August 2016 Instance : +ASM1 Instance : dbm051
Here’s the step by step:
# Login on Global Zone and create oracle/dba directory under /export/home/oracle on every zone
for i in `zoneadm list|grep -v global`; do echo "################################################ $i"; mkdir -p /zoneHome/$i/root/export/home/oracle/dba/scripts; done for i in `zoneadm list|grep -v global`; do echo "################################################ $i"; ls -ld /zoneHome/$i/root/export/home/oracle/dba; done for i in `zoneadm list|grep -v global`; do echo "################################################ $i"; chown -R 1001:1001 /zoneHome/$i/root/export/home/oracle/dba; done
# Copy script files from global to non-global
for i in `zoneadm list|grep -v global`; do echo "################################################ $i"; cp /root/dba/scripts/* /zoneHome/$i/root/export/home/oracle/dba/scripts/; done for i in `zoneadm list|grep -v global`; do echo "################################################ $i"; chown -R 1001:1001 /zoneHome/$i/root/export/home/oracle/dba; done for i in `zoneadm list|grep -v global`; do echo "################################################ $i"; chmod -R 755 /zoneHome/$i/root/export/home/oracle/dba; done for i in `zoneadm list|grep -v global`; do echo "################################################ $i"; ls -l /zoneHome/$i/root/export/home/oracle/dba/scripts; done
# Execute shell for every zone and output to file.txt
for i in `zoneadm list|grep -v global`; do echo "################################################ $i"; zlogin -l oracle $i /export/home/oracle/dba/scripts/get_inst; done > file.txt ; cat file.txt for i in `zoneadm list|grep -v global`; do echo "################################################ $i"; zlogin -l oracle $i /export/home/oracle/dba/scripts/get_asm_size; done > file.txt ; cat file.txt
# Example scripts (create under /root/dba/scripts/ of Global Zone)
get_inst
#!/bin/bash # get_inst script db=`ps -ef | grep pmon | grep -v grep | grep -v perl | awk {' print $9 '} | cut -f3 -d_` for i in $db ; do export ORATAB=/var/opt/oracle/oratab export ORACLE_SID=$i export ORAINST=`ps -ef | grep pmon | grep -v grep | grep -v perl | awk {' print $9 '} | cut -f3 -d_ | grep -i $ORACLE_SID | sed 's/.$//' ` export ORACLE_HOME=`egrep -i ":Y|:N" $ORATAB | grep $ORAINST | cut -d":" -f2 | grep -v "\#" | grep -v "\*"` $ORACLE_HOME/bin/sqlplus -s /nolog <<EOF connect / as sysdba set echo off set heading off select instance_name from v\$instance; EOF done
get_asm_size
#!/bin/bash # get_asm_size script db=`ps -ef | grep pmon | grep -v grep | grep -i asm | grep -v perl | awk {' print $9 '} | cut -f3 -d_` for i in $db ; do export ORATAB=/var/opt/oracle/oratab export ORACLE_SID=$i export ORAINST=`ps -ef | grep pmon | grep -v grep | grep -v perl | awk {' print $9 '} | cut -f3 -d_ | grep -i $ORACLE_SID | sed 's/.$//' ` export ORACLE_HOME=`egrep -i ":Y|:N" $ORATAB | grep $ORAINST | cut -d":" -f2 | grep -v "\#" | grep -v "\*"` $ORACLE_HOME/bin/sqlplus -s /nolog <<EOF connect / as sysdba set colsep ',' set lines 600 col state format a9 col dgname format a15 col sector format 999990 col block format 999990 col label format a25 col path format a40 col redundancy format a25 col pct_used format 990 col pct_free format 990 col voting format a6 BREAK ON REPORT COMPUTE SUM OF raw_gb ON REPORT COMPUTE SUM OF usable_total_gb ON REPORT COMPUTE SUM OF usable_used_gb ON REPORT COMPUTE SUM OF usable_free_gb ON REPORT COMPUTE SUM OF required_mirror_free_gb ON REPORT COMPUTE SUM OF usable_file_gb ON REPORT COL name NEW_V _hostname NOPRINT select lower(host_name) name from v\$instance; select trim('&_hostname') hostname, name as dgname, state, type, sector_size sector, block_size block, allocation_unit_size au, round(total_mb/1024,2) raw_gb, round((DECODE(TYPE, 'HIGH', 0.3333 * total_mb, 'NORMAL', .5 * total_mb, total_mb))/1024,2) usable_total_gb, round((DECODE(TYPE, 'HIGH', 0.3333 * (total_mb - free_mb), 'NORMAL', .5 * (total_mb - free_mb), (total_mb - free_mb)))/1024,2) usable_used_gb, round((DECODE(TYPE, 'HIGH', 0.3333 * free_mb, 'NORMAL', .5 * free_mb, free_mb))/1024,2) usable_free_gb, round((DECODE(TYPE, 'HIGH', 0.3333 * required_mirror_free_mb, 'NORMAL', .5 * required_mirror_free_mb, required_mirror_free_mb))/1024,2) required_mirror_free_gb, round(usable_file_mb/1024,2) usable_file_gb, round((total_mb - free_mb)/total_mb,2)*100 as "PCT_USED", round(free_mb/total_mb,2)*100 as "PCT_FREE", offline_disks, voting_files voting from v\$asm_diskgroup where total_mb != 0 order by 1; EOF done
# Example output (get_asm_size)
root@ssc1s1db01:~/dba/scripts# cat file.txt ################################################ ssc1s1vm01 Oracle Corporation SunOS 5.11 11.3 August 2016 old 2: trim('&_hostname') hostname, new 2: trim('ssc1s1vm01') hostname, HOSTNAME ,DGNAME ,STATE ,TYPE , SECTOR, BLOCK, AU, RAW_GB,USABLE_TOTAL_GB,USABLE_USED_GB,USABLE_FREE_GB,REQUIRED_MIRROR_FREE_GB,USABLE_FILE_GB,PCT_USED,PCT_FREE,OFFLINE_DISKS,VOTING ---------,---------------,---------,------,-------,-------,----------,----------,---------------,--------------,--------------,-----------------------,--------------,--------,--------,-------------,------ ssc1s1vm01,DBFSBWDR ,MOUNTED ,HIGH , 512, 4096, 4194304, 1528, 509.28, 5.67, 503.61, 5.33, 498.33, 1, 99, 0,Y ssc1s1vm01,RECOBWDR ,MOUNTED ,NORMAL, 512, 4096, 4194304, 8213, 4106.5, 145.06, 3961.44, 21.5, 3939.94, 4, 96, 0,N ssc1s1vm01,DATABWDR ,MOUNTED ,NORMAL, 512, 4096, 4194304, 32661, 16330.5, 164.71, 16165.79, 85.5, 16080.29, 1, 99, 0,N , , , , , , ,----------,---------------,--------------,--------------,-----------------------,--------------, , , , sum , , , , , , , 42402, 20946.28, 315.44, 20630.84, 112.33, 20518.56, , , , ################################################ ssc1s1vm02 Oracle Corporation SunOS 5.11 11.3 August 2016 old 2: trim('&_hostname') hostname, new 2: trim('ssc1s1vm02') hostname, HOSTNAME ,DGNAME ,STATE ,TYPE , SECTOR, BLOCK, AU, RAW_GB,USABLE_TOTAL_GB,USABLE_USED_GB,USABLE_FREE_GB,REQUIRED_MIRROR_FREE_GB,USABLE_FILE_GB,PCT_USED,PCT_FREE,OFFLINE_DISKS,VOTING ---------,---------------,---------,------,-------,-------,----------,----------,---------------,--------------,--------------,-----------------------,--------------,--------,--------,-------------,------ ssc1s1vm02,RECODEV ,MOUNTED ,NORMAL, 512, 4096, 4194304, 6303, 3151.5, 200.83, 2950.67, 16.5, 2934.17, 6, 94, 0,N ssc1s1vm02,DBFSDEV ,MOUNTED ,HIGH , 512, 4096, 4194304, 1528, 509.28, 6.69, 502.59, 5.33, 497.3, 1, 99, 0,Y ssc1s1vm02,DATADEV ,MOUNTED ,NORMAL, 512, 4096, 4194304, 14325, 7162.5, 367.28, 6795.22, 37.5, 6757.72, 5, 95, 0,N , , , , , , ,----------,---------------,--------------,--------------,-----------------------,--------------, , , , sum , , , , , , , 22156, 10823.28, 574.8, 10248.48, 59.33, 10189.19, , , , ################################################ ssc1s1vm03 Oracle Corporation SunOS 5.11 11.3 August 2016 old 2: trim('&_hostname') hostname, new 2: trim('ssc1s1vm03') hostname, HOSTNAME ,DGNAME ,STATE ,TYPE , SECTOR, BLOCK, AU, RAW_GB,USABLE_TOTAL_GB,USABLE_USED_GB,USABLE_FREE_GB,REQUIRED_MIRROR_FREE_GB,USABLE_FILE_GB,PCT_USED,PCT_FREE,OFFLINE_DISKS,VOTING ---------,---------------,---------,------,-------,-------,----------,----------,---------------,--------------,--------------,-----------------------,--------------,--------,--------,-------------,------ ssc1s1vm03,DATASBX ,MOUNTED ,NORMAL, 512, 4096, 4194304, 20437, 10218.5, 166.21, 10052.29, 53.5, 9998.79, 2, 98, 0,N ssc1s1vm03,DBFSSBX ,MOUNTED ,HIGH , 512, 4096, 4194304, 1528, 509.28, 5.67, 503.61, 5.33, 498.33, 1, 99, 0,Y ssc1s1vm03,RECOSBX ,MOUNTED ,NORMAL, 512, 4096, 4194304, 8213, 4106.5, 145.11, 3961.39, 21.5, 3939.89, 4, 96, 0,N , , , , , , ,----------,---------------,--------------,--------------,-----------------------,--------------, , , , sum , , , , , , , 30178, 14834.28, 316.99, 14517.29, 80.33, 14437.01, , , , ################################################ ssc1s1vm04 Oracle Corporation SunOS 5.11 11.3 August 2016 old 2: trim('&_hostname') hostname, new 2: trim('ssc1s1vm04') hostname, HOSTNAME ,DGNAME ,STATE ,TYPE , SECTOR, BLOCK, AU, RAW_GB,USABLE_TOTAL_GB,USABLE_USED_GB,USABLE_FREE_GB,REQUIRED_MIRROR_FREE_GB,USABLE_FILE_GB,PCT_USED,PCT_FREE,OFFLINE_DISKS,VOTING ---------,---------------,---------,------,-------,-------,----------,----------,---------------,--------------,--------------,-----------------------,--------------,--------,--------,-------------,------ ssc1s1vm04,DATAQA ,MOUNTED ,NORMAL, 512, 4096, 4194304, 108106, 54053, 168.17, 53884.83, 283, 53601.83, 0, 100, 0,N ssc1s1vm04,DBFSQA ,MOUNTED ,HIGH , 512, 4096, 4194304, 1528, 509.28, 5.56, 503.72, 5.33, 498.44, 1, 99, 0,Y ssc1s1vm04,RECOQA ,MOUNTED ,NORMAL, 512, 4096, 4194304, 34762, 17381, 153.69, 17227.31, 91, 17136.31, 1, 99, 0,N , , , , , , ,----------,---------------,--------------,--------------,-----------------------,--------------, , , , sum , , , , , , , 144396, 71943.28, 327.42, 71615.86, 379.33, 71236.58, , , , ################################################ ssc1s1vm05 Oracle Corporation SunOS 5.11 11.3 August 2016 old 2: trim('&_hostname') hostname, new 2: trim('ssc1s1vm05') hostname, HOSTNAME ,DGNAME ,STATE ,TYPE , SECTOR, BLOCK, AU, RAW_GB,USABLE_TOTAL_GB,USABLE_USED_GB,USABLE_FREE_GB,REQUIRED_MIRROR_FREE_GB,USABLE_FILE_GB,PCT_USED,PCT_FREE,OFFLINE_DISKS,VOTING ---------,---------------,---------,------,-------,-------,----------,----------,---------------,--------------,--------------,-----------------------,--------------,--------,--------,-------------,------ ssc1s1vm05,DATAECCDR ,MOUNTED ,NORMAL, 512, 4096, 4194304, 61311, 30655.5, 99.79, 30555.71, 160.5, 30395.21, 0, 100, 0,N ssc1s1vm05,DBFSECCDR ,MOUNTED ,HIGH , 512, 4096, 4194304, 1528, 509.28, 5.57, 503.71, 5.33, 498.43, 1, 99, 0,Y ssc1s1vm05,RECOECCDR ,MOUNTED ,NORMAL, 512, 4096, 4194304, 20437, 10218.5, 83.4, 10135.1, 53.5, 10081.6, 1, 99, 0,N , , , , , , ,----------,---------------,--------------,--------------,-----------------------,--------------, , , , sum , , , , , , , 83276, 41383.28, 188.76, 41194.52, 219.33, 40975.24, , , , ################################################ ssc1s1vm06 Oracle Corporation SunOS 5.11 11.3 August 2016 old 2: trim('&_hostname') hostname, new 2: trim('ssc1s1vm06') hostname, HOSTNAME ,DGNAME ,STATE ,TYPE , SECTOR, BLOCK, AU, RAW_GB,USABLE_TOTAL_GB,USABLE_USED_GB,USABLE_FREE_GB,REQUIRED_MIRROR_FREE_GB,USABLE_FILE_GB,PCT_USED,PCT_FREE,OFFLINE_DISKS,VOTING ---------,---------------,---------,------,-------,-------,----------,----------,---------------,--------------,--------------,-----------------------,--------------,--------,--------,-------------,------ ssc1s1vm06,DATAPODR ,MOUNTED ,NORMAL, 512, 4096, 4194304, 10314, 5157, 100.34, 5056.66, 27, 5029.66, 2, 98, 0,N ssc1s1vm06,RECOPODR ,MOUNTED ,NORMAL, 512, 4096, 4194304, 4202, 2101, 100.19, 2000.81, 11, 1989.81, 5, 95, 0,N ssc1s1vm06,DBFSPODR ,MOUNTED ,HIGH , 512, 4096, 4194304, 1528, 509.28, 5.56, 503.72, 5.33, 498.44, 1, 99, 0,Y , , , , , , ,----------,---------------,--------------,--------------,-----------------------,--------------, , , , sum , , , , , , , 16044, 7767.28, 206.09, 7561.19, 43.33, 7517.91, , , , ################################################ ssc1s1vm07 Oracle Corporation SunOS 5.11 11.3 August 2016 old 2: trim('&_hostname') hostname, new 2: trim('ssc1s1vm07') hostname, HOSTNAME ,DGNAME ,STATE ,TYPE , SECTOR, BLOCK, AU, RAW_GB,USABLE_TOTAL_GB,USABLE_USED_GB,USABLE_FREE_GB,REQUIRED_MIRROR_FREE_GB,USABLE_FILE_GB,PCT_USED,PCT_FREE,OFFLINE_DISKS,VOTING ---------,---------------,---------,------,-------,-------,----------,----------,---------------,--------------,--------------,-----------------------,--------------,--------,--------,-------------,------ ssc1s1vm07,DATAECCSTG ,MOUNTED ,NORMAL, 512, 4096, 4194304, 61311, 30655.5, 160.73, 30494.77, 160.5, 30334.27, 1, 99, 0,N ssc1s1vm07,RECOECCSTG ,MOUNTED ,NORMAL, 512, 4096, 4194304, 20437, 10218.5, 60.07, 10158.43, 53.5, 10104.93, 1, 99, 0,N ssc1s1vm07,DBFSECCSTG ,MOUNTED ,HIGH , 512, 4096, 4194304, 1528, 509.28, 5.56, 503.72, 5.33, 498.44, 1, 99, 0,Y , , , , , , ,----------,---------------,--------------,--------------,-----------------------,--------------, , , , sum , , , , , , , 83276, 41383.28, 226.36, 41156.92, 219.33, 40937.64, , , , ################################################ ssc1s1vm08 Oracle Corporation SunOS 5.11 11.3 August 2016 old 2: trim('&_hostname') hostname, new 2: trim('ssc1s1vm08') hostname, HOSTNAME ,DGNAME ,STATE ,TYPE , SECTOR, BLOCK, AU, RAW_GB,USABLE_TOTAL_GB,USABLE_USED_GB,USABLE_FREE_GB,REQUIRED_MIRROR_FREE_GB,USABLE_FILE_GB,PCT_USED,PCT_FREE,OFFLINE_DISKS,VOTING ---------,---------------,---------,------,-------,-------,----------,----------,---------------,--------------,--------------,-----------------------,--------------,--------,--------,-------------,------ ssc1s1vm08,DATAPOSTG ,MOUNTED ,NORMAL, 512, 4096, 4194304, 10314, 5157, 100.51, 5056.49, 27, 5029.49, 2, 98, 0,N ssc1s1vm08,DBFSPOSTG ,MOUNTED ,HIGH , 512, 4096, 4194304, 1528, 509.28, 5.57, 503.71, 5.33, 498.43, 1, 99, 0,Y ssc1s1vm08,RECOPOSTG ,MOUNTED ,NORMAL, 512, 4096, 4194304, 4202, 2101, 99.38, 2001.62, 11, 1990.62, 5, 95, 0,N , , , , , , ,----------,---------------,--------------,--------------,-----------------------,--------------, , , , sum , , , , , , , 16044, 7767.28, 205.46, 7561.82, 43.33, 7518.54, , , , root@ssc1s1db01:~/dba/scripts#
Tableau calculated field DGTYPE
IF contains(lower(trim([Dgname])),'dbfs')=true THEN 'DBFS' ELSEIF contains(lower(trim([Dgname])),'reco')=true THEN 'RECO' ELSEIF contains(lower(trim([Dgname])),'data')=true THEN 'DATA' ELSE 'OTHER' END
Visualization
Here’s the high level storage usage/allocation by DATA,RECO,and DBFS disk groups

Here’s the breakdown of that by Zone

Another view of the breakdown by zone

↧
Exadata Storage Size - ASM-size
Understanding ASM Capacity and Reservation of Free Space in Exadata (Doc ID 1551288.1) <- contains a cool PL/SQL script
http://prutser.wordpress.com/2013/01/03/demystifying-asm-required_mirror_free_mb-and-usable_file_mb/
http://prutser.wordpress.com/2013/01/03/demystifying-asm-required_mirror_free_mb-and-usable_file_mb/
This statement is correct:
"If I have 1GB worth of data in my DB I should be using 2GB for Normal Redundancy and 3 GB for High Redundancy."
but then you also have to account for the "required mirror free" which is required in the case of a lost of failure group.
So this is the output of the script I sent you, it already accounts for the redundancy level you are on. Just look at the columns with "REAL" on it. On your statement above, the 4869.56 is used and that already accounts for the normal redundancy.. you said you have 4605 GB (incl TEMP) so that's just about right. Now you have to add the 2538 which will total to 7407.56 and if you subtract the total space requirement to the capacity (7614 - 7407.56) you'll get 206.44REQUIRED USABLE RAW REAL REAL REAL MIRROR_FREE FILE STATE TYPE TOTAL_GB TOTAL_GB USED_GB FREE_GB GB GB PCT_USED PCT_FREE NAME -------- ------ ---------- ---------- ---------- ---------- ----------- ---------- -------- -------- ---------- CONNECTE NORMAL 15228 7614 4869.56 2744.44 2538 206.44 64 36 DATA_AEX1 CONNECTE NORMAL 3804.75 1902.38 1192.5 709.87 634.13 75.75 63 37 RECO_AEX1 MOUNTED NORMAL 873.75 436.88 1.23 435.64 145.63 290.02 0 100 DBFS_DG ---------- ---------- ---------- ---------- ----------- ---------- sum 19906.5 9953.26 6063.29 3889.95 3317.76 572.21I hope that clears up the confusion on the space usage.
I'm also referencing a very good blog post that discuss about the required mirror free and usable file mb
http://prutser.wordpress.com/2013/01/03/demystifying-asm-required_mirror_free_mb-and-usable_file_mb/
-- WITH REDUNDANCY set colsep ',' set lines 600 col state format a9 col dgname format a15 col sector format 999990 col block format 999990 col label format a25 col path format a40 col redundancy format a25 col pct_used format 990 col pct_free format 990 col voting format a6 BREAK ON REPORT COMPUTE SUM OF raw_gb ON REPORT COMPUTE SUM OF usable_total_gb ON REPORT COMPUTE SUM OF usable_used_gb ON REPORT COMPUTE SUM OF usable_free_gb ON REPORT COMPUTE SUM OF required_mirror_free_gb ON REPORT COMPUTE SUM OF usable_file_gb ON REPORT COL name NEW_V _hostname NOPRINT select lower(host_name) name from v$instance; select trim('&_hostname') hostname, name as dgname, state, type, sector_size sector, block_size block, allocation_unit_size au, round(total_mb/1024,2) raw_gb, round((DECODE(TYPE, 'HIGH', 0.3333 * total_mb, 'NORMAL', .5 * total_mb, total_mb))/1024,2) usable_total_gb, round((DECODE(TYPE, 'HIGH', 0.3333 * (total_mb - free_mb), 'NORMAL', .5 * (total_mb - free_mb), (total_mb - free_mb)))/1024,2) usable_used_gb, round((DECODE(TYPE, 'HIGH', 0.3333 * free_mb, 'NORMAL', .5 * free_mb, free_mb))/1024,2) usable_free_gb, round((DECODE(TYPE, 'HIGH', 0.3333 * required_mirror_free_mb, 'NORMAL', .5 * required_mirror_free_mb, required_mirror_free_mb))/1024,2) required_mirror_free_gb, round(usable_file_mb/1024,2) usable_file_gb, round((total_mb - free_mb)/total_mb,2)*100 as "PCT_USED", round(free_mb/total_mb,2)*100 as "PCT_FREE", offline_disks, voting_files voting from v$asm_diskgroup where total_mb != 0 order by 1;
↧