eygle.com   eygle.com
eygle.com eygle
eygle.com  
 

« How to compile Oracle10g / Oracle11g BBED tools | Blog首页 | 半夜三更 磁盘又坏 »

Oracle 10g Linux ASMLib Install Notes

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

历史上的今天...
    >> 2009-09-04文章:
    >> 2008-09-04文章:
           香港的旺角 梦幻的城市
    >> 2007-09-04文章:
    >> 2006-09-04文章:

无觅

By eygle on 2005-09-04 10:19 | Comments (14) | Oracle12c/11g | 419 |

14 Comments

Eygle你好,

我的linux内核是2.6.9-5EL, 请问如何升级到2.6.9-11

谢谢
Jacky

可以找源码发布包,手工编译升级。

很奇怪, 我重新编译linux-2.6.9-11.EL, 重新起动后为什么hua
huan
kernel-devel-2.6.9-5.EL
kernel-smp-devel-2.6.9-5.EL
kernel-sourcecode-2.6.9-11.EL
kernel-utils-2.4-13.1.48
kernel-hugemem-devel-2.6.9-5.EL
kernel-2.6.9-5.EL

很奇怪为什么重新编译后内核仍是2.6.9-5

kernel-devel-2.6.9-5.EL
kernel-smp-devel-2.6.9-5.EL
kernel-sourcecode-2.6.9-11.EL
kernel-utils-2.4-13.1.48
kernel-hugemem-devel-2.6.9-5.EL
kernel-2.6.9-5.EL

我用的命令是

cd /usr/src/linux-2.6.9-11.EL
make mrproper
cp /boot/config-2.6.9-5.EL .config
make
make modules
make modules_install
make install

请问是哪儿有问题呢?

谢谢

为什么编译后, kernel仍是2.6.9-5EL

Sorry, 我以为没有提交成功, 就再提交了

为什么编译后Linux kernel 仍是2.6.9-5.EL

我执行的步骤:
cd /usr/src/linux-2.6.9-11.EL
make mrproper
cp /boot/config-2.6.9-5.EL .config
make menuconfig (选择.config)
make
make modules
make modules_install
make install

在/etc/grub.conf产生了

title Red Hat Enterprise Linux AS (2.6.9-11.ELcustom)
root (hd0,5)
kernel /vmlinuz-2.6.9-11.ELcustom ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-11.ELcustom.img

然后以Red Hat Enterprise Linux AS (2.6.9-11.ELcustom)启动

执行命令

rpm -qa|grep kernel

kernel-devel-2.6.9-5.EL
kernel-smp-devel-2.6.9-5.EL
kernel-sourcecode-2.6.9-11.EL
kernel-utils-2.4-13.1.48
kernel-hugemem-devel-2.6.9-5.EL
kernel-2.6.9-5.EL

kernel仍是kernel-2.6.9-5.EL

请问我哪一步是错的

谢谢

uname -a 看一下

谢谢

uname -a

结果是2.6.9-11
... 2.6.9-11.ELcustom ...

但是我还是不能用oracleasm-2.6.9-11.EL, 说不能load module.

rpm -qa的结果只是说明系统中安装了这些包。

uname显示的是系统加载的版本号,如果asm还是有问题,要看一下具体的错误,可能是ASM的问题。

我使用了下面三个包

oracleasm-2.6.9-11.EL-2.0.3-1.i686.rpm
oracleasmlib-2.0.2-1.i386.rpm
oracleasm-support-2.0.3-1.i386.rpm

好象oracleasmlib-2.0.2版本,其他是2.0.3版本

但是http://www.oracle.com/technology/software/tech/linux/asmlib/rhel4.html网站是这样的

具体错误和常见的错误一样,
cannot load oracleasm module

在/var/log/messages也是类似的错误

谢谢 这么晚了

难道是2.6.9-11.ELcustom 要改成2.6.9-11.EL

原来2.6.9-11.ELcustom改成2.6.9-11.EL这样就可以了,很奇怪.

这两者可能有些区别。

对于第2步,应该说明先安装所依赖的包oracleasm-support-2.0.0-1.i386.rpm
再装其他包。
否则会报错:
error: Failed dependencies:
oracleasm-support >= 2.0.0 is needed by oracleasm.....


CopyRight © 2004~2020 云和恩墨,成就未来!, All rights reserved.
数据恢复·紧急救援·性能优化 云和恩墨 24x7 热线电话:400-600-8755 业务咨询:010-59007017-7040 or 7037 业务合作: marketing@enmotech.com