1. 安装rpm
rpm -ivh kmod-oracleasm-2.0.6.rh2-2.el6.x86_64.rpm oracleasmlib-2.0.4-1.el6.x86_64.rpm oracleasm-support-2.1.8-1.el6.x86_64.rpm
安装cvuqdisk-1.0.9-1.rpm,位于安装文件解压后rpm目录下cvuqdisk-1.0.9-1.rpm
2. 配置asm
[root@rac1 ~]# /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 []: grid
Default group to own the driver interface []: asmadmin
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [ OK ]
Scanning the system for Oracle ASMLib disks: [ OK ]
3. 标记磁盘,只在一个节点执行
[root@rac1 ~]# /usr/sbin/oracleasm createdisk VOL1 /dev/mapper/mpathap1(/dev/sdb1)
[root@rac1 ~]# /usr/sbin/oracleasm listdisks
VOL1
4. 其他节点扫描磁盘
[root@rac2 oracle]# /usr/sbin/oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
Instantiating disk "VOL1"
[root@rac2 oracle]# /usr/sbin/oracleasm listdisks
VOL1
5. MPIO特殊配置
如果使用了linux自带的mpio,所有节点需要如下修改:
编辑/etc/sysconfig/oracleasm
修改ORACLEASM_SCANORDER=""为ORACLEASM_SCANORDER="dm"
重启asm服务
[root@rac1 etc]# /etc/init.d/oracleasm restart
#####/etc/init.d/oracleasm deletedisk VOL1(学习用,安装过程不使用)
重新激活磁盘modprobe –r lpfc
Modprobe lpfc
格式化每个磁盘
[root@rac1 ~]# fdisk /dev/sdb
完成后我们通过fdisk -l查看一下
[root@rac1 ~]# fdisk -l
[root@rac1 ~]# /usr/sbin/oracleasm configure -i
Default user to own the driver interface []: grid
Default group to own the driver interface []: asmadmin
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
[root@rac1 ~]# /etc/init.d/oracleasm createdisk VOL1 /dev/sdb1
[root@rac1 ~]# /etc/init.d/oracleasm createdisk VOL2 /dev/sdc1
[root@rac1 ~]# /etc/init.d/oracleasm createdisk VOL3 /dev/sdd1
以下操作在另一个节点上进行,RAC2上操作
[root@rac2 ~]# oracleasm scandisks