Setup udev rules with Red Hat 5/6 on VMware

To work on VMware Fusion, set the following on the .vmx file; without this entry, the scsi_id command does not return any values by default.
disk.EnableUUID = “TRUE” 
 
Retrieve and generate a unique SCSI identifier with the scsi_id command:

[root@rhel59dra ~]# /sbin/scsi_id -g -u -s /block/sdc

36000c29b80c12910ca4e6a95a1949d8b
[root@rhel59dra ~]# /sbin/scsi_id -g -u -s /block/sdd
36000c29344da4eab5b78409de3706424
[root@rhel59dra ~]# /sbin/scsi_id -g -u -s /block/sde
36000c291cd542d388fdee223fa90ca69
[root@rhel59dra ~]# /sbin/scsi_id -g -u -s /block/sdf
36000c296666187fd5223c0a34ca52f71
 
Add entries to a custom udev rules file
[root@rhel59dra ~]# cat /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL==”sd?1″, BUS==”scsi”, PROGRAM==”/sbin/scsi_id -g -u -s /block/$parent”, RESULT==”36000c29b80c12910ca4e6a95a1949d8b”, NAME=”ASMOCR01″, OWNER=”oracle”, GROUP=”dba”, MODE=”0660″
KERNEL==”sd?1″, BUS==”scsi”, PROGRAM==”/sbin/scsi_id -g -u -s /block/$parent”, RESULT==”36000c29344da4eab5b78409de3706424″, NAME=”ASMOCR02″, OWNER=”oracle”, GROUP=”dba”, MODE=”0660″
KERNEL==”sd?1″, BUS==”scsi”, PROGRAM==”/sbin/scsi_id -g -u -s /block/$parent”, RESULT==”36000c291cd542d388fdee223fa90ca69″, NAME=”ASMOCR03″, OWNER=”oracle”, GROUP=”dba”, MODE=”0660″
KERNEL==”sdf[0-9]“, BUS==”scsi”, PROGRAM==”/usr/bin/udevinfo -q name -p %p”, RESULT==”%k”, PROGRAM==”scsi_id -g -u -d /dev/$parent”, RESULT==”36000c296666187fd5223c0a34ca52f71″, NAME=”ASMDATA0%n”, OWNER=”oracle”, GROUP=”dba”, MODE=”0660″
 

Note:
For disks with multiple partitions, the syntax in the udev rules are different.
KERNEL==”sd[c-z]1″, BUS==”scsi”, PROGRAM=”/sbin/scsi_id -g -u -s /block/%P”, RESULT==”3*”, NAME=”ASM%c”, OWNER=”oracle”, GROUP=”dba”, MODE=”0660″
 
 
To make sure that udev rules work:
[root@rhel59dra ~]# udevtest /block/sdc/sdc1
[root@rhel59dra ~]# udevtest /block/sdd/sdd1
[root@rhel59dra ~]# udevtest /block/sde/sde1
[root@rhel59dra ~]# udevtest /block/sdf/sdf1    
[root@rhel59dra ~]# udevtest /block/sdf/sdf2    
[root@rhel59dra ~]# udevtest /block/sdf/sdf3    
[root@rhel59dra ~]# udevtest /block/sdf/sdf4    
 
Restart udev rules:
RHEL 5: /sbin/udevcontrol reload_rules
RHEL 6: /sbin/udevadm control –reload-rules 
/sbin/start_udev  
 
Verify that proper devices are created

[root@rhel59dra ~]# ls -l /dev/ASM*

brw-rw—- 1 oracle dba 8, 81 May 15 23:45 /dev/ASMDATA01
brw-rw—- 1 oracle dba 8, 82 May 15 23:45 /dev/ASMDATA02
brw-rw—- 1 oracle dba 8, 83 May 15 23:45 /dev/ASMDATA03
brw-rw—- 1 oracle dba 8, 84 May 15 23:45 /dev/ASMDATA04
brw-rw—- 1 oracle dba 8, 33 May 15 23:45 /dev/ASMOCR01
brw-rw—- 1 oracle dba 8, 49 May 15 23:45 /dev/ASMOCR02
brw-rw—- 1 oracle dba 8, 65 May 15 23:45 /dev/ASMOCR03 

