How can ASM read a spfile from a ASM diskgroup – even ASM instance isn’t up?

Overview – steps to read an ASM Spfile

  • Use Pnp play tool:  gpnptool  getpval -asm_dis to read ASM disk discovery path
  • Scan all available ASM disk header to find ASM disks having a spfile reference
  • Read the related block and dump the SPfile entries

Read ASM disk discovery string from profile.xml


Read Plug and Play XML file read ASM pfile info and ASM disk discovery string:
#  $GRID_HOME/bin/gpnptool  getpval -asm_spf -p=/u01/app/11203/grid/gpnp/grac1/profiles/peer/profile.xml
Warning: some command line parameters were defaulted. Resulting command line: 
         /u01/app/11203/grid/bin/gpnptool.bin getpval -asm_spf -p=/u01/app/11203/grid/gpnp/grac1/profiles/peer/profile.xml -o-
+DATA/grace2/asmparameterfile/registry.253.821039237
-> Diskgroup DATA is used 

Read the ASM disk discovery string 
 $GRID_HOME/bin/gpnptool  getpval -asm_dis  -p=/u01/app/11203/grid/gpnp/grac1/profiles/peer/profile.xml
Warning: some command line parameters were defaulted. Resulting command line: 
         /u01/app/11203/grid/bin/gpnptool.bin getpval -asm_dis -p=/u01/app/11203/grid/gpnp/grac1/profiles/peer/profile.xml -o-
ASM discovery disk string : dev/oracleasm/disks/*

 

Use the discoverd ASM disk string and user kfed to find a disk with a SPILE

#  ls /dev/oracleasm/disks/*
/dev/oracleasm/disks/ACFS_DATA  /dev/oracleasm/disks/DATA2  /dev/oracleasm/disks/OCR1  /dev/oracleasm/disks/OCR3
/dev/oracleasm/disks/DATA1      /dev/oracleasm/disks/DATA3  /dev/oracleasm/disks/OCR2

Let's  scan the disks until we find a disk with SPfile location
#  $GRID_HOME/bin/kfed read /dev/oracleasm/disks/DATA1  | egrep 'spf|ausize'
kfdhdb.ausize:                  1048576 ; 0x0bc: 0x00100000
kfdhdb.spfile:                        0 ; 0x0f4: 0x00000000
kfdhdb.spfflg:                        0 ; 0x0f8: 0x00000000
spfflg=0 --> No spfile

#  $GRID_HOME/bin/kfed read /dev/oracleasm/disks/DATA2  | egrep 'spf|ausize'
kfdhdb.ausize:                  1048576 ; 0x0bc: 0x00100000
kfdhdb.spfile:                       59 ; 0x0f4: 0x0000003b
kfdhdb.spfflg:                        1 ; 0x0f8: 0x00000001
spfflg=1 --> SPfile at block 59 - Read the block and check it:

Read the block with dd and use strings to extract some spfile data

#  dd if=/dev/oracleasm/disks/DATA2  of=SPFile_from_ASM.dat bs=1M count=1 skip=59 
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.00882297 s, 119 MB/s

# strings SPFile_from_ASM.dat
+ASM1.asm_diskgroups='OCR','ACFS'#Manual Mount
+ASM2.asm_diskgroups='ACFS'#Manual Mount
*.asm_diskstring='/dev/oracleasm/disks/*'
*.asm_power_limit=1
*.diagnostic_dest='/u01/app/grid'
*.instance_type='asm'
*.large_pool_size=12M
*.remote_login_passwordfile='EXCLUSIVE'
--> Now we have read the ASM PFile and in a similar ASM can startup the instance

References:

 

2 thoughts on “How can ASM read a spfile from a ASM diskgroup – even ASM instance isn’t up?”

Leave a Reply

Your email address will not be published. Required fields are marked *