Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 

 

 

Viewing Information About ASM

Oracle RAC Cluster Tips by Burleson Consulting

This is an excerpt from the bestselling book Oracle Grid & Real Application Clusters.  To get immediate access to the code depot of working RAC scripts, buy it directly from the publisher and save more than 30%.


There are seven new v$ views provided in Oracle Database 10g used to monitor ASM structures. These views are shown in Table 5.3.

VIEW

ASM INSTANCE

DB INSTANCE

v$osm_diskgroup

Shows disk group details such as number, name,  state, and redundancy type

Contains one row for every open ASM disk in the DB instance.

v$osm_client

Shows databases using disk groups managed by the ASM instance.

Contains no rows.

v$osm_disk

Shows every disk discovered by the ASM instance, including disks that are not part of any disk group.

Contains rows only for disks in the disk groups in use by that DB instance.

v$osm_file

Shows the files (data, redo, control, archive logs etc) in the ASM disk groups

Contains rows only for files that are currently open in the DB instance.

v$osm_template

Shows the templates available in every disk group

Contains no rows

v$osm_alias

Shows the alias for every disk group mounted

Contains no rows.

v$osm_operation

Long operations executing the rebalance activity are shown in this view

Contains no rows.

Table 5.3:  ASM v$ Views

Example of ASM configuration

To explain the ASM methodology, the following example will be used. There are four disk devices or partitions as shown below. For demonstration purposes, a single LUN of 9G was used and 4 partitions were created. In reality, actual environments may have many more devices and partitions. The Command FDISK manages the disk partitions.

[root@host-0002b /]# /sbin/fdisk /dev/sdl

The number of cylinders for this disk is set to 1110.

There is nothing wrong with that, but this is larger than 1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sdl: 255 heads, 63 sectors, 1110 cylinders

Units = cylinders of 16065 * 512 bytes

Device Boot     Start     End          Blocks       Id       System
/dev/sdl1           1       13         104391       83       Linux
/dev/sdl2          14       39         208845       83       Linux
/dev/sdl3          40      549         409675       83       Linux
/dev/sdl4         550     1059         409675       83       Linux

As shown above, there are four partitions, sd1, sd2, sd3 and sd4. The next step is to bind them as raw and change the ownership to oracle. This will be done with two disk partitions, sdl3 and sdl4, each of which is 4 GB in size.

[root@host-0002a dev]# raw /dev/raw/raw1 /dev/sdl3
/dev/raw/raw1:  bound to major 8, minor 179

[root@host-0002a dev]# raw /dev/raw/raw2 /dev/sdl4
/dev/raw/raw2:  bound to major 8, minor 180

> chown oracle:dba /dev/raw/raw1
> chown oracle:dba /dev/raw/raw2

The next step will focus on starting or creating an ASM instance. First, the ORACLE_HOME and ORACLE_SID variables are set. Next, the initASM1.ora file is prepared. In this example, the SID of the ASM instance is ASM1.

Shown below are the contents of the initASM1.ora file.

# created by TM 8/Apr/2004
*.ASM_DISKGROUPS=dgroup1
*.ASM_DISKSTRING='/dev/raw/raw*'
*.instance_type='ASM'
*.large_pool_size=12M
*.remote_login_passwordfile='NONE'
*.background_dump_dest= '/app/oracle/admin/ASM1/bdump'
*.core_dump_dest=       '/app/oracle/admin/ASM1/cdump'
*.user_dump_dest=       '/app/oracle/admin/ASM1/udump'

Ensure that the CSSD daemon is up and running. CSSD is the daemon which controls the communication between the database instance and ASM instance. To start the CSSD daemon, follow these commands:

[root@host-0002b init.d]# pwd
/etc/init.d
[root@host-0002b init.d]# ./init.cssd start

(Oracle CSSD will be run out of init)

Then start the ASM instance as follows:

become-2.05$ sqlplus "/ as sysdba"

SQL*Plus: Release 10.1.0.2.0 - Production on Fri Apr 9 14:34:38 2004

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

Connected to an idle instance.

SQL> startup nomount

ASM instance started

Total System Global Area        100663296 bytes

Fixed Size                                777616 bytes

Variable Size                            99885680 bytes

Database Buffers                      0 bytes

Redo Buffers                            0 bytes

SQL> create diskgroup TEST_DG external redundancy

disk '/dev/raw/raw1' ;

Diskgroup created.

SQL> alter diskgroup TEST_DG add disk '/dev/raw/raw2';

Diskgroup altered.

Now that there are two ASM disks with the disk group TEST_DG, the next step is to use the resources to create a tablespace by the Database Instance NYREP10.

SQL> create tablespace  ASM_TBS1 DATAFILE '+TEST_DG' size 200M ;

Tablespace created.

SQL> select BYTES, NAME,  TS# from v$datafile ;

BYTES   NAME                                                  TS#
----------   ------------------------------------------------  ----
 471859200  /u01/NYREP10//datafile/o1_mf_system_02lswyso_.dbf     0
  36700160  /u01/NYREP10/datafile/o1_mf_undotbs1_02lswz0t_.dbf    1
 367001600  /u01/NYREP10/datafile/o1_mf_sysaux_02lswywy_.dbf      2
  20971520  /u01/NYREP10/datafile/o1_mf_users_02lswz3t_.dbf       4
 157286400  /u01/NYREP10/datafile/o1_mf_example_02lszorq_.dbf     6
 209715200  +TEST_DG/nyrep10/datafile/asm_tbs1.256.1              7

6 rows selected.

col GROUP_NUMBER heading GRP# format 99
col DISK_NUMBER heading Disk# format 999
col MOUNT_STATUS heading "Mount|Status" format A8

SQL> select GROUP_NUMBER, DISK_NUMBER, MOUNT_STATUS, STATE,REDUNDANCY,

     TOTAL_MB, FREE_MB, NAME, path  from  v$asm_disk ;

           Mount

GRP# Disk# Status STATE  TOTAL_MB FREE_MB NAME         PATH
---- ----- ------ ------ -------- ------- ------------ -------------
   1     1 CACHED NORMAL   4000     3878  TEST_DG_0001 /dev/raw/raw2
   1     0 CACHED NORMAL   4000     3869  TEST_DG_0000 /dev/raw/raw1

The above illustration shows that the ASM file is created out of two ASM disks.

Note in case of Linux Platform, use the Oracle provided ASMLibrary (Install ASM Libraries which are available in the form of RPM/s) ? Details of the installation is explained in a later part of this chapter.

 


This is an excerpt from the bestselling book Oracle Grid & Real Application Clusters, Rampant TechPress, by Mike Ault and Madhu Tumma.

You can buy it direct from the publisher for 30%-off and get instant access to the code depot of Oracle tuning scripts.

http://www.rampant-books.com/book_2004_1_10g_grid.htm


 

 
  
 

 
 
 
 
 

 
 
 
 
 
 
Oracle training Excel
 
Oracle performance tuning software 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright ? 1996 -  2014

All rights reserved by Burleson

Oracle ? is the registered trademark of Oracle Corporation.