Friday, March 6, 2015

Start the ASM instance if the SPFILE itself is stored in an ASM disk group?

Starting from version 11g Release 2, the ASM spfile is stored automatically in the first disk group created during Grid Infrastructure installation:


Ø  Since Voting & OCR Disk resides in ASM Diskgroups, but as per startup sequence OCSSD starts first before than ASM, how is it possible?               

It can read the voting disk information from ( gpnp) profile 

Ø  What is gpnp profile?  What does gpnp profile contain?

The GPnP profile is a small XML file located in GRID_HOME/gpnp//profiles/peer under the name profile.xml. It is used to establish the correct global personality of a node. Each node maintains a local copy of the GPnP Profile and is maintained by the GPnP Deamon (GPnPD) .

GPnP Profile is used to store necessary information required for the startup of Oracle Clusterware like  SPFILE location, ASM Diskstring  etc.  It contains various attributes defining node personality.

                - Cluster name
                - Network classifications (Public/Private)
                - Storage to be used for CSS
                - Storage to be used for ASM : SPFILE location, ASM DiskString  etc
                - Digital signature information

                The order of searching the ASM SPfile is
                - GPnP profile
                - ORACLE_HOME/dbs/spfile
                - ORACLE_HOME/dbs/init

[oracle@rac128 peer]$ . oraenv
ORACLE_SID = [+ASM1] ?

[oracle@rac128 grid]$ cd $GRID_HOME/gpnp/rac128/profiles/peer/
[oracle@rac128 peer]$ pwd
/grid/app/11.2.0/grid/gpnp/rac128/profiles/peer

[oracle@rac128 peer]$ ls

profile.old  profile_orig.xml  profile.xml


 [oracle@rac128 peer]$ gpnptool getpval -asm_dis

Warning: some command line parameters were defaulted. Resulting command line:
         /grid/app/11.2.0/grid/bin/gpnptool.bin getpval -asm_dis -p=profile.xml -o-

