oracle asmilb方式作ASM

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

 

 格式化每一個磁盤

  1. [root@rac1 ~]# fdisk /dev/sdb

  2.  

  3. 完成後咱們經過fdisk -l查看一下

  4. [root@rac1 ~]# fdisk -l

  5.  

  6. [root@rac1 ~]# /usr/sbin/oracleasm configure -i

  7. Default user to own the driver interface []: grid

  8. Default group to own the driver interface []: asmadmin

  9. Start Oracle ASM library driver on boot (y/n) [n]: y

  10. Scan for Oracle ASM disks on boot (y/n) [y]: y

  11.  

  12. [root@rac1 ~]# /etc/init.d/oracleasm createdisk VOL1 /dev/sdb1

  13. [root@rac1 ~]# /etc/init.d/oracleasm createdisk VOL2 /dev/sdc1

  14. [root@rac1 ~]# /etc/init.d/oracleasm createdisk VOL3 /dev/sdd1

  15.  

  16. 如下操做在另外一個節點上進行,RAC2上操做

  17. [root@rac2 ~]# oracleasm scandisks

相關文章
相關標籤/搜索