ZFS Storage Appliance with Exadata

Download the latest ZFS Storage Appliance with the Exadata

This presentation was delivered at Collaborate 2013 and Dallas Oracle User Group 2013 by Charles Kim, Oracle ACE Director

RAC Add Node

Basic instructions for adding a new node to the RAC cluster: 

1. First on the target node, create /u01/app/oraInventory (empty) and owned by oracle:dba

2. On the target node, make sure /u01/app/11.2.0 directory is created and empty. This directory needs to be owned as: oracle:dba 
3. Run addnode.ksh (shown below) on an existing RAC node with parameters replaced as oracle
4. As instructed, execute root.sh on target node as root

Here’s all the caveats: 
1. It is still buggy on the cluvfy side for 11.2.0.3. It had bugs in 11.2.0.2 also. I recall we had to set IGNORE_PREADDNODE_CHECKS to Y back then, and it looks like we still have to. 
2. /u01/app/oraInventory has to be pre-created and owned by oracle:dba and has to be completely empty 
3. /u01/app/11.2.0 needs to be owned by oracle:dba. The /u01/app/11.2.0/grid directory cannot exist … even as an empty directory. The addnode.sh script attempts to do a “mkdir grid” as oracle, and if it fails, it dies. 
4. It died on me twice at “crsctl start listener -n “target_node” … have to create default listener first
5. I did not leverage the -noCopy method.  This working example will copy the Grid Home from source RAC node to the new RAC node via scp/ssh. I don’t think it is a big deal … added about 5 minutes to the overall time (see below). 

Copying to remote nodes (Saturday, May 4, 2013 8:52:50 PM CDT)
 ………………………………………………………………………………….. 96% Done. 
Home copied to new nodes 
Saving inventory on nodes (Saturday, May 4, 2013 8:56:03 PM CDT) 
 
 
Here’s my add node shell script: 
+ASM1 > cat addnode.ksh
export ORACLE_HOME=/u01/app/11.2.0/grid
export PATH=$ORACLE_HOME/bin:$PATH
cd $ORACLE_HOME/oui/bin
 
export IGNORE_PREADDNODE_CHECKS=Y
 
#./addNode.sh -silent “CLUSTER_NEW_NODES={rhel59drb}” “CLUSTER_NEW_VIRTUAL_HOSTNAMES={rhel59b-vip}” -noCopy
./addNode.sh -silent “CLUSTER_NEW_NODES={rhel59drb}” “CLUSTER_NEW_VIRTUAL_HOSTNAMES={rhel59drb-vip}” “CLUSTER_NEW_PRIVATE_NODE_NAMES={rhel59drb-priv}”
 
——————
 

rhel59dra:/u01/app/oracle/deploy_rac

+ASM1 > ./addnode.ksh
Starting Oracle Universal Installer…
 
Checking swap space: must be greater than 500 MB.   Actual 3186 MB    Passed
Oracle Universal Installer, Version 11.2.0.3.0 Production
Copyright (C) 1999, 2011, Oracle. All rights reserved.
 
 
Performing tests to see whether nodes rhel59drb are available
……………………………………………………… 100% Done.
 
.
—————————————————————————–
Cluster Node Addition Summary
Global Settings
   Source: /u01/app/11.2.0/grid
   New Nodes
Space Requirements
   New Nodes
      rhel59drb
         /: Required 6.47GB : Available 7.27GB
