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 ...
随机推荐
- SpringBoot 为API添加统一的异常处理(一)
首先我把异常分为两种,一种是可控制的,或者是由我们发现条件不正确主动抛出的异常,就像前城市编号不存在那个粟子:另一种是不可控制的,或者说是程序存在bug引起的异常,但这种异常也不想变态的就直接给前端抛 ...
- springboot项目使用 apollo 配置中心
1. 引入 apollo 配置依赖 <dependency> <groupId>com.ctrip.framework.apollo</groupId> <a ...
- Java基础 awt Frame 设置窗体的大小 位置 可见性
JDK :OpenJDK-11 OS :CentOS 7.6.1810 IDE :Eclipse 2019‑03 typesetting :Markdown code ...
- Chrome禁用software_reporter_tool
今天开机后,从几分钟到半个小时之间,感觉机器反应有些慢,发现CPU占用80-90%.查看任务管理器, 有一个 software_reporter_tool.exe 的程序占用了一半的CPU使用率. 转 ...
- laravel5.8ajax请求auth认证返回302的解决方法。
注册 /app/Http/Controller/Auth/RegisterController.php <?php namespace App\Http\Controllers\Auth; us ...
- TransactionScope处理分布式事物时提示"事务已被隐式或显式提交,或已终止"
在连接字符串中加入"Enlist=false",问题就这样解决了. ConnectionString = "Data Source=.;Initial Catalog=c ...
- Golang 连接ActiveMQ
使用ActiveMQ库:github.com/go-stomp/stomp 示例代码 package main import ( "net" "fmt" &qu ...
- 《设计模式》读懂UML类图
一.类中的主要关系 继承.实现.组合.聚合.依赖.关联 二.UML类图 三.代码实现 public class H2O { } public class O2 { } public interface ...
- Embarcadero Delphi 7 Lite 7.0.4.453 中文版
https://www.7down.com/soft/116014.html 软件介绍 Embarcadero Delphi 7精简版 是Windows平台下著名的快速应用程序开发工具(Rapid A ...
- Intellij IDEA设置类注释和方法注释
背景:工欲善其事必先利其器,如果不能把工具用熟练了, 感觉很是别扭. 参考:IntelliJ IDEA设置类注释和方法注释 IntelliJ IDEA 中创建类的时候,可以直接自动给类加注释的设置,以 ...