Configuration example of Oracle ASM on Solaris.

Update: Instructions in this post are not valid for Oracle 11gR2. In 11gR2 ASM is not a part of database as it moved into Grid.

In this example you will see how to configure Oracle ASM on Solaris.


The following system will be used in this example: Sun T5220 with attached 6140 array, Solaris 10 (10/08) and Oracle 11.


Briefly, Oracle Database installation steps can be performed as five separate steps:

  1. Install Oracle binaries only

  2. Install Oracle patchset

  3. Configuring ASM

  4. Configuring Listener

  5. Database Creation


In this post I will show you the steps necessary to create ASM (step 3). Each step is accomplished with it's screenshot.


  1. Start dbca and choose “Configure Automatic Storage Management”

$ dbca




  1. Before using ASM you will be asked to configure Oracle Cluster Synchronization Service (CSS).



  1. Login as root at execute required script:

bash-3.00# /oracle/database/product/10.2.0/bin/localconfig add 
Successfully accumulated necessary OCR keys. 
Creating OCR keys for user 'root', privgrp 'root'.. 
Operation successful. 
Configuration for local CSS has been initialized 

Cleaning up Network socket directories 
Setting up Network socket directories 
Adding to inittab 
Feb 16 02:04:24 rac10 root: Oracle Cluster Synchronization Service starting by user request. 
Startup will be queued to init within 30 seconds. 
Checking the status of new Oracle init process... 
Expecting the CRS daemons to be up within 600 seconds. 
Feb 16 02:04:24 rac10 root: Cluster Ready Services completed waiting on dependencies. 
Cluster Synchronization Services is active on these nodes. 
        rac10 
Cluster Synchronization Services is active on all the nodes. 
Oracle CSS service is installed and running under init(1M)
  1. After the script will complete continue to next step and enter desired password for ASM instance. I choose 'oracle'.



  1. Proceed with ASM instance creation.



  1. Now we can check that ASM instance is running:

bash-3.00# ps -ef|grep ASM 
  oracle  8438     1   0 02:10:09 ?           0:00 asm_vktm_+ASM 
  oracle  8719  8378   0 02:12:08 ?           0:00 oracle+ASM (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq))) 
  oracle  8435     1   0 02:10:09 ?           0:00 asm_pmon_+ASM 
  oracle  8446     1   0 02:10:09 ?           0:00 asm_dia0_+ASM 
  oracle  8442     1   0 02:10:09 ?           0:00 asm_diag_+ASM 
  oracle  8444     1   0 02:10:09 ?           0:00 asm_psp0_+ASM 
  oracle  8448     1   0 02:10:09 ?           0:00 asm_mman_+ASM 
  oracle  8450     1   0 02:10:09 ?           0:00 asm_dbw0_+ASM 
  oracle  8452     1   0 02:10:09 ?           0:00 asm_lgwr_+ASM 
  oracle  8454     1   0 02:10:09 ?           0:00 asm_ckpt_+ASM 
  oracle  8456     1   0 02:10:09 ?           0:00 asm_smon_+ASM 
  oracle  8458     1   0 02:10:09 ?           0:00 asm_rbal_+ASM 
  oracle  8460     1   0 02:10:09 ?           0:00 asm_gmon_+ASM 
    root  8833   734   0 02:13:03 console     0:00 grep ASM 


  1. When instance is up we need to create disk group(s).



  1. If you will choose “Create New” then you may see that there are no candidate disks for new disk group.



  1. We need to set oracle:dba ownership of the candidate disk. As root we will take partition s0 of disk c4t600A0B8000562790000005D04998C446d0.


bash-3.00# format 
Searching for disks...done 

c4t600A0B8000562790000005D04998C446d0: configured with capacity of 1024.00GB 


AVAILABLE DISK SELECTIONS: 
       0. c1t0d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
          /pci@0/pci@0/pci@2/scsi@0/sd@0,0
       1. c1t1d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
          /pci@0/pci@0/pci@2/scsi@0/sd@1,0
       2. c4t600A0B80003391700000060A49963C06d0 <SUN-CSM200_R-0710-1.00TB>
          /scsi_vhci/ssd@g600a0b80003391700000060a49963c06
       3. c4t600A0B8000562790000005D04998C446d0 <SUN-CSM200_R-0710-1.00TB>
          /scsi_vhci/ssd@g600a0b8000562790000005d04998c446
Specify disk (enter its number): 3 
selecting c4t600A0B8000562790000005D04998C446d0 
[disk formatted] 
Disk not labeled.  Label it now? y 


FORMAT MENU: 
        disk       - select a disk 
        type       - select (define) a disk type 
        partition  - select (define) a partition table 
        current    - describe the current disk 
        format     - format and analyze the disk 
        repair     - repair a defective sector 
        label      - write label to the disk 
        analyze    - surface analysis 
        defect     - defect list management 
        backup     - search for backup labels 
        verify     - read and display labels 
        inquiry    - show vendor, product and revision 
        volname    - set 8-character volume name 
        !     - execute , then return 
        quit 
format> p 


