HomePage » Database » Oracle » Oracle10gASM

Oracle Automatic Storage Management

Read:
http://www.oracleadvice.com/10g/10g_ASM.htm
http://www.oracle.com/technology/products/database/asm/index.html

My try on CentOS5.0 64-bit

First, I created these raw devices on my PC with a 20G partition

  lvcreate -L500m -nraw_vol1 /dev/vg0
  lvcreate -L500m -nraw_vol2 /dev/vg0
  lvcreate -l613 -nraw_vol3 /dev/vg0


Then install these Oracle rpms
oracleasm-2.6.18-53.1.4.el5-2.0.4-1.el5.x86_64.rpm
oracleasm-2.6.18-53.1.4.el5debug-2.0.4-1.el5.x86_64.rpm
oracleasm-2.6.18-53.1.4.el5-debuginfo-2.0.4-1.el5.x86_64.rpm
oracleasm-2.6.18-53.1.4.el5xen-2.0.4-1.el5.x86_64.rpm
oracleasmlib-2.0.3-1.el5.x86_64.rpm
oracleasm-support-2.0.4-1.el5.x86_64.rpm


Onto configuring disk group. I use dbca.
ORACLE_SID=+ASM
dbca &
# choose configure ASM
# create a disk group called ASMGROUP1 with all disks


Then run /etc/init.d/oracleasm configure. If you have more than 1 node, run 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  ]


Now create the ASM disks
# /etc/init.d/oracleasm createdisk VOL1 /dev/vg0/raw_vol1
Marking disk "/dev/vg0/raw_vol1" as an ASM disk:           [  OK  ]
# /etc/init.d/oracleasm createdisk VOL2 /dev/vg0/raw_vol2
Marking disk "/dev/vg0/raw_vol2" as an ASM disk:           [  OK  ]
# /etc/init.d/oracleasm createdisk VOL3 /dev/vg0/raw_vol3
Marking disk "/dev/vg0/raw_vol3" as an ASM disk:           [  OK  ]

# /etc/init.d/oracleasm scandisks
Scanning system for ASM disks:                             [  OK  ]
# /etc/init.d/oracleasm listdisks
VOL1
VOL2
VOL3


Onto configuring disk group
ORACLE_SID=+ASM
dbca &
choose configure ASM
create a normal disk group for control & log files 
ASMFILES - VOL1, VOL2
create an external disk group for datafiles
ASMDATA - VOL3


If you have addition disks, create another disk group for flashback recovery.

Migrating existing database to ASM
Launch enterprise manager
choose migrate to asm
in step 2, choose ASMFILES for control files and log files, ASMDATA for tablespace storage & flashback.


Check the log files for migration status. Default log location is in $ORACLE_HOME/dbs/

After the migration is completed, log back into OEM, check the Job Activity log to see if the migration is successful. Mine is! Finally, create a new tablespace on ASM as a test

CREATE SMALLFILE TABLESPACE "DEVDB"
DATAFILE '+ASMDATA/ora10g/datafile/devdb01.dbf'
SIZE 100M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE 1024M


If you ever need to view the "files" in ASM, do
$ ORACLE_SID=+ASM
# asmcmd ls
ASMDATA/
ASMFILES/


asmcmd also supports the followings:
* cd: changes directories within the simulated file structure.
* ls: lists the contents of the current directory.
* pwd: prints the name of the current directory.
* rm: removes a file from the disk group.
* lsdg: lists the disk groups configured in the ASM instance.
* lsct: list connected clients

There are no comments on this page. [Add comment]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki