Startup of ASM Instance when ASM SPFILE is located in ASMDISKGROUP itself


How Voting Disk is located and ASM Instance Starts during clusterware Startup


In my last  POST I explained you a highlevel oracle clusterware startup sequence.
In that post I mentioned that clusterware usages special pointer to locate the voting disk when stored in SPFILE. Let us see how.

To read the SPFILE from diskgroup it is not necessary to open the diskgroup because all necessary information to access the data is stored in device's header itself
OHASD reads the header of the ASM disk containing ASM SPfile (as found from GPnP profile) and using the pointers in disk header, contents of ASM spfile are read. It usages kfed to read the disk header.
you dont need to open the disk if you want to scan using kfed



Lets Proof what I said.

Where is  GPNP Profile ?


ce /etc/oracle
cat olr.loc
olrconfig_loc=/u01/app/12.2.0.2/grid/cdata/node2.olr
crs_home=/u01/app/12.2.0.2/grid


cd /u01/app/12.2.0.2/grid/gpnp/node2/profiles/peer

Does GPNP Profile has an Entry for SPFILE path?

gpnptool getpval -asm_spf

Warning: some command line parameters were defaulted. Resulting command line:
         /u01/app/12.2.0.2/grid/bin/gpnptool.bin getpval -asm_spf -p=profile.xml -o-
+OCR_VOT/RAC01/ASMPARAMETERFILE/registry.253.946919517

Does OCR also contains a Copy of GPNP Profile (in 12c R2)

At this stage OHASD knows the diskgroup name and path of SPFILE by reading OLR


Let us identify how many disks are there in this DG


asmcmd lsdsk -G OCR_VOT
Path
/dev/oracleasm/disks/DISK1
/dev/oracleasm/disks/DISK2
/dev/oracleasm/disks/DISK3

 ls -lr /dev/oracleasm/disks/*
brw-rw----. 1 oracle oinstall 8, 28 Jun 18 02:27 /dev/oracleasm/disks/DISK8
brw-rw----. 1 oracle oinstall 8, 27 Jun 18 02:27 /dev/oracleasm/disks/DISK7
brw-rw----. 1 oracle oinstall 8, 26 Jun 18 02:27 /dev/oracleasm/disks/DISK6
brw-rw----. 1 oracle oinstall 8, 25 Jun 18 02:27 /dev/oracleasm/disks/DISK5
brw-rw----. 1 oracle oinstall 8, 24 Jun 18 05:19 /dev/oracleasm/disks/DISK4
brw-rw----. 1 oracle oinstall 8, 23 Jun 18 05:19 /dev/oracleasm/disks/DISK3
brw-rw----. 1 oracle oinstall 8, 22 Jun 18 05:19 /dev/oracleasm/disks/DISK2
brw-rw----. 1 oracle oinstall 8, 21 Jun 18 05:19 /dev/oracleasm/disks/DISK1
ls -lr /dev/sdb*
brw-rw----. 1 root disk 8, 25 Jun 18 02:27 /dev/sdb9
brw-rw----. 1 root disk 8, 24 Jun 18 02:27 /dev/sdb8
brw-rw----. 1 root disk 8, 23 Jun 18 02:27 /dev/sdb7
brw-rw----. 1 root disk 8, 22 Jun 18 02:27 /dev/sdb6
brw-rw----. 1 root disk 8, 21 Jun 18 02:27 /dev/sdb5

brw-rw----. 1 root disk 8, 28 Jun 18 02:27 /dev/sdb12
brw-rw----. 1 root disk 8, 27 Jun 18 02:27 /dev/sdb11
brw-rw----. 1 root disk 8, 26 Jun 18 02:27 /dev/sdb10
brw-rw----. 1 root disk 8, 17 Jun 18 02:27 /dev/sdb1
brw-rw----. 1 root disk 8, 16 Jun 18 02:27 /dev/sdb

At this Point we know the partiotions which consists  OCR_VOT DG

ok so far so good

How to read the disk Partotion Header using KFED

Now let us use KFED to read the Header of These Partitions.

[root@node2 ~]# kfed read /dev/sdb5 | grep -E spf
kfdhdb.spfile:                       23 ; 0x0f4: 0x00000017
kfdhdb.spfflg:                        1 ; 0x0f8: 0x00000001


[root@node2 ~]# kfed read /dev/sdb6 | grep -E spf
kfdhdb.spfile:                       23 ; 0x0f4: 0x00000017
kfdhdb.spfflg:                        1 ; 0x0f8: 0x00000001


[root@node2 ~]# kfed read /dev/sdb7 | grep -E spf
kfdhdb.spfile:                        0 ; 0x0f4: 0x00000000
kfdhdb.spfflg:                        0 ; 0x0f8: 0x00000000

From the above Output what we can conclude is

  the device /dev/sdb5 and /dev/sdb6  contains a copy of the ASM spfile (spfflg=1).
  The ASM spfile location starts at the disk offset of 23 (spfile=23)
Sehr Gut.

Now let us See what is stored there. just dump it using our favorite command dd

dd if=/dev/sdb5 of=spfile_from_sdb5.ora skip=23 bs=4M count=2
dd if=/dev/sdb6 of=spfile_from_sdb6.ora skip=23 bs=4M count=2

Why bs=4 (you can check the block size)

[root@node2 ~]# kfed read /dev/sdb5|grep ausize
kfdhdb.ausize:                  4194304 ; 0x0bc: 0x00400000



[root@node2 ~]# cat spfile_from_sdb6.ora
C"▒▒p8CC"*_+ASM1.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from in memory value
+ASM2.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from in memory value
*.asm_diskgroups='DATA_MGMT'#Manual Mount
*.asm_diskstring='/dev/oracleasm/disk*'
*.asm_power_limit=1
*.large_pool_size=12M
*.remote_login_passwordfile='EXCLUSIVE'
..................................................................
..................................................................

In the same way Vote disk is also accessed. Just go ahead and check. you can ídentify the voting disk using below query and afterwords ist same just find the Partition and grep vf (votefile).


Once the voting disk is accessible and ASM is started using the SPfile read above, rest you already know how it works. If you want to revise just click here
 crsctl query css votedisk

I hope you find the post interesting and have enjoyed it. Thanks and will see us again with some other interesting Topic soon...............

Takecare of yourself and Keep on learning..............













1 comment:

  1. Excellent blog I visit this blog it's really awesome. The important thing is that in this blog content written clearly and understandable. The content of information is very informative.
    Workday Online Training
    Oracle Fusion HCM Online Training
    Oracle Fusion SCM Online Training
    Oracle Fusion Financials Online Training

    ReplyDelete