Installed Products
   Product Names
      Oracle Grid Infrastructure 11.2.0.3.0
      Sun JDK 1.5.0.30.03
      Installer SDK Component 11.2.0.3.0
      Oracle One-Off Patch Installer 11.2.0.1.7
      Oracle Universal Installer 11.2.0.3.0
      Oracle USM Deconfiguration 11.2.0.3.0
      Oracle Configuration Manager Deconfiguration 10.3.1.0.0
      Enterprise Manager Common Core Files 10.2.0.4.4
      Oracle DBCA Deconfiguration 11.2.0.3.0
      Oracle RAC Deconfiguration 11.2.0.3.0
      Oracle Quality of Service Management (Server) 11.2.0.3.0
      Installation Plugin Files 11.2.0.3.0
      Universal Storage Manager Files 11.2.0.3.0
      Oracle Text Required Support Files 11.2.0.3.0
      Automatic Storage Management Assistant 11.2.0.3.0
      Oracle Database 11g Multimedia Files 11.2.0.3.0
      Oracle Multimedia Java Advanced Imaging 11.2.0.3.0
      Oracle Globalization Support 11.2.0.3.0
      Oracle Multimedia Locator RDBMS Files 11.2.0.3.0
      Oracle Core Required Support Files 11.2.0.3.0
      Bali Share 1.1.18.0.0
      Oracle Database Deconfiguration 11.2.0.3.0
      Oracle Quality of Service Management (Client) 11.2.0.3.0
      Expat libraries 2.0.1.0.1
      Oracle Containers for Java 11.2.0.3.0
      Perl Modules 5.10.0.0.1
      Secure Socket Layer 11.2.0.3.0
      Oracle JDBC/OCI Instant Client 11.2.0.3.0
      Oracle Multimedia Client Option 11.2.0.3.0
      LDAP Required Support Files 11.2.0.3.0
      Character Set Migration Utility 11.2.0.3.0
      Perl Interpreter 5.10.0.0.2
      PL/SQL Embedded Gateway 11.2.0.3.0
      OLAP SQL Scripts 11.2.0.3.0
      Database SQL Scripts 11.2.0.3.0
      Oracle Extended Windowing Toolkit 3.4.47.0.0
      SSL Required Support Files for InstantClient 11.2.0.3.0
      SQL*Plus Files for Instant Client 11.2.0.3.0
      Oracle Net Required Support Files 11.2.0.3.0
      Oracle Database User Interface 2.2.13.0.0
      RDBMS Required Support Files for Instant Client 11.2.0.3.0
      RDBMS Required Support Files Runtime 11.2.0.3.0
      XML Parser for Java 11.2.0.3.0
      Oracle Security Developer Tools 11.2.0.3.0
      Oracle Wallet Manager 11.2.0.3.0
      Enterprise Manager plugin Common Files 11.2.0.3.0
      Platform Required Support Files 11.2.0.3.0
      Oracle JFC Extended Windowing Toolkit 4.2.36.0.0
      RDBMS Required Support Files 11.2.0.3.0
      Oracle Ice Browser 5.2.3.6.0
      Oracle Help For Java 4.2.9.0.0
      Enterprise Manager Common Files 10.2.0.4.3
      Deinstallation Tool 11.2.0.3.0
      Oracle Java Client 11.2.0.3.0
      Cluster Verification Utility Files 11.2.0.3.0
      Oracle Notification Service (eONS) 11.2.0.3.0
      Oracle LDAP administration 11.2.0.3.0
      Cluster Verification Utility Common Files 11.2.0.3.0
      Oracle Clusterware RDBMS Files 11.2.0.3.0
      Oracle Locale Builder 11.2.0.3.0
      Oracle Globalization Support 11.2.0.3.0
      Buildtools Common Files 11.2.0.3.0
      Oracle RAC Required Support Files-HAS 11.2.0.3.0
      SQL*Plus Required Support Files 11.2.0.3.0
      XDK Required Support Files 11.2.0.3.0
      Agent Required Support Files 10.2.0.4.3
      Parser Generator Required Support Files 11.2.0.3.0
      Precompiler Required Support Files 11.2.0.3.0
      Installation Common Files 11.2.0.3.0
      Required Support Files 11.2.0.3.0
      Oracle JDBC/THIN Interfaces 11.2.0.3.0
      Oracle Multimedia Locator 11.2.0.3.0
      Oracle Multimedia 11.2.0.3.0
      HAS Common Files 11.2.0.3.0
      Assistant Common Files 11.2.0.3.0
      PL/SQL 11.2.0.3.0
      HAS Files for DB 11.2.0.3.0
      Oracle Recovery Manager 11.2.0.3.0
      Oracle Database Utilities 11.2.0.3.0
      Oracle Notification Service 11.2.0.3.0
      SQL*Plus 11.2.0.3.0
      Oracle Netca Client 11.2.0.3.0
      Oracle Net 11.2.0.3.0
      Oracle JVM 11.2.0.3.0
      Oracle Internet Directory Client 11.2.0.3.0
      Oracle Net Listener 11.2.0.3.0
      Cluster Ready Services Files 11.2.0.3.0
      Oracle Database 11g 11.2.0.3.0
