eygle.com   eygle.com
eygle.com  
 

« September 3, 2005 | Blog首页 | September 5, 2005 »



September 4, 2005

Oracle 10g Linux ASMLib Install Notes

作者:eygle

出处:http://blog.eygle.com

1.官方下载站点
Oracle ASMLib
如果你的Linux内核不匹配asmlib的版本,你可能需要做适当升级。
我安装用的是Rehat AS4:
[root@danaly ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux AS release 4 (Nahant)

对于Redhat AS4,ASMLib2.0支持两个内核版本:2.6.9-5.0.5和2.6.9-11
我的内核版本升级到2.6.9.-11:
[root@danaly ~]# uname -r
2.6.9-11.ELsmp

下载地址为:
Oracle ASMLib Downloads for Red Hat Enterprise Linux 4 AS
2.安装
Linux内核升级完成以后,可以安装ASMLib2.0
[root@danaly os]# ls -l
total 78808
.....
-rw-r--r--  1 oracle dba    77514 Sep  1 10:46 oracleasm-2.6.9-11.EL-2.0.0-1.i686.rpm
-rw-r--r--  1 oracle dba    75384 Sep  1 10:46 oracleasm-2.6.9-11.ELhugemem-2.0.0-1.i686.rpm
-rw-r--r--  1 oracle dba    78232 Sep  1 10:46 oracleasm-2.6.9-11.ELsmp-2.0.0-1.i686.rpm
-rw-r--r--  1 oracle dba    12785 Sep  1 10:46 oracleasmlib-2.0.0-1.i386.rpm
-rw-r--r--  1 oracle dba    21345 Sep  1 10:46 oracleasm-support-2.0.0-1.i386.rpm
[root@danaly os]# rpm -Uvh oracleasm*
Preparing...                ########################################### [100%]
   1:oracleasm-support      ########################################### [ 20%]
   2:oracleasm-2.6.9-11.ELsm########################################### [ 40%]
   3:oracleasm-2.6.9-11.EL  ########################################### [ 60%]
   4:oracleasm-2.6.9-11.ELhu########################################### [ 80%]
   5:oracleasmlib           ########################################### [100%]


3.配置
指定缺省用户为Oracle,设置DBA组,设置开机加载:
[root@danaly os]# /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
Fix permissions of Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: [  OK  ]
Creating /dev/oracleasm mount point: [  OK  ]
Loading module "oracleasm": [  OK  ]
Mounting ASMlib driver filesystem: [  OK  ]
Scanning system for ASM disks: [  OK  ]

4.启用
[root@danaly cciss]# /etc/init.d/oracleasm enable
Writing Oracle ASM library driver configuration: [  OK  ]
Loading module "oracleasm": [  OK  ]
Mounting ASMlib driver filesystem: [  OK  ]
Scanning system for ASM disks: [  OK  ]

5.创建ASM磁盘分区
[root@danaly cciss]# /etc/init.d/oracleasm createdisk VOL1 /dev/cciss/c0d1p1
Marking disk "/dev/cciss/c0d1p1" as an ASM disk: [  OK  ]
[root@danaly cciss]# /etc/init.d/oracleasm createdisk VOL2 /dev/cciss/c0d1p2
Marking disk "/dev/cciss/c0d1p2" as an ASM disk: [  OK  ]
[root@danaly cciss]# /etc/init.d/oracleasm createdisk VOL3 /dev/cciss/c0d1p3
Marking disk "/dev/cciss/c0d1p3" as an ASM disk: [  OK  ]
[root@danaly cciss]# /etc/init.d/oracleasm createdisk VOL4 /dev/cciss/c0d1p4
Marking disk "/dev/cciss/c0d1p4" as an ASM disk: [  OK  ]

到这里ASM的工作就完成了,这里的磁盘可以被Oracle所使用。
6.其他
可以使用oracleasm来查看ASM磁盘情况.
[root@danaly ~]# /etc/init.d/oracleasm listdisks
VOL1
VOL2
VOL3
VOL4

Oracle提供KFED工具查看ASM磁盘信息,参考:
Using Oracle10g Release 2 KFED tools to view ASM DISK structure
使用oracleasm-discover来探测ASM硬盘:
[root@danaly ~]# oracleasm-discover 
Using ASMLib from /opt/oracle/extapi/32/asm/orcl/1/libasm.so
[ASM Library - Generic Linux, version 2.0.0 (KABI_V2)]
Discovered disk: ORCL:VOL1 [39070048 blocks (20003864576 bytes), maxio 128]
Discovered disk: ORCL:VOL2 [39070080 blocks (20003880960 bytes), maxio 128]
Discovered disk: ORCL:VOL3 [39070080 blocks (20003880960 bytes), maxio 128]
Discovered disk: ORCL:VOL4 [25043040 blocks (12822036480 bytes), maxio 128]

ASM卷设备:
[root@danaly ~]# ls -l /dev/oracleasm/disks/
total 0
brw-rw----  1 oracle dba 104, 17 Sep  3 10:40 VOL1
brw-rw----  1 oracle dba 104, 18 Sep  3 10:40 VOL2
brw-rw----  1 oracle dba 104, 19 Sep  3 10:40 VOL3
brw-rw----  1 oracle dba 104, 20 Sep  3 10:40 VOL4

ASM的使用等,请参考:
How to Use Oracle10g release 2 ASM

Posted by eygle at 10:19 AM | Comments (13)



CopyRight © 2004-2008 eygle.com, All rights reserved.