1. 安裝rpmlinux
rpm -ivh kmod-oracleasm-2.0.6.rh1-2.el6.x86_64.rpm oracleasmlib-2.0.4-1.el6.x86_64.rpm oracleasm-support-2.1.8-1.el6.x86_64.rpm oracle
安裝cvuqdisk-1.0.9-1.rpm,位於安裝文件解壓後rpm目錄下cvuqdisk-1.0.9-1.rpmapp
2. 配置asmide
[root@rac1 ~]# /etc/init.d/oracleasm configure學習
Configuring the Oracle ASM library driver.spa
This will configure the on-boot properties of the Oracle ASM libraryrest
driver. The following questions will determine whether the driver isit
loaded on boot and what permissions it will have. The current valuesio
will be shown in brackets ('[]'). Hitting <ENTER> without typing anasm
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