—————————————————————————–
 
 
Instantiating scripts for add node (Saturday, May 4, 2013 8:52:48 PM CDT)
.                                                                 1% Done.
Instantiation of add node scripts complete
 
Copying to remote nodes (Saturday, May 4, 2013 8:52:50 PM CDT)
…………………………………………………………………………………..                                 96% Done.
Home copied to new nodes
 
Saving inventory on nodes (Saturday, May 4, 2013 8:56:03 PM CDT)
.                                                               100% Done.
Save inventory complete
WARNING:
The following configuration scripts need to be executed as the “root” user in each new cluster node. Each script in the list below is followed by a list of nodes.
/u01/app/11.2.0/grid/root.sh #On nodes rhel59drb
To execute the configuration scripts:
    1. Open a terminal window
    2. Log in as “root”
    3. Run the scripts in each cluster node
   
The Cluster Node Addition of /u01/app/11.2.0/grid was successful.
Please check ‘/tmp/silentInstall.log’ for more details.
 
 
On the Target Node, execute root.sh:  
[root@rhel59drb db_backup]# /u01/app/11.2.0/grid/root.sh
Check /u01/app/11.2.0/grid/install/root_rhel59drb_2013-05-04_21-18-28.log for the output of root script
 

[root@rhel59drb db_backup]# tail -f /u01/app/11.2.0/grid/install/root_rhel59drb_2013-05-04_21-18-28.log

    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/11.2.0/grid
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Relinking oracle with rac_on option
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
User ignored Prerequisites during installation
OLR initialization – successful
Adding Clusterware entries to inittab
CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node rhel59dra, number 1, and is terminating
An active cluster was found during exclusive startup, restarting to join the cluster
clscfg: EXISTING configuration version 5 detected.
clscfg: version 5 is 11g Release 2.
Successfully accumulated necessary OCR keys.
Creating OCR keys for user ‘root’, privgrp ‘root’..
Operation successful.
Preparing packages for installation…
cvuqdisk-1.0.9-1

Configure Oracle Grid Infrastructure for a Cluster … succeeded

 
——————
 

+ASM1 > crs_stat -t -v

HA Resource                                        Target     State            
———–                                        ——     —–            
ora.DATA.dg                                        ONLINE     ONLINE on rhel59dra
ora.FRA.dg                                         ONLINE     ONLINE on rhel59dra
ora.LISTENER.lsnr                                  ONLINE     ONLINE on rhel59dra
ora.LISTENER_SCAN1.lsnr                            ONLINE     ONLINE on rhel59drb
ora.LISTENER_SCAN2.lsnr                            ONLINE     ONLINE on rhel59dra
ora.LISTENER_SCAN3.lsnr                            ONLINE     ONLINE on rhel59dra
ora.LSNR_GTRRAC.lsnr                               ONLINE     ONLINE on rhel59dra
ora.OCR_VOTE.dg                                    ONLINE     ONLINE on rhel59dra
ora.asm                                            ONLINE     ONLINE on rhel59dra
ora.cvu                                            ONLINE     ONLINE on rhel59dra
ora.dtccrac.db                                     ONLINE     ONLINE on rhel59dra
ora.gsd                                            OFFLINE    OFFLINE          
ora.net1.network                                   ONLINE     ONLINE on rhel59dra
ora.oc4j                                           ONLINE     ONLINE on rhel59dra
ora.ons                                            ONLINE     ONLINE on rhel59dra
ora.registry.acfs                                  ONLINE     ONLINE on rhel59dra
ora.rhel59dra.ASM1.asm                             ONLINE     ONLINE on rhel59dra
ora.rhel59dra.LISTENER_RHEL59DRA.lsnr              ONLINE     ONLINE on rhel59dra
ora.rhel59dra.LSNR_GTRRAC_RHEL59DRA.lsnr           ONLINE     ONLINE on rhel59dra
ora.rhel59dra.gsd                                  OFFLINE    OFFLINE          
ora.rhel59dra.ons                                  ONLINE     ONLINE on rhel59dra
ora.rhel59dra.vip                                  ONLINE     ONLINE on rhel59dra
ora.rhel59drb.ASM2.asm                             ONLINE     ONLINE on rhel59drb
ora.rhel59drb.LISTENER_RHEL59DRB.lsnr              ONLINE     ONLINE on rhel59drb
ora.rhel59drb.LSNR_GTRRAC_RHEL59DRB.lsnr           ONLINE     ONLINE on rhel59drb
ora.rhel59drb.gsd                                  OFFLINE    OFFLINE          
ora.rhel59drb.ons                                  ONLINE     ONLINE on rhel59drb
ora.rhel59drb.vip                                  ONLINE     ONLINE on rhel59drb
ora.scan1.vip                                      ONLINE     ONLINE on rhel59drb
ora.scan2.vip                                      ONLINE     ONLINE on rhel59dra
ora.scan3.vip                                      ONLINE     ONLINE on rhel59dra 
 

