ORACLE ASMLIB
ORACLE ASMLIB
This blog post is more of a note for myself on configuring ASMLib.
ASMLib is an optional utility that can be used on Linux systems to manage Oracle ASM devices.
ASMLib consists of the following components:
An open source (GPL) kernel module package: kmod-oracleasm
An open source (GPL) utilities package: oracleasm-support
A closed source (proprietary) library package: oracleasmlib
On my Oracle VMBox, I performed the below steps –
1. Check the installed packages related to oracleasm
[root@oel67-12c dev]# rpm -qa | grep oracleasm
[root@oel67-12c dev]#
2. As no rpm were installed, I started installing the packages
[root@oel67-12c dev]# yum install oracleasm-support
Loaded plugins: refresh-packagekit, security, ulninfo
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package oracleasm-support.x86_64 0:2.1.8-1.el6 will be installed
--> Finished Dependency Resolution
..........................
Installed:
oracleasm-support.x86_64 0:2.1.8-1.el6 Complete!
[root@oel67-12c dev]#
[root@oel67-12c dev]# yum install kmod-oracleasm
Loaded plugins: refresh-packagekit, security, ulninfo
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package kmod-oracleasm.x86_64 0:2.0.8-13.el6_8 will be installed
--> Processing Dependency: kernel >= 2.6.32-642.el6 for package: kmod-oracleasm-2.0.8-13.el6_8.x86_64 ...........................
Is this ok [y/N]: y
Downloading Packages:
(1/2): kernel-2.6.32-642.el6.x86_64.rpm
(2/2): kmod-oracleasm-2.0.8-13.el6_8.x86_64.rpm ........................... Installed:
kmod-oracleasm.x86_64 0:2.0.8-13.el6_8 Dependency Installed:
kernel.x86_64 0:2.6.32-642.el6 Complete!
[root@oel67-12c dev]#
3. Download the oracleasmlib rpm from http://www.oracle.com/technetwork/server-storage/linux/asmlib/rhel6-1940776.html and install it. Without this RPM, you will not have the oracleasm-discover executable
[root@oel67-12c dev]# ls -lrt /media/sf_12cR1/oracleasmlib*
-rwxrwx--- 1 root vboxsf 13336 May 18 21:44 oracleasmlib-2.0.12-1.el6.x86_64.rpm [root@oel67-12c sf_12cR1]# rpm -ihv oracleasmlib-2.0.12-1.el6.x86_64.rpm
Preparing... ########################################### [100%]
1:oracleasmlib ########################################### [100%]
[root@oel67-12c sf_12cR1]#
4. Verify all the components are installed
[root@oel67-12c sf_12cR1]# rpm -qa | grep oracleasm
oracleasm-support-2.1.8-1.el6.x86_64
oracleasmlib-2.0.12-1.el6.x86_64
kmod-oracleasm-2.0.8-13.el6_8.x86_64
[root@oel67-12c sf_12cR1]# cd
[root@oel67-12c ~]# which oracleasm
/usr/sbin/oracleasm
[root@oel67-12c ~]#
5. Configure oracleasm — will configure the on-boot properties of the Oracle ASM library driver as well as set the appropriate file permissions.
[root@oel67-12c dev]# oracleasm configure -i
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 []: oinstall
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
[root@oel67-12c dev]#
The configuration setting done above, can be checked in /etc/sysconfig/oracleasm
[root@oel67-12c dev]# ls -lrt /etc/sysconfig/oracleasm
lrwxrwxrwx 1 root root 24 May 18 22:02 /etc/sysconfig/oracleasm -> oracleasm-_dev_oracleasm
6. Check the status
[root@oel67-12c ~]# oracleasm status
Checking if ASM is loaded: no
Checking if /dev/oracleasm is mounted: no
[root@oel67-12c ~]#
7. Load oracleasm module with the init command
[root@oel67-12c ~]# oracleasm init
Creating /dev/oracleasm mount point: /dev/oracleasm
Loading module "oracleasm": oracleasm
Configuring "oracleasm" to use device physical block size
Mounting ASMlib driver filesystem: /dev/oracleasm
[root@oel67-12c ~]#
8. Verify the oracleasm configuration
a. Perform ‘df –ha’, this should show you that /dev/oracleasmfs is mounted.
[root@oel67-12c ~]# df -ha
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_oel6712c-lv_root
45G 7.4G 36G 18% /
....................
oracleasmfs 0 0 0 - /dev/oracleasm
b. Execute the ‘lsmod’ command, to show the loaded oracleasm module.
[root@oel67-12c ~]# lsmod | grep oracleasm
Module Size Used by
oracleasm 53591 1
9. Create the partition on disk , if not already done
[root@oel67-12c oracleasm]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 50G 0 disk
├─sda1 8:1 0 500M 0 part /boot
└─sda2 8:2 0 49.5G 0 part
├─vg_oel6712c-lv_root (dm-0) 252:0 0 45.6G 0 lvm /
└─vg_oel6712c-lv_swap (dm-1) 252:1 0 3.9G 0 lvm [SWAP]
sdb 8:16 0 10G 0 disk
sdc 8:32 0 12G 0 disk
sdd 8:48 0 12G 0 disk
sde 8:64 0 10G 0 disk
sdf 8:80 0 12G 0 disk
sr0 11:0 1 55.5M 0 rom /media/VBOXADDITIONS_5.0.20_106931 [root@oel67-12c disks]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x50e6a869.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable. Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u'). Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4):
Value out of range.
Partition number (1-4): 1
First cylinder (1-1305, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-1305, default 1305):
Using default value 1305 Command (m for help): w
The partition table has been altered! Calling ioctl() to re-read partition table.
Syncing disks.
[root@oel67-12c disks]#
[root@oel67-12c disks]#
[root@oel67-12c disks]#
[root@oel67-12c disks]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 50G 0 disk
├─sda1 8:1 0 500M 0 part /boot
└─sda2 8:2 0 49.5G 0 part
├─vg_oel6712c-lv_root (dm-0) 252:0 0 45.6G 0 lvm /
└─vg_oel6712c-lv_swap (dm-1) 252:1 0 3.9G 0 lvm [SWAP]
sdb 8:16 0 10G 0 disk
└─sdb1 8:17 0 10G 0 part
sdc 8:32 0 12G 0 disk
sdd 8:48 0 12G 0 disk
sde 8:64 0 10G 0 disk
sdf 8:80 0 12G 0 disk
sr0 11:0 1 55.5M 0 rom /media/VBOXADDITIONS_5.0.20_106931
Perform the same above steps for remaining disk.
10. Once the disk are created, label the disks as ASM disks and give then an ASM name.
[root@oel67-12c disks]# oracleasm createdisk data0101 /dev/sdb1
Writing disk header: done
Instantiating disk: done
[root@oel67-12c disks]# oracleasm createdisk data0102 /dev/sde1
Writing disk header: done
Instantiating disk: done
[root@oel67-12c disks]# ls -lrt
total 0
brw-rw---- 1 oracle oinstall 8, 17 May 18 22:49 DATA0101
brw-rw---- 1 oracle oinstall 8, 65 May 18 22:50 DATA0102
11. Check the configured disk using listdisks
[root@oel67-12c disks]# oracleasm listdisks
DATA0101
12. You can query the disk to check if its a valid ASM Disk
[root@oel67-12c disks]# oracleasm querydisk -d DATA0101
Disk "DATA0101" is a valid ASM disk on device [8,17] [root@oel67-12c disks]# more /proc/partitions
major minor #blocks name
8 17 10482381 sdb1 [root@oel67-12c sbin]# blkid|grep asm
/dev/sdb1: LABEL="DATA0101" TYPE="oracleasm"
/dev/sde1: LABEL="DATA0102" TYPE="oracleasm"
[root@oel67-12c sbin]#
The [8,17] is the major,minor number of the device with this partition. The value comes from /proc/partitions
major — The major number of the device with this partition. The major number in the /proc/partitions, (3), corresponds with the block device ide0, in /proc/devices.
minor — The minor number of the device with this partition. This serves to separate the partitions into different physical devices and relates to the number at the end of the name of the partition.
#blocks — Lists the number of physical disk blocks contained in a particular partition.
name — The name of the partition.
13. oracleasm-discover
[root@oel67-12c sbin]# oracleasm-discover
-bash: /usr/sbin/oracleasm-discover: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
For the above error install/lib/ld-linux.so.2
[root@oel67-12c ~]# yum install /lib/ld-linux.so.2
Loaded plugins: refresh-packagekit, security, ulninfo
Setting up Install Process
public_ol6_latest/filelists | 61 MB 00:43
Resolving Dependencies
--> Running transaction check
---> Package glibc.i686 0:2.12-1.192.el6 will be installed
Dependencies Resolved ..................
Complete!
[root@oel67-12c ~]# [root@oel67-12c ~]# ls -lrt /lib/ld-linux.so.2
lrwxrwxrwx 1 root root 10 May 18 23:25 /lib/ld-linux.so.2 -> ld-2.12.so
[root@oel67-12c ~]#
[root@oel67-12c ~]# oracleasm-discover
Using ASMLib from /opt/oracle/extapi/32/asm/orcl/1/libasm.so
[ASM Library - Generic Linux, version 2.0.4 (KABI_V2)]
Discovered disk: ORCL:DATA0101 [20964762 blocks (10733958144 bytes), maxio 512]
Discovered disk: ORCL:DATA0102 [20964762 blocks (10733958144 bytes), maxio 512]
[root@oel67-12c ~]#
ORACLE ASMLIB的更多相关文章
- 用asmlib方式创建oracle集群ASM磁盘(oracleasm)
创建asm磁盘的几种方式 创建asm方式很多主要有以下几种 1.Faking方式 2.裸设备方式 3.udev方式(它下面有两种方式) 3.1 uuid方式 3.2 raw方式(裸设备方式) 4.as ...
- 转:ORA-15186: ASMLIB error function = [asm_open], error = [1], 2009-05-24 13:57:38
转:ORA-15186: ASMLIB error function = [asm_open], error = [1], 2009-05-24 13:57:38http://space.itpub. ...
- asmlib
http://pandarabbit.blog.163.com/blog/static/209284144201292293642857/ centos6.5桌面2.6.32yum install k ...
- linux安装oracle 11g rac
安装oracle 11gR2 RAC 一.网络规划及安装虚拟主机 主机名 主机版本 Ip rac1.localdomain Redhat 6.5 RAC节点1 192.168.100.11 rac2. ...
- 使用裸设备配置Oracle ASM实例一例
1.查看当前磁盘 [root@std u01]# fdisk -l Disk /dev/sda: bytes heads, sectors/track, cylinders Units = cylin ...
- 基于CentOS与VmwareStation10搭建Oracle11G RAC 64集群环境:4.安装Oracle RAC FAQ-4.2.Oracleasm Createdisk ASM磁盘失败:Instantiating disk: failed
1.错误信息:Instantiating disk: failed [root@linuxrac1 /]# /usr/sbin/oracleasm createdisk OCR_VOTE /dev/s ...
- Oracle asm介绍和安装linux+oracle10g+asm过程
Oracle asm介绍和安装linux5.2+oracle10g+asm过程 1)ASM(自动存储管理)的来由: ASM是Oracle 10g R2中为了简化Oracle数据库的管理而推出来 ...
- 【Oracle】RAC添加新节点
RAC添加节点: 环境: OS:OEL5.6 RAC:10.2.0.1.0 原有rac1,rac2两个节点.如今要添加rac3节点: 操作过程: 改动三个节点上的/etc/hosts文件 192.16 ...
- OCA读书笔记(2) - 安装Oracle软件
Objectives: •Describe your role as a database administrator (DBA) and explain typical tasks and tool ...
随机推荐
- tomcat高并发优化的参数优化并查看tomcat线程数
在Tomcat配置文件conf下面 server.xml 中的配置中和连接数相关的参数有: minProcessors:最小空闲连接线程数,用于提高系统处理性能,默认值为10 maxProcessor ...
- snf快速开发平台试用演示地址
BS演示地址: http://49.4.68.200:65432 administrator / Administrator snf-cs试用版本下载地址:https://pan.baid ...
- ES6 - 函数扩展(函数参数默认值)
函数参数默认值 ES6 之前,不能直接为函数的参数指定默认值,只能采用变通的方法. function log(x, y) { y = y || 'World'; console.log(x, y); ...
- 使用CompletableFuture实现业务服务的异步调用实战代码
假如我有一个订单相关的统计接口,需要返回3样数据:今日订单数.今日交易额.总交易额. 一般的我们的做法是串行调用3个函数,把调用返回的结果返回给调用者,这3次调用时串行执行的,如果每个调用耗时1秒的话 ...
- 修改Linux系统时间EDT改为CST
今天发现一台服务器时间比北京时间慢 12 个小时,使用 date 命令后发现是: 2019年 06月 04日 星期二 21:50:33 EDT EDT 时间即美国东部时间.这里要改为北京时间即可: m ...
- 模态窗口showModalDialog的浏览器兼容解决方案【改】
将代码中原来的 window.showModalDialog 全部替换成: showModalDialogN 然后增加方法: function showModalDialogN(uri, args, ...
- Automl基于超大数据下的数据分发方案探讨
先定义几个关键字: 任务:用户一次上传的数据集并发起的automl任务,比如一次ocr任务,一次图像分类任务. 模型:一次任务中,需要运行的多个模型,比如ocr任务,需要ctpn模型,需要crnn模型 ...
- c++ 二进制方式读取文件 读取特殊类型数据
#include <iostream> #include <fstream> using namespace std; /* 二进制方式进行读写文件,可以读写 各种各样数据类型 ...
- ABAP基础篇2 数据类型
基本数据类型列表: 1.长度可变的内置类型(String.XString)1)string类型 在ABAP程序中,string类型是长度无限的字符型字段,可以和CHAR ,D,T ,I,N (F和P未 ...
- Golang 连接ActiveMQ
使用ActiveMQ库:github.com/go-stomp/stomp 示例代码 package main import ( "net" "fmt" &qu ...