ASM 安装及创建ASM DISK及ASM DISK查看

来源:互联网 发布:java数组去重复元素 编辑:程序博客网 时间:2024/06/06 17:30

Download the appropriate ASMLib RPMs from OTN. If you are using the UEK the ASMLib kernel module is present already. For RHEL kernel we would need all three of the following:

  • oracleasm-support-2.1.7-1.el5.i386.rpm
  • oracleasmlib-2.0.4-1.el5.i386.rpm
  • oracleasm-[your-kernel-version].rpm

Install the packages using the following command.

rpm -Uvh oracleasm*.rpm

Configure ASMLib using the following command.

# oracleasm configure -iConfiguring the Oracle ASM library driver.This will configure the on-boot properties of the Oracle ASM librarydriver.  The following questions will determine whether the driver isloaded on boot and what permissions it will have.  The current valueswill be shown in brackets ('[]').  Hitting <ENTER> without typing ananswer will keep that current value.  Ctrl-C will abort.Default user to own the driver interface []: oracleDefault group to own the driver interface []: dbaStart Oracle ASM library driver on boot (y/n) [n]: yScan for Oracle ASM disks on boot (y/n) [y]: Writing Oracle ASM library driver configuration: done#

Load the kernel module using the following command.

# /usr/sbin/oracleasm initLoading module "oracleasm": oracleasmMounting ASMlib driver filesystem: /dev/oracleasm# 

If you have any problems, run the following command to make sure you have the correct version of the driver.

# /usr/sbin/oracleasm update-driver

Mark the five shared disks as follows.

# /usr/sbin/oracleasm createdisk DISK1 /dev/sdb1Writing disk header: doneInstantiating disk: done# /usr/sbin/oracleasm createdisk DISK2 /dev/sdc1Writing disk header: doneInstantiating disk: done# /usr/sbin/oracleasm createdisk DISK3 /dev/sdd1Writing disk header: doneInstantiating disk: done# /usr/sbin/oracleasm createdisk DISK4 /dev/sde1Writing disk header: doneInstantiating disk: done# 

It is unnecessary, but we can run the "scandisks" command to refresh the ASM disk configuration.

# /usr/sbin/oracleasm scandisksReloading disk partitions: doneCleaning any stale ASM disks...Scanning system for ASM disks...#

We can see the disk are now visible to ASM using the "listdisks" command.

# /usr/sbin/oracleasm listdisksDISK1DISK2DISK3DISK4#

The shared disks are now configured for the grid infrastructure.