Determine WWN

For those who are interested in knowing how to determine HBA port id (world-wide name – WWN) from a Linux box, see below.  Note is this is for RHEL/OEL 6.x.  5.x is quite different.  In our case its simple, we have one HBA, but the following can be used to walk thru it:
 
#lspci | grep -i fibre

03:00.0 Fibre Channel: QLogic Corp. ISP2432-based 4Gb Fibre Channel to PCI Express HBA (rev 02)
 
#systool -av -c fc_host
 
 
Class Device = “host6″
  Class Device path = “/sys/devices/pci0000:00/0000:00:1c.0/0000:03:00.0/host6/fc_host/host6″
    dev_loss_tmo        = “45″
    fabric_name         = “0xffffffffffffffff”
    issue_lip           = <store method only>
    max_npiv_vports     = “127″
    node_name           = “0x200000e08b93a654
    npiv_vports_inuse   = “0″
    port_id             = “0×000000″
    port_name           = “0x210000e08b93a654″
    port_state          = “Linkdown”
    port_type           = “Unknown”
    speed               = “unknown”
    supported_classes   = “Class 3″
    supported_speeds    = “1 Gbit, 2 Gbit, 4 Gbit”
    symbolic_name       = “QLE2460 FW:v5.03.07 DVR:v8.04.00.08.39.0-k”
    system_hostname     = “”
    tgtid_bind_type     = “wwpn (World Wide Port Name)”
    uevent              = 
    vport_create        = <store method only>
    vport_delete        = <store method only>
 
Thus WWN == 20:00:00:e0:8b:93:a6:54

By Nitin Vengurlekar and Charles Kim, Oracle ACE Director
Viscosity North America

ASM Pocket Reference Guide

Download the latest ASM Pocket Reference Guide prepared by Charles Kim, Oracle ACE Director, and Nitin Vengurlekar

Viscosity Has 10 presentations at IOUG Collaborate 2013

We will post the 10th session shortly …

Session #

Title

Room Assignment and Time

604

Rolling your own Database Operations Center (DOC) using Oracle Technology you already own

Mile High Ballroom 2A => Mon, Apr 08, 2013 (09:45 AM – 10:45 AM)

344

Performance Tuning your DB Cloud in OEM 12c Cloud Control – 360 Degrees

Mile High Ballroom 4A  => Mon, Apr 08, 2013 (09:45 AM – 10:45 AM)

614

Automate Data Guard Best Practices

Mile High Ballroom 2B => Mon, Apr 08, 2013 (05:00 PM – 06:00 PM)

 

 

 

477

Why Every Database Needs to be Virtualized

Mile High Ballroom 4A => Tue, Apr 09, 2013 (12:00 PM – 12:30 PM)

343

Oracle VM, OEM 12c and Cloud Computing:  Panel of Experts

C#13 vSIG Meeting => Tue, Apr 09, 2013 (4:15 PM – 5:15 PM)

 

 

 

441

ASM New Features – The New ASM Frontier

Mile High Ballroom 2C => Wed, Apr 10, 2013 (08:15 AM – 09:15 AM)

414

Engineered Systems Curriculum: The Perfect Marriage: ZFS Storage Appliance with Exadata

Mile High Ballroom 1C => Wed, Apr 10, 2013 (11:00 AM – 12:00 PM)

783

