Thursday, September 26, 2013

How to Configure Oracle ASM for RAC Virtual Servers

Information about How to Configure Oracle ASM for Database Servers.
This document describes how to configure Linux Oracle RAC servers with ASM (Automatic Storage Management).
You must complete the Prepare Linux Virtual Servers for Oracle RAC first and have the DBA install the Oracle Software before performing the tasks described here.

Document Creator
Todd Walters  06/03/2009
Requirements
All these Sections must be complete before Configuring ASM on RAC Virtual Servers:

Pre-Installation Guides
  1. How to Install Linux Oracle RAC Virtual Server
  2. Prepare Linux Virtual Servers for Oracle RAC
  3. Prepare Linux Physical Servers for Oracle RAC
  4. How To Configure Oracle RAC OCR and Voting Disks
Oracle Software Installation Guide
  1. Prepare Linux Environment for GUI Access for Oracle Installation
Overview
  • Oracle ASM Disks on Virtual Servers are assigned device labels beginning with /dev/sdg
  • Default is to have 5 ASM Virtual Shared Disks: eg: /dev/sdg to /dev/sdk
  • ASM Disk names are asm1.vmdk, asm2.vmdk,etc..
  • Oracle OCR and Voting Disks are /dev/sdb to /dev/sdf
  • All OCR, Voting, and ASM drives are configured as Virtual Shared Storage on ESXi Datastore:
    • i.e. PowerVault, Raid Storage, NAS, etc...
  • All of these drives should have 1 (one) Partition on them. This should have been done during the RAC Environment Preparation Prepare Linux Virtual Environment for Oracle Installation
  • To create the ASM Disks and mark them for ASM you have to run the oracleasm command in init.d.
How to Create Oracle ASM Disks on Virtual Servers 
  1. Enable ASM on Node 1 first:
    • [root@csrv0dbxd11 init.d]# ./oracleasm enable
      Writing Oracle ASM library driver configuration:       [  OK  ]
      Loading module "oracleasm":                                [  OK  ]
      Mounting ASMlib driver filesystem:                        [  OK  ]
      Scanning system for ASM disks:                           [  OK  ]
  2. Verify ASM Disks are listed
    • [root@csrv0dbxd11 ~]# fdisk -l | grep '/dev/sd[g-k]'
      Disk /dev/sdg: 5368 MB, 5368709120 bytes
      /dev/sdg1               1         652     5237158+  83  Linux
      Disk /dev/sdh: 5368 MB, 5368709120 bytes
      /dev/sdh1               1         652     5237158+  83  Linux
      Disk /dev/sdi: 5368 MB, 5368709120 bytes
      /dev/sdi1               1         652     5237158+  83  Linux
      Disk /dev/sdj: 5368 MB, 5368709120 bytes
      /dev/sdj1               1         652     5237158+  83  Linux
      Disk /dev/sdk: 5368 MB, 5368709120 bytes
      /dev/sdk1               1         652     5237158+  83  Linux
  3. Change directory to /etc/init.d
    • [root@csrv0dbxd11 ~]# cd /etc/init.d
  4. ASM Naming Convention will be L_ASM# where:
    • G = Device letter, i.e /dev/sdg
    • ASM# = ASM1 which should be /dev/sdg
    • so first ASM Disk would be G_ASM1
  5. Create ASM Disks using oracleasm createdisk Command:
    • syntax: ./oracleasm createdisk ASM-DiskName Path-To-ASM-Disk-Device
    • [root@csrv0dbxd11 init.d]# ./oracleasm createdisk G_ASM1 /dev/sdg1
      Marking disk "/dev/sdg1" as an ASM disk:
    • [root@csrv0dbxd11 init.d]# ./oracleasm createdisk H_ASM2 /dev/sdh1
      Marking disk "/dev/sdh1" as an ASM disk:
    • [root@csrv0dbxd11 init.d]# ./oracleasm createdisk I_ASM3 /dev/sdi1
      Marking disk "/dev/sdi1" as an ASM disk:
    •  [root@csrv0dbxd11 init.d]# ./oracleasm createdisk J_ASM4 /dev/sdj1
      Marking disk "/dev/sdj1" as an ASM disk:
    • [root@csrv0dbxd11 init.d]# ./oracleasm createdisk K_ASM5 /dev/sdk1
      Marking disk "/dev/sdk1" as an ASM disk:
  6. List ASM Disks
    • [root@csrv0dbxd11 init.d]# ./oracleasm listdisks
      G_ASM1
      H_ASM2
      I_ASM3
      J_ASM4
      K_ASM5
  7. Configure ASM
    • [root@csrv0dbxd11 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) [y]:
      yFix permissions of Oracle ASM disks on boot (y/n) [y]: y
      Writing Oracle ASM library driver configuration:           [ 
      OK  ]
      Scanning system for ASM disks:                             [ 
      OK  ]
  8. Run /etc/init.d/oracleasm scandisks to rescan for ASM.
  9. Continue on to How to Install Oracle 10gR4 ASM Instance or Go back to Linux Oracle RAC Installation Guide
     


No comments:

Post a Comment