PARTITION MENU: 
        0      - change `0' partition 
        1      - change `1' partition 
        2      - change `2' partition 
        3      - change `3' partition 
        4      - change `4' partition 
        5      - change `5' partition 
        6      - change `6' partition 
        select - select a predefined table 
        modify - modify a predefined partition table 
        name   - name the current table 
        print  - display the current table 
        label  - write partition map and label to the disk 
        ! - execute , then return 
        quit 
partition> p 
Current partition table (original): 
Total disk sectors available: 2147467230 + 16384 (reserved sectors) 

Part      Tag    Flag     First Sector          Size          Last Sector 
  0        usr    wm                34      1023.99GB           2147467230    
  1 unassigned    wm                 0            0                0    
  2 unassigned    wm                 0            0                0    
  3 unassigned    wm                 0            0                0    
  4 unassigned    wm                 0            0                0    
  5 unassigned    wm                 0            0                0    
  6 unassigned    wm                 0            0                0    
  8   reserved    wm        2147467231         8.00MB           2147483614    

partition> Ctrl-D
  1. Default owner is root:sys needs to be changed to oracle:dba

bash-3.00# ls -lhL /dev/rdsk/c4t600A0B8000562790000005D04998C446d0s0
crw-r-----   1 root     sys      118, 64 Feb 16 02:10 /dev/rdsk/c4t600A0B8000562790000005D04998C446d0s0 
bash-3.00# chown oracle:dba /dev/rdsk/c4t600A0B8000562790000005D04998C446d0s0 
bash-3.00# ls -lhL /dev/rdsk/c4t600A0B8000562790000005D04998C446d0s0
crw-r-----   1 oracle   dba      118, 64 Feb 16 03:00 /dev/rdsk/c4t600A0B8000562790000005D04998C446d0s0 
  1. Going back to candidate disks and now we have our disk in the list.



  1. Enter desired name for disk group and mark candidate disk. I will use External redundancy since I have external array.



  1. Continue and finish ASM creation.





To check disk group status and size quickly use the following asm.sql query:

-bash-3.00$ cat asm.sql 
set linesize 132; 
column path format a58;
column name format a10;
column G# format 99;
column D# format 99;
select group_number G#, disk_number D#, state, redundancy, name, path, total_mb, free_mb, (total_mb - free_mb) used_mb from v$asm_disk;
select name, total_mb, free_MB from v$asm_diskgroup;
exit -bash-3.00$ ORACLE_SID=+ASM sqlplus / as sysdba @asm SQL\*Plus: Release 11.1.0.7.0 - Production on Mon Feb 16 03:11:21 2009 Copyright (c) 1982, 2008, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options G# D# STATE REDUNDA NAME PATH TOTAL_MB FREE_MB USED_MB --- --- -------- ------- ---------- ---------------------------------------------------------- ---------- ---------- ---------- 1 0 NORMAL UNKNOWN DG1_0000 /dev/rdsk/c4t600A0B8000562790000005D04998C446d0s0 1048567 1048508 59 NAME TOTAL_MB FREE_MB ---------- ---------- ---------- DG1 1048567 1048508 Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options


Now you can move to database creation and using ASM storage.


Setup listerner by running

$ netca


Create database by running

$ dbca





Comments:

Hey, this is a great blog.

Back in time I attempted to setup ASM, but extremely busy support schedules did not allow me enough time to put all the puzzle pieces together; that was the perfect project which would have benefit a lot with ASM. I suppose I can not go back in time :|

Again, this is a great help,
thank you Roman.

Posted by Moiz Ahmed on October 20, 2009 at 02:08 PM PDT #

Hello,

this is a greatful article. Unfortunately it seems that Oracle removed ASM configuration from dbca with 11g. Do you know how to deal with that? What do I need to use ASM in Oracle 11g?

Posted by Thomas on June 01, 2010 at 02:29 AM PDT #

I put notice on top.
Update: Instructions in this post are not valid for Oracle 11gR2. In 11gR2 ASM is not a part of database as it moved into Grid.

Posted by Roman Ivanov on September 16, 2010 at 04:14 PM PDT #

excellent article !!

thanks

Posted by mubeen on October 04, 2010 at 02:09 PM PDT #

hello roman,

Thanks for the article, i followed the steps you provided but still i'm not geting the candidate disk list while creating ASM Instance.. please let us know if any solution is available.. thanks

Posted by prafullsabat on March 14, 2012 at 03:27 AM PDT #

hi prafullsabat,

do you see added device from within zone using format?
try "Change Disk Diskovery path" button and enter "/dev/rdsk"

Posted by Roman on March 16, 2012 at 02:56 AM PDT #

Hi Roman,
I'm setting up this on Solaris AMD. I'm trying to set up ASM and database with role seperatation. As per you instruction, 1st step was to Install Oracle binaries only. So for role seperation , I need to install grid software under grid home and database software install under oracle home.
and then invoke asmca from grid hom to configure disk. Am I correct.

Posted by guest on June 21, 2012 at 08:25 AM PDT #

Yes. You may also configure disks with asmca before installing oracle software.

Please note that this post is not valid for 11gR2.
The best way is to check documentation first and consult with Oracle Forums.

Posted by guest on June 27, 2012 at 04:30 AM PDT #

Hi,

When i try to use chown and chmod on the asm disk with root it doesn't change anything

Posted by guest on October 14, 2013 at 11:36 AM PDT #

Can you provide all the steps and output so I can try to help you why it does not change?

Posted by guest on October 22, 2013 at 03:27 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Roman (pomah) Ivanov, ISV Engineering. Tips how to run Oracle best on Sun. Performance monitoring and tuning for system administrators. OpenSolaris user experience.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today