Virtualized Oracle Stretched RAC Cluster using VMware vSphere and EMC VPLEX

Mile High Ballroom 2A => Wed, Apr 10, 2013 (04:15 PM – 05:15 PM)

 

 

 

757

From Big Data to Exadata: The Best of Both Worlds for Business Analytics

Mile High Ballroom 1B => Thu, Apr 11, 2013 (09:45 AM – 10:45 AM)

 

 

 

Viscosity North America

VNA Core Competencies

Viscosity’s Core Competency centers arounds Oracle Real Application Clusters (RAC).   Because we are the top Oracle RAC Experts, we intimately know storage architecture, network infrastructure, operating systems, and most importantly, Oracle RAC database interactions within the ecosystem.  

Viscosity was formed by former Oracle Employees each of which worked in various capacities within Oracle Corporation. These capacities include Oracle Database, RAC Development, Oracle Consulting and Oracle Technical Architects, Design and Performance Tuning experts.

I am a co-founder and President of Viscosity North America, an Oracle ACE Director, an Oracle Certified DBA, Certified RAC Expert and a VMware Certified Professional. I specialize in Exadata, RAC, and Virtualization (VMware and Oracle VM) and authored three books: Oracle Database 11g New Features for DBA and Developers, Linux Recipes for Oracle DBAs and Oracle Data Guard 11g Handbook. I hold certifications in Oracle, VMware, Red Hat Linux, and Microsoft and has over 20 years of Oracle experience. I’ve sat on the panel of experts at VM World and Oracle OpenWorld for virtualization and Linux. I was one of the founding members of the IOUG virtualization SIG that launched in 2011 at Oracle OpenWorld.

If you look at the core of our competencies, we focus on what we are best at …  RAC.  RAC experts are expected to have in-depth knowledge in networks, clustering, storage, and operating systems.  Several of the managing directors have served as system administrators in past lives and hold specialized certifications in flavors of Unix.  

Because we know RAC, we know infrastructure.  Because we know infrastructure, we’ve adjusted our focus to the world of Database Cloud.  Not only do we adopt Oracle’s consolidation theme with Oracle RAC, we are heavily invested in VMware and Oracle VM.  Several of the managing directors at Viscosity hold certifications on VMware.  

Another area of mastery that we have taken is in the world of Exadata and Oracle engineered systems.  Not only are we the experts in Exadata implementation and performance tuning, we are also experts inother engineered systems such as the ZFS Storage Appliance and Oracle Database Appliance.

Viscosity’s Oracle Center of Expertise has developed best practices and tight partner relationships to implement world-class solutions. Our vast experience and intellectual property give customers insight into what is driving IT complexity. We can deliver a set of practical executable plans for simplifying IT infrastructure, helping reduce operating costs while freeing up resources for new business initiatives.

 

Complete DBCA

dbca with the silent option is the best way to create a database.  If you issue the find command from $ORACLE_HOME, you will see that oracle ships with two generic templates:

rhel59dra:/u01/app/oracle/product/11.2.0/db

> find . -name ‘*.dbc’
./assistants/dbca/templates/General_Purpose.dbc
./assistants/dbca/templates/Data_Warehouse.dbc

Leveraging the General Purpose template, I can create my custom database.  Notice all the init.ora options that is specified with my dbca command.

dbca -silent                             \

       -createDatabase                   \
       -templateName General_Purpose.dbc \
       -gdbName dbatools                   \
       -sid dbatools                       \
       -SysPassword oracle123 \
       -SystemPassword oracle123 \
       -emConfiguration NONE             \
       -redoLogFileSize 1000 \
       -recoveryAreaDestination FRA \
       -storageType ASM                  \
         -asmSysPassword oracle123 \
         -diskGroupName DATA     \
           -listeners  LISTENER_RAC \
       -characterSet AL32UTF8 \
       -nationalCharacterSet AL16UTF16 \
       -databaseType MULTIPURPOSE \
       -nodelist rhel59dra, rhel59drb \
       -initparams audit_file_dest=’/bkup/dbatools/adump’ \
           -initparams compatible=’11.2.0.3′ \
           -initparams db_create_file_dest=’+DATA’ \
           -initparams db_create_online_log_dest_1=’+DATA’ \
           -initparams db_create_online_log_dest_2=’+FRA’ \
           -initparams diagnostic_dest=’/bkup’ \
           -initparams parallel_max_servers=64 \
           -initparams pga_aggregate_target=1824522240 \
           -initparams processes=600 \
           -initparams sga_target=4294967296 \
           -initparams db_recovery_file_dest=’+FRA’ \
       -initparams db_recovery_file_dest_size=4322230272

