Setting up ASM on Oracle 10g

A Brief Pep talk: Oracle Romancing the Linux


In part 11 of RACing Ahead with Oracle on VMware, we covered OCFS2 and its installation. The last couple of weeks, we have seen how Oracle has been contemplating the move to host its applications on its own Linux distribution. Oracle develops (or should I say the geeks at Oracle develop) aggressively on the Linux platform. Therefore, it does make sense for them to have their own distribution. As of this writing, Oracle is still contemplating whether to make its own Linux distribution OR to buy it. I personally think, should they really feel the need to get their own Linux OS, then Redhat is a “ripe acquisition candidate.” Anyway, time will tell.


Getting back to ASM, What will we be covering here?



  • Introduction to ASM
  • Installing ASMlib

Introduction to ASM: What is ASM?


We will not delve too deep into what ASM is here. I will, however, start on an Administration series, where we will do all kinds of work on ASM. Understanding what ASM is and what Oracle’s efforts have been to promote this new technology, are best said by the manual itself :


Automatic Storage Management (ASM) is an integrated file system and volume manager expressly built for Oracle database files. ASM provides the performance of raw I/O with the easy management of a file system. It simplifies database administration by eliminating the need for you to directly manage potentially thousands of Oracle database files. It does this by enabling you to divide all available storage into disk groups. You manage a small set of disk groups and ASM automates the placement of the database files within those disk groups.”


Note: When using multiple Oracle Instances using ASM on a single server, you must setup different Oracle homes for the individual instances but run the CSS daemon and the ASM instance from the same ORACLE_HOME directory. Also, make sure that your oracle user for each database instance is a member of the dba group for the ASM instance and do not forget to check that the disks have read/write permission to the ASM dba group. These conditions do not apply to the oracle user in the ASM instance. It does not need to be in the dba group, as do users of other database instances.


You must stop all Oracle ASM instances and any Oracle database instances that use ASM for database file storage under all ORACLE_HOMEs.


While logged in as root, find your ORACLE_HOME directory used to run the CSS daemon. It will be /etc/oracle/ocr.loc for Linux installations (AIX as well), /var/opt/oracle/ocr.loc for other UNIX operating systems, and \oracle\ocr.loc for Windows. Here the ocrconfig_loc parameter (which you can find in the ORACLE_HOME/cdata/localhost/local.ocr) specifies the location of the Oracle Cluster Registry (OCR) used by the CSS daemon. You must change the ORACLE_HOME to the new_ORACLE_HOME directory of the Oracle Database 10g installation from which you want the CSS daemon to run. Then go ahead and reconfigure the CSS daemon to run from this Oracle home as follows:

$ORACLE_HOME/bin/localconfig reset $mynew_ORACLE_HOME

Typing the above-mentioned commands will reconfigure the CSS daemon to run from the new $ORACLE_HOME. Changes will be affected upon restarting the daemon. When your OS is rebooted, the CSS daemon starts automatically from the new Oracle home. When you configure the CSS daemon to run from the new ORACLE_HOME ($mynew_ORACLE_HOME thus), the ASM instance can be started in this new Oracle home. The other database instances running should be able to access this ASM instance and the underlying disks with the appropriate permissions. Therefore, you see you have to pay attention to this.


What is supported in ASM (and what is not?)


Only Oracle files are supported:



  • Database files
  • Control files
  • Online redo log files
  • Archived redo log files
  • Flash recovery area files
  • RMAN files (image copy and backup)

These files are NOT supported:



  • Installation files (in ORACLE_HOME, CRS_HOME)
  • ORACLE_BASE files( including alert log, trace files, etc)
  • CRS voting disk and OCR files
  • Output data from UTL_FILE
  • Any user or application specific files(e.g. XML or Java files)
  • Oracle 9i external table files

So prepare appropriately when migrating from Non-ASM to ASM scenario.


Are there any other Clustering alternatives?


Sure, there are alternatives besides raw devices or ASM or OCFS. The CFS supports any third party cluster solution. The advantage is that they will also support the installation files and other user specific files like XML, Java etc. Check out the certification matrix of all certified platforms and third-party CFS providers by accessing MetaLink Note #184875.1, “How to Check the Certification Matrix for RAC”


Installing ASMlib


Getting it


See my previous article Part 6 for this information.


Installing it




Configuration


Also pretty straight forward.


NOTE: Don’t forget to do this on all nodes.

# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets (‘[]’). Hitting <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Fix permissions of Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: [ OK ]
Creating /dev/oracleasm mount point: [ OK ]
Loading module “oracleasm”: [ OK ]
Mounting ASMlib driver filesystem: [ OK ]
Scanning system for ASM disks: [ OK ]

Creating ASM Disks for Oracle 10g RAC

Tarry Singh
Tarry Singh
I have been active in several industries since 1991. While working in the maritime industry I have worked for several Fortune 500 firms such as NYK, A.P. Møller-Mærsk Group. I made a career switch, emigrated, learned a new language and moved into the IT industry starting 2000. Since then I have been a Sr. DBA, (Technical) Project Manager, Sr. Consultant, Infrastructure Specialist (Clustering, Load Balancing, Networks, Databases) and (currently) Virtualization/Cloud Computing Expert and Global Sourcing in the IT industry. My deep understanding of multi-cultural issues (having worked across the globe) and international exposure has not only helped me successfully relaunch my career in a new industry but also helped me stay successful in what I do. I believe in "worknets" and "collective or swarm intelligence". As a trainer (technical as well as non-technical) I have trained staff both on national and international level. I am very devoted, perspicacious and hard working.

Get the Free Newsletter!

Subscribe to Cloud Insider for top news, trends & analysis

Latest Articles