This example is created based on ASMLib or a bare device.
1. Install the support packages required by asm
A. Download the support package from the Oracle Website: here
B. Download the corresponding asm installation package based on the Linux kernel:
Oracleasm-2.6.18-8.el5-2.0.4-1.el5.i686.rpm
Oracleasm-2.6.18-8.el5PAE-2.0.4-1.el5.i686.rpm
Oracleasm-2.6.18-8.el5xen-2.0.4-1.el5.i686.rpm
Oracleasmlib-2.0.3-1.el5.i386.rpm
Oracleasm-support-2.0.4-1.el5.i386.rpm
C. Install rpm-Uvh ...... -- nodeps
1.1 Install ASMLib
# Cd/orahome/wangnc/asmlib
# Rpm-Uvh oracleasm-support-2.1.3-1.el4.i386.rpm oracleasm-2.6.9-55.ELsmp-2.0.3-1.i686.rpm oracleasmlib-2.0.4-1.el4.i386.rpm
1.2 Configure ASMLib
#/Etc/init. d/oracleasm configure
...
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
Scan for Oracle ASM disks on boot (y/n) [y]: y
...
# Df-ha | grep oracleasm
Oracleasmfs 0 0 0-/dev/oracleasm
The following describes how to enable or disable the Automatic startup of oracleasm:
#/Etc/init. d/oracleasmDisable
#/Etc/init. d/oracleasmEnable
1.3 Physical disk partition
ForASM hardDiskYesPartition(Only one partition,Hard Disks are used hereSDb):
# Fdisk-l | grep Disk
Disk/dev/sda: 250.0 GB, 250059350016 bytes
Disk/dev/sdb: 250.0 GB, 250059350016 bytes
#Fdisk/dev/SDB
Command (m for help ):N
P
Partition number (1-4 ):1
First cylinder (1-30401, default 1 ): <Enter>
Last cylinder or + size or + sizeM or + sizeK (1-30401, default 30401 ): <Enter>
Command (m for help ): W
# Fdisk-l/dev/sdb
Disk/dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Device Boot Start End Blocks Id System
/Dev/sdb1 1 30401 244196001 83 Linux
1.4 Create an ASM Disk
These disks are empty disks that do not contain any content. during creation, the physical disk must contain a partition number, such as sdb1.
The ASM disk name can be uppercase letters, numbers, and underscores (_) and start with a letter:
#/Etc/init. d/oracleasm createdisk VOL1/dev/sdb1
Marking disk "VOL1" as an ASM disk: [OK]
If Failed is prompted, you can track the log:
# Tail-f/var/log/oracleasm
Attached disk deletion statement:
#/Etc/init. d/oracleasm deletedisk VOL1
Check Configuration:
#/Etc/init. d/oracleasm querydisk VOL1
#/Etc/init. d/oracleasm querydisk/dev/sdb1
#/Etc/init. d/oracleasm listdisks
# Ls-l/dev/oracleasm/disks /*
#/Etc/init. d/oracleasm status
1.5 Create initialization parameter file
Note that asm_diskstring must start with 'orcl.
# Su-oracle
$ Export ORACLE_SID = + ASM
$ Vi $ ORACLE_HOME/dbs/init$ ORACLE_SID. Ora
Asm_diskstring = 'orcl: VOL *'
Background_dump_dest = '/u01/app/oracle/admin/+ ASM/bdump'
Core_dump_dest = '/u01/app/oracle/admin/+ ASM/cdump'
User_dump_dest = '/u01/app/oracle/admin/+ ASM/udump'
Instance_type = 'asm'
Large_pool_size = 12 M
Remote_login_passwordfile = 'shared'