How to install and create an ASM disks in Oracle RAC system:-
All the steps mentioned are as per my own test cases.
Pl make sure to test for your own environment:
Download the latest Oracle ASM RPMs from http://otn.oracle.com/tech/linux/asmlib/index.html.
Make sure that you download the right ASM driver for your kernel (UP or SMP).
To install the ASM RPMs on a UP server, run:
su - root
rpm -Uvh oracleasm-2.4.21-EL-1.0.0-1.i686.rpm \
oracleasm-support-1.0.2-1.i386.rpm \
oracleasmlib-1.0.0-1.i386.rpm
To install the ASM RPMs on a SMP server, run:
su - root
rpm -Uvh oracleasm-2.4.21-EL-smp-1.0.0-1.i686.rpm \
oracleasm-support-1.0.2-1.i386.rpm \
oracleasmlib-1.0.0-1.i386.rpm
Configuring and Loading ASM
To load the ASM driver oracleams.o and to mount the ASM driver filesystem, enter:
su - root
# /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 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 []: oinstall
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 ]
Creating ASM Disks
NOTE: Creating ASM disks is done on one RAC node! The following commands should only be executed on one RAC node!
I executed the following commands to create my ASM disks: (make sure to change the device names!)
(In this example I used partitions (/dev/sda2, /dev/sda3, /dev/sda5) instead of whole disks (/dev/sda, /dev/sdb, /dev/sdc,...))
su - root
# /etc/init.d/oracleasm createdisk VOL1 /dev/<sd??>
Marking disk "/dev/sda2" as an ASM disk [ OK ]
# /etc/init.d/oracleasm createdisk VOL2 /dev/<sd??>
Marking disk "/dev/sda3" as an ASM disk [ OK ]
# /etc/init.d/oracleasm createdisk VOL3 /dev/<sd??>
Marking disk "/dev/sda5" as an ASM disk [ OK ]
#
# # Replace "sd??" with the name of your device. I used /dev/sda2, /dev/sda3, and /dev/sda5
To list all ASM disks, enter:
# /etc/init.d/oracleasm listdisks
VOL1
VOL2
VOL3
#
On all other RAC nodes, you just need to notify the system about the new ASM disks:
su - root
# /etc/init.d/oracleasm scandisks
Scanning system for ASM disks [ OK ]
#
All the steps mentioned are as per my own test cases.
Pl make sure to test for your own environment:
Download the latest Oracle ASM RPMs from http://otn.oracle.com/tech/linux/asmlib/index.html.
Make sure that you download the right ASM driver for your kernel (UP or SMP).
To install the ASM RPMs on a UP server, run:
su - root
rpm -Uvh oracleasm-2.4.21-EL-1.0.0-1.i686.rpm \
oracleasm-support-1.0.2-1.i386.rpm \
oracleasmlib-1.0.0-1.i386.rpm
To install the ASM RPMs on a SMP server, run:
su - root
rpm -Uvh oracleasm-2.4.21-EL-smp-1.0.0-1.i686.rpm \
oracleasm-support-1.0.2-1.i386.rpm \
oracleasmlib-1.0.0-1.i386.rpm
Configuring and Loading ASM
To load the ASM driver oracleams.o and to mount the ASM driver filesystem, enter:
su - root
# /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 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 []: oinstall
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
NOTE: Creating ASM disks is done on one RAC node! The following commands should only be executed on one RAC node!
I executed the following commands to create my ASM disks: (make sure to change the device names!)
(In this example I used partitions (/dev/sda2, /dev/sda3, /dev/sda5) instead of whole disks (/dev/sda, /dev/sdb, /dev/sdc,...))
su - root
# /etc/init.d/oracleasm createdisk VOL1 /dev/<sd??>
Marking disk "/dev/sda2" as an ASM disk [ OK ]
# /etc/init.d/oracleasm createdisk VOL2 /dev/<sd??>
Marking disk "/dev/sda3" as an ASM disk [ OK ]
# /etc/init.d/oracleasm createdisk VOL3 /dev/<sd??>
Marking disk "/dev/sda5" as an ASM disk [ OK ]
#
# # Replace "sd??" with the name of your device. I used /dev/sda2, /dev/sda3, and /dev/sda5
To list all ASM disks, enter:
# /etc/init.d/oracleasm listdisks
VOL1
VOL2
VOL3
#
On all other RAC nodes, you just need to notify the system about the new ASM disks:
su - root
# /etc/init.d/oracleasm scandisks
Scanning system for ASM disks [ OK ]
#
No comments:
Post a Comment