Monday, November 18, 2013

RAC - Validating ASM Instance


- For ASM storage, we need two components 1. ASM Drivers 2. Grid Infrastructure

- ASM Drivers is a optional nice to have - configures ASM disks, assigns ASM drivers, configuration at the node bootup

- To install oracleasm driver we need to install - 1. oracleasmlib(chipset specific) 2. oracleasm-support(chipset specific) 3. oracleasm(specific to OS)

- oracleasm driver will be installed in /etc/init.d location

[root@rac1 init.d]# pwd
/etc/init.d
[root@rac1 init.d]# ls -lart oracl*
-rwxr-xr-x. 1 root root 7124 Feb  9  2013 oracleasm
-rwx------. 1 root root 1450 Apr 24  2013 oracle-rdbms-server-12cR1-preinstall-firstboot
[root@rac1 init.d]# ./oracleasm status
Checking if ASM is loaded: yes
Checking if /dev/oracleasm is mounted: yes

- Grid Infrastructure installation installs 1. ASM software 2. Clusterware software(CRS, CSS, SSH) 3. Installs & configures ASM instance

- After installing the GI, check for ASM process running

[root@rac1 init.d]# ps -ef | grep smon
oracle    1959     1  0 00:49 ?        00:00:00 ora_smon_MyDB1
oracle    2008     1  0 00:49 ?        00:00:00 mdb_smon_-MGMTDB
oracle    2690     1  0 Nov18 ?        00:00:01 asm_smon_+ASM1  <-- This confirms that the GI installation has installed and configured ASM instance.
root      2726     1  2 Nov18 ?        00:14:27 /u01/app/12.1.0/grid/bin/osysmond.bin
root      4461  3453  0 01:38 pts/0    00:00:00 grep smon

As part of GI installation ASM entry is made in /etc/oratab file

[root@rac1 init.d]# more /etc/oratab
#Backup file is  /u01/app/oracle/product/12.1.0/dbhome_1/srvm/admin/oratab.bak.rac1 line added by Agent
#

# This file is used by ORACLE utilities.  It is created by root.sh
# and updated by either Database Configuration Assistant while creating
# a database or ASM Configuration Assistant while creating ASM instance.

# A colon, ':', is used as the field terminator.  A new line terminates
# the entry.  Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
#   $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively.  The third field indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
+ASM1:/u01/app/12.1.0/grid:N: # line added by Agent
-MGMTDB:/u01/app/12.1.0/grid:N: # line added by Agent
MyDB:/u01/app/oracle/product/12.1.0/dbhome_1:N: # line added by Agent

Apart from above process, oratab entry, GI installation will create the two network called - vip & scan network

[root@rac1 init.d]# ping rac1-vip
PING rac1-vip.localdomain (192.168.56.81) 56(84) bytes of data.
64 bytes from rac1-vip.localdomain (192.168.56.81): icmp_seq=1 ttl=64 time=0.026 ms
64 bytes from rac1-vip.localdomain (192.168.56.81): icmp_seq=2 ttl=64 time=0.029 ms
64 bytes from rac1-vip.localdomain (192.168.56.81): icmp_seq=3 ttl=64 time=0.066 ms
^C
--- rac1-vip.localdomain ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2824ms
rtt min/avg/max/mdev = 0.026/0.040/0.066/0.018 ms

[root@rac1 init.d]# ping rac-scan
PING rac-scan.localdomain (192.168.56.91) 56(84) bytes of data.
64 bytes from rac-scan.localdomain (192.168.56.91): icmp_seq=1 ttl=64 time=1.48 ms
64 bytes from rac-scan.localdomain (192.168.56.91): icmp_seq=2 ttl=64 time=0.405 ms
64 bytes from rac-scan.localdomain (192.168.56.91): icmp_seq=3 ttl=64 time=0.477 ms
^C
--- rac-scan.localdomain ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2846ms
rtt min/avg/max/mdev = 0.405/0.788/1.484/0.493 ms

- Manually asm disk groups configuration can be performed using - asmca

- To check the details of spfile(binary) of ASM instance, create a pfile from spfile by logging into sqlplus as sysasm user. 

[oracle@rac1 disks]$ . oraenv
ORACLE_SID = [+ASM1] ? +ASM1
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@rac1 disks]$ sqlplus / as sysasm

SQL*Plus: Release 12.1.0.1.0 Production on Tue Nov 19 01:53:53 2013

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options

SQL> create pfile='/home/oracle/init+ASM1.ora' from spfile;

File created.

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
[oracle@rac1 disks]$ cd ~
[oracle@rac1 ~]$ ls -lart init*
-rw-r--r-- 1 oracle oinstall 272 Nov 19 01:55 init+ASM1.ora
[oracle@rac1 ~]$ cat init+ASM1.ora
+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_diskstring='/dev/oracleasm/disks'
*.asm_power_limit=1
*.large_pool_size=12M
*.remote_login_passwordfile='EXCLUSIVE'

No comments:

Post a Comment