OCR Check

AS Root

 
+ASM1 – oracle: sudo -u root -s -H
[sudo] password for oracle:
:/home/oracle
 - root: . oraenv
ORACLE_SID = [root] ? +ASM1
The Oracle base has been set to /apps/oracle
:/home/oracle
+ASM1 – root: ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3464
         Available space (kbytes) :     258656
         ID                       : 1710014838
         Device/File Name         :        +OV
                                    Device/File integrity check succeeded
 
 
                                    Device/File not configured
 
 
                                    Device/File not configured
 
 
                                    Device/File not configured
 
 
                                    Device/File not configured
 
 
         Cluster registry integrity check succeeded
 
 
         Logical corruption check succeeded
 
AS oracle
+ASM1 – oracle: cluvfy comp ocr -n all -verbose
 
 
Verifying OCR integrity
 
 
Checking OCR integrity…
 
 
Checking the absence of a non-clustered configuration…
All nodes free of non-clustered, local-only configurations
 
 
 
 
ASM Running check passed. ASM is running on all specified nodes
 
 
Checking OCR config file “/etc/oracle/ocr.loc”…
 
 
OCR config file “/etc/oracle/ocr.loc” check successful
 
 
 
 
Disk group for ocr location “+OV” available on all the nodes
 
 
 
 
NOTE:
This check does not verify the integrity of the OCR contents. Execute ‘ocrcheck’ as a privileged user to verify the contents of OCR.
 
 
OCR integrity check passed
 
 

Verification of OCR integrity was successful.

Script to re-create the ASM disk group on Exadata

Often, the Exadata arrives at the customer site with High redundancy disk groups when the customer wants to exploit as much of the disk space available on the Normal redundancy.   Here’s a simple script to convert the high redundancy disk group to a normal redundancy disk group:
 
cat gen_dg.sql
define DG=’&1′
set pages 0
set lines 200 trims on feed off  echo off echo off ver off
spool cr_&DG..sql
prompt CREATE DISKGROUP &DG NORMAL REDUNDANCY
 
 
set serveroutput on size unlimited
 
 
declare
v_failgroup v$asm_disk.failgroup%TYPE;
 
 
cursor c1 is
select chr(39)||path||chr(39) path, name
from v$asm_disk
where group_number = (select group_number from v$asm_diskgroup
                      where name=upper(‘&DG’))
and failgroup=v_failgroup
order by path;
 
 
cursor c2 is
select distinct failgroup
from v$asm_disk
order by failgroup;
 
 
cursor c3 is
select allocation_unit_size, compatibility, database_compatibility
from v$asm_diskgroup;
r3 c3%ROWTYPE;
 
 
begin
for r2 in c2 loop
v_failgroup := r2.failgroup;
dbms_output.put_line(‘FAILGROUP ‘||r2.failgroup||’ DISK’);
 
 
for r1 in c1 loop
if c1%rowcount = 1 then
   dbms_output.put_line(r1.path);
else
   dbms_output.put_line(‘,’||r1.path);
end if;
 
 
end loop;
 
 
end loop;
 
 
open c3; fetch c3 into r3;
dbms_output.put_line(‘ATTRIBUTE’);
dbms_output.put_line(chr(39)||’compatible.asm’||chr(39)||’='||chr(39)||r3.compatibility||chr(39)||’,');
dbms_output.put_line(chr(39)||’compatible.rdbms’||chr(39)||’='||chr(39)||r3.database_compatibility||chr(39)||’,');
dbms_output.put_line(chr(39)||’au_size’||chr(39)||’='||chr(39)||r3.allocation_unit_size||chr(39)||’,');
dbms_output.put_line(chr(39)||’cell.smart_scan_capable’||chr(39)||’='||chr(39)||’TRUE’||chr(39)||’;');
close c3;
 
 
end;
/

spool off