##### [100%]
[root@wwl asmpark]# rpm -ivh oracleasmlib-2.0.4-1.el5.i386.rpm
warning: oracleasmlib-2.0.4-1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing... ? ? ? ? ? ? ? ?########################################### [100%]
? ?1:oracleasmlib ? ? ? ? ? ########################################### [100%]
[root@wwl asmpark]#
?
5、 ?好了,现在ASM相关包已经安装完成,现在来开始创建用于ASM的磁盘分区(不是一定要做,裸盘也可以做ASM)
?
[root@wwl asmpark]# fdisk -l
Disk /dev/sda: 16.1 GB, 16106127360 bytes
255 heads, 63 sectors/track, 1958 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
? ?Device Boot ? ? ?Start ? ? ? ? End ? ? ?Blocks ? Id ?System
/dev/sda1 ? * ? ? ? ? ? 1 ? ? ? ? ?13 ? ? ?104391 ? 83 ?Linux
/dev/sda2 ? ? ? ? ? ? ?14 ? ? ? ?1958 ? ?15623212+ ?8e ?Linux LVM
Disk /dev/sdb: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table
Disk /dev/sdc: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdc doesn't contain a valid partition table
[root@wwl asmpark]#
?
我们从上图可以看出系统中有两块空闲的磁盘没有使用,我们首先需要对磁盘创建分区,但不能格式化,命令如下:
fdisk /dev/sdb /n/p/1/回车/回车/w
fdisk /dev/sdc /n/p/1/回车/回车/w
如下就已经创建好了分区:
?
[root@wwl asmpark]# fdisk -l
Disk /dev/sda: 16.1 GB, 16106127360 bytes
255 heads, 63 sectors/track, 1958 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
? ?Device Boot ? ? ?Start ? ? ? ? End ? ? ?Blocks ? Id ?System
/dev/sda1 ? * ? ? ? ? ? 1 ? ? ? ? ?13 ? ? ?104391 ? 83 ?Linux
/dev/sda2 ? ? ? ? ? ? ?14 ? ? ? ?1958 ? ?15623212+ ?8e ?Linux LVM
Disk /dev/sdb: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
? ?Device Boot ? ? ?Start ? ? ? ? End ? ? ?Blocks ? Id ?System
/dev/sdb1 ? ? ? ? ? ? ? 1 ? ? ? ?1305 ? ?10482381 ? 83 ?Linux
Disk /dev/sdc: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
? ?Device Boot ? ? ?Start ? ? ? ? End ? ? ?Blocks ? Id ?System
/dev/sdc1 ? ? ? ? ? ? ? 1 ? ? ? ?1305 ? ?10482381 ? 83 ?Linux
?
二、ASM配置
?
以上已将准备环境准备好,下一步骤就是开始配置了,这里面配置包括如下几个步骤
?
开始创建ASM实例,创建ASM实例的方式有两种,一种是通过命令行,还有一种是通过图形界面,执行DBCA后有一步是创建ASM实例,图形界面实在太简单了,跟创建DB是一样的,在这里就不累赘了。
?
在使用ASM之前首先要配置ASMLib驱动程序,如下:
我们首先可以看下asm的配置工具 oracleasm的语法和功能,如下:
?[root@wwl asmpark]# /etc/init.d/oracleasm --help
Usage: /etc/init.d/oracleasm {start|stop|restart|enable|disable|configure|createdisk|deletedisk|querydisk|listdisks|scandisks|status}
[root@wwl asmpark]#
?
1、开始配置ASMLib:
?[root@wwl asmpark]# /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 without typing an
answer will keep that current value. ?Ctrl-C will abort.
Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
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 O