1、首先添加3块磁盘
2、安装包
[root@myorcl asm]# ls
oracleasm-2.6.18-348.6.1.el5debug-2.0.5-1.el5.i686.rpm
oracleasm-2.6.18-348.6.1.el5PAE-2.0.5-1.el5.i686.rpm
oracleasm-2.6.18-348.6.1.el5xen-2.0.5-1.el5.i686.rpm
oracleasmlib-2.0.4-1.el5.i386.rpm
oracleasm-support-2.1.8-1.el5.i386.rpm
3、查看3块磁盘
[root@myorcl asm]# fdisk -l
Disk /dev/sdb: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table
Disk /dev/sdc: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdc doesn't contain a valid partition table
Disk /dev/sdd: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdd doesn't contain a valid partition table
3、按照下面类似的方法创建分区
root@myorcl asm]# fdisk /dev/sdc
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
The number of cylinders for this disk is set to 2610.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): n
Command action
eextended
pprimary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-2610, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-2610, default 2610):
Using default value 2610
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@myorcl asm]# partprobe /dev/sdb
[root@myorcl asm]# partprobe /dev/sdc
[root@myorcl asm]# partprobe /dev/sdd
[root@myorcl asm]# vi /etc/udev/rules.d/60-raw.rules 添加
ACTION=="add",KERNEL=="sdb1",RUN+="/bin/raw /dev/raw/raw100 %N"
ACTION=="add",KERNEL=="sdc1",RUN+="/bin/raw /dev/raw/raw101 %N"
ACTION=="add",KERNEL=="sdd1",RUN+="/bin/raw /dev/raw/raw102 %N"
[root@myorcl asm]# vi /etc/udev/rules.d/90-raw.rules 添加
KERNEL=="raw10*",OWNER="oracle",GROUP="dba",MODE="0660"--已raw10*的设备属于oracle。
开启start_udev服务
[root@myorcl asm]# start_udev
Starting udev: [OK]
查看权限
[root@myorcl asm]# ll /dev/raw
total 0
crw-rw---- 1 oracle dba 162, 100 Jul5 07:43 raw100
crw-rw---- 1 oracle dba 162, 101 Jul5 07:43 raw101
crw-rw---- 1 oracle dba 162, 102 Jul5 07:43 raw102
4、添加集群就绪服务
[root@myorcl asm]# /u01/app/oracle/product/10.2.0/db_1/bin/localconfig add
/etc/oracle does not exist. Creating it now.
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Configuration for local CSS has been initialized
Adding to inittab
Startup will be queued to init within 90 seconds.
Checking the status of new Oracle init process...
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
myorcl
CSS is active on all nodes.
Oracle CSS service is installed and running under init(1M)
[root@myorcl asm]# oracleasm configure -i
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver.The follo