oracle asmlib固化磁盘

来源:互联网 发布:桌面摆件 知乎 编辑:程序博客网 时间:2024/05/01 08:15

本地环境:

[root@node2 ~]# uname -r2.6.32-504.el6.x86_64[root@node2 ~]# cat /etc/redhat-release CentOS release 6.6 (Final)

oracle版本 :
oracle11gr2 11.2.0.4.0

在安装oracle11gr2(11.2),在配置共享存储的时候需要固化磁盘。为此oracle推荐使用asmlib来实现这个功能。

1 . 下载asmlib软件包
需要安装3个rpm包, ‘kmod-oracleasm’,’oracleasmlib’ and ‘oracleasm-support’ ,可以到oracle官网下载 http://www.oracle.com/technetwork/server-storage/linux/asmlib/rhel6-1940776.html ,需要注意的是在rhel 6.6 oracle不在提供kmod-oracleasm包,需要到redhat官网去下载。
具体下载方法请参考http://blog.csdn.net/a743044559/article/details/78122607。

2 .安装(每个节点都需要安装)

[root@node1 home]# rpm -ivh oracleasm-support-2.1.8-1.el5.x86_64.rpm warning: oracleasm-support-2.1.8-1.el5.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 1e5e0159: NOKEYPreparing...                ########################################### [100%]   1:oracleasm-support      ########################################### [100%][root@node1 home]# rpm -ivh kmod-oracleasm-2.0.8-4.el6_6.x86_64.rpm warning: kmod-oracleasm-2.0.8-4.el6_6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEYPreparing...                ########################################### [100%]   1:kmod-oracleasm         ########################################### [100%][root@node1 home]# uname -r 2.6.32-504.el6.x86_64[root@node1 home]# rpm -ivh oracleasmlib-2.0.12-1.el6.x86_64.rpm warning: oracleasmlib-2.0.12-1.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEYPreparing...                ########################################### [100%]   1:oracleasmlib           ########################################### [100%]

3 . 配置(每个节点都需要配置)

[root@node1 home]# oracleasm --helpUsage: oracleasm [--exec-path=<exec_path>] <command> [ <args> ]       oracleasm --exec-path       oracleasm -h       oracleasm -VThe basic oracleasm commands are:    configure        Configure the Oracle Linux ASMLib driver    init             Load and initialize the ASMLib driver    exit             Stop the ASMLib driver    scandisks        Scan the system for Oracle ASMLib disks    status           Display the status of the Oracle ASMLib driver    listdisks        List known Oracle ASMLib disks    querydisk        Determine if a disk belongs to Oracle ASMlib    createdisk       Allocate a device for Oracle ASMLib use    deletedisk       Return a device to the operating system    renamedisk       Change the label of an Oracle ASMlib disk    update-driver    Download the latest ASMLib driver
[root@node1 home]# /etc/init.d/oracleasm configureConfiguring 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 []: gridDefault group to own the driver interface []: oinstallStart 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: doneInitializing the Oracle ASMLib driver: [  OK  ]Scanning the system for Oracle ASMLib disks: [  OK  ]

4 . 初始化(只需要在一个节点初始化)

格式化磁盘分区(oracleasm 只能固化磁盘分区),可以通过查看/var/log/oracleasm日志来查看固化过程。

[root@node1 home]# /etc/init.d/oracleasm createdisk VOL1 /dev/sdb1
Marking disk “VOL1” as an ASM disk: [ OK ]

在第一个节点创建磁盘固化完毕之后,在第二个节点 /etc/init.d/oracleasm scandisks 来搜索asmdisk,然后可以通过/etc/init.d/oracleasm listdisks 来查询固化后的磁盘。

原创粉丝点击