/dev/oracleasm/disks/*


[oracle@rac128 dbs]$ asmcmd -p

ASMCMD [+] > spget
+DG_VOTE1/rac-cluster/asmparameterfile/registry.253.871462355

ASMCMD [+] > lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512   4096  1048576      8150     5982                0            5982              0             N  DG_CCB/
MOUNTED  EXTERN  N         512   4096  1048576      7844     7749                0            7749              0             N  DG_FLASH/
MOUNTED  EXTERN  N         512   4096  4194304       980      548                0             548              0             Y  DG_VOTE1/

ASMCMD [+] > lsdsk -G DG_VOTE1
Path
/dev/oracleasm/disks/ASMDISK01



[oracle@rac129 ~]$ kfed read /dev/oracleasm/disks/ASMDISK01 | grep -E  'spf|ausize'

kfdhdb.ausize:                  4194304 ; 0x0bc: 0x00400000
kfdhdb.spfile:                       16 ; 0x0f4: 0x00000010
kfdhdb.spfflg:                        1 ; 0x0f8: 0x00000001



[oracle@rac129 ~]$ dd if=/dev/oracleasm/disks/ASMDISK01 of=spfileASM_DEMO.ora skip=16 bs=4M

229+1 records in
229+1 records out
961018880 bytes (961 MB) copied, 39.3905 seconds, 24.4 MB/s


[oracle@rac129 ~]$ strings spfileASM_DEMO.ora

+ASM1.asm_diskgroups='DG_CCB','DG_FLASH'#Manual Mount
+ASM2.asm_diskgroups='DG_CCB','DG_FLASH'#Manual Mount
*.asm_diskstring='/dev/oracleasm/disks/*'
*.asm_power_limit=1
*.diagnostic_dest='/grid/app/oracle'
*.instance_type='asm'
*.large_pool_size=12M
*.remote_login_passwordfile='EXCLUSIVE'
60000
ACL=owner:oracle:rwx,pgrp:oinstall:rwx,other::r--~ACTION_FAILURE_TEMPLATE=~ACTION_SCRIPT=~ACTIVE_PLACEMENT=1~AGENT_FILENAME=%CRS_HOME%/bin/ora                         agent%CRS_EXE_SUFFIX%~AUTO_START=restore~BASE_TYPE=ora.cluster_resource.type~CARDINALITY=2~CHECK_INTERVAL=1~CHECK_
TIMEOUT=30~CLUSTER_DATABASE=true~DATABASE_TYPE=RAC~DB_UNIQUE_NAME=peehu~DEFAULT_TEMPLATE=PROPERTY(RESOURCE_CLASS=database) PROPERTY(DB_UNIQUE_                          NAME= CONCAT(PARSE(%NAME%, ., 2), %USR_ORA_DOMAIN%, .)) ELEMENT(INSTANCE_NAME= %GEN_USR_ORA_INST_NAME%) ELEMENT(DATABASE_TYPE= %DATABASE_TYPE%                          )~DEGREE=1~DESCRIPTION=Oracle Database resource~ENABLED=1~FAILOVER_DELAY=0~FAILURE_INTERVAL=60~FAILURE_THRESHOLD=1~GEN_AUDIT_FILE_DEST=/u01/ap                         p/oracle/admin/peehu/adump~GEN_START_OPTIONS=~GEN_START_OPTIONS@SERVERNAME(rac128)=nomount~GEN_START_OPTIONS@SERVERNAME(rac129)=open~GEN_USR_O                         RA_INST_NAME=~GEN_USR_ORA_INST_NAME@SERVERNAME(rac128)=peehu1~GEN_USR_ORA_INST_NAME@SERVERNAME(rac129)=peehu2~HOSTING_MEMBERS=~INSTANCE_FAILOVER=0~LOAD=1~LOGGING_LEVEL=1~MANAGEMENT_POLICY=AUTOMATIC~NAME=ora.peehu.db~NLS_LANG=~NOT_RESTARTING_TEMPLATE=~OFFLINE_CHECK_INTERVAL=0~ONLINE_RELOCATION_TIMEOUT=0~ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1~ORACLE_HOME_OLD=~PLACEMENT=restricted~PROFILE_CHANGE_TEMPLATE=~RESTART                         _ATTEMPTS=2~ROLE=PRIMARY~SCRIPT_TIMEOUT=60~SERVER_POOLS=ora.peehu~SPFILE=+DG_CCB/peehu/spfilepeehu.ora~START_DEPENDENCIES=hard(ora.DG_CCB.dg)  weak(type:ora.listener.type,global:type:ora.scan_listener.type,uniform:ora.ons,global:ora.gns) pullup(ora.DG_CCB.dg)~START_TIMEOUT=600~STATE_C                         HANGE_TEMPLATE=~STOP_DEPENDENCIES=hard(intermediate:ora.asm,shutdown:ora.DG_CCB.dg)~STOP_TIMEOUT=600~TYPE=ora.database.type~TYPE_ACL=owner:ora                          cle:rwx,pgrp:oinstall:rwx,other::r--~TYPE_NAME=ora.database.type~TYPE_VERSION=3.2~UPTIME_THRESHOLD=1h~USR_ORA_DB_NAME=peehu~USR_ORA_DOMAIN=ora                         .com~USR_ORA_ENV=~USR_ORA_FLAGS=~USR_ORA_INST_NAME=~USR_ORA_INST_NAME@SERVERNAME(rac128)=peehu1~USR_ORA_INST_NAME@SERVERNAME(rac129)=peehu2~US                          R_ORA_OPEN_MODE=open~USR_ORA_OPI=false~USR_ORA_STOP_MODE=immediate~VERSION=11.2.0.3.0~
CARDINALITY_ID=0~CARDINALITY_ID@CARDINALITYID(1)=1~CARDINALITY_ID@CARDINALITYID(2)=2~CREATION_SEED=82~DEGREE_ID=0~DEGREE_ID@CARDINALITYID(1)=1   ~DEGREE_ID@CARDINALITYID(2)=1~ID=ora.peehu.db~ID@CARDINALITYID(1)=ora.peehu.db 1 1~ID@CARDINALITYID(2)=ora.peehu.d
b 2 1~LAST_SERVER=~LAST_SERVER@CARDINALITYID(1)=rac128~LAST_SERVER@CARDINALITYID(2)=rac129~TARGET=8~TARGET@CARDINALITYID(1)=7~TARGET@CARDINALITYID(2)=7~
oracle
root
asmadmin
oinstall

root

No comments:

Post a Comment