http://pandarabbit.blog.163.com/blog/static/209284144201292293642857/

centos6.5桌面2.6.32
yum install kmod-oracleasm

其实就是安装三个包,内核驱动也就是上面的包是基础,在官方网站可以下载oracleasm-support、oracleasmlib这两个包。

http://www.oracle.com/technetwork/server-storage/linux/downloads/index.html
这个页面最下面
For Database Administrators
ASMLib: Linux Drivers for Automatic Storage Management

http://www.oracle.com/technetwork/server-storage/linux/asmlib/index-101839.html

http://oss.oracle.com/projects/oracleasm-support/dist/files/RPMS/rhel6/amd64/2.1.8/oracleasm-support-2.1.8-1.el6.x86_64.rpm
http://download.oracle.com/otn_software/asmlib/oracleasmlib-2.0.4-1.el6.x86_64.rpm

点开页面的上方可以看到Library and Tools
这里可以下载oracleasm-support、oracleasmlib

下面接着是Drivers for kernel N多版本的oracleasm安装包
使用uname -a判断系统内核的版本号

使用root用户安装,这三个包之间有依赖关系,安装顺序如下:
rpm -ivh oracleasm-support
rpm -ivh oracleasm
rpm -ivh oracleasmlib

root用户使用以下命令配置ASM:
/etc/init.d/oracleasm configure

注意:直接使用oracleasm configure是不能配置ASM的!

[root@oracle ~]# /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 <ENTER> 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) [y]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [ OK ]
Scanning the system for Oracle ASMLib disks: [ OK ]

[root@oracle ~]# lsmod |grep asm
oracleasm 54265 1

[root@oracle ~]# oracleasm configure
ORACLEASM_ENABLED=true
ORACLEASM_UID=oracle
ORACLEASM_GID=dba
ORACLEASM_SCANBOOT=true
ORACLEASM_SCANORDER=""
ORACLEASM_SCANEXCLUDE=""
ORACLEASM_USE_LOGICAL_BLOCK_SIZE="false"

[root@oracle log]# useradd oracle

[root@oracle log]# groupadd dba
[root@oracle log]# usermod -G dba oracle
[root@oracle log]# id oracle
uid=500(oracle) gid=500(oracle) groups=500(oracle),501(dba)

事先还要准备空分区或磁盘供oracleasm调用。只有先创建相关用户后,下面的创建磁盘才会ok

[root@oracle log]# /etc/init.d/oracleasm createdisk hh /dev/sdb1
Marking disk "hh" as an ASM disk: [ OK ]

报错日志可以看下面这个文件。

[root@oracle log]# cat /var/log/oracleasm

准备空盘或分区

fdisk /dev/sdb,分两个区

Device Boot Start End Blocks Id System
/dev/sdb1 1 262 2104483+ 83 Linux
/dev/sdb2 263 524 2104515 83 Linux

创建asm磁盘
[root@oracle log]# oracleasm createdisk aa /dev/sdb1
Writing disk header: done
Instantiating disk: done
[root@oracle log]# /etc/init.d/oracleasm createdisk bb /dev/sdb2
Marking disk "bb" as an ASM disk: [ OK ]

==============================================================

20171030书写

[root@rac01 ~]# rpm -qa|grep oracleasm
oracleasm-support-2.1.8-1.el6.x86_64
oracleasmlib-2.0.4-1.el6.x86_64
kmod-oracleasm-2.0.8-13.el6_8.x86_64

=================================
[root@rac01 ~]# rpm -ql kmod-oracleasm
/etc/depmod.d/oracleasm.conf
/lib/modules/2.6.32-642.el6.x86_64
/lib/modules/2.6.32-642.el6.x86_64/extra
/lib/modules/2.6.32-642.el6.x86_64/extra/oracleasm
/lib/modules/2.6.32-642.el6.x86_64/extra/oracleasm/oracleasm.ko
/usr/share/doc/kmod-oracleasm/greylist.txt
===================================
[root@rac01 ~]# rpm -ql oracleasmlib
/opt/oracle/extapi
/opt/oracle/extapi/64
/opt/oracle/extapi/64/asm
/opt/oracle/extapi/64/asm/orcl
/opt/oracle/extapi/64/asm/orcl/1
/opt/oracle/extapi/64/asm/orcl/1/libasm.so
/usr/sbin/oracleasm-discover

===========================
[root@rac01 ~]# oracleasm-discover
Using ASMLib from /opt/oracle/extapi/64/asm/orcl/1/libasm.so
[ASM Library - Generic Linux, version 2.0.4 (KABI_V2)]
Discovered disk: ORCL:ARCH [104853504 blocks (53684994048 bytes), maxio 512]
Discovered disk: ORCL:DATA2 [188743680 blocks (96636764160 bytes), maxio 512]
Discovered disk: ORCL:FLASH [209715200 blocks (107374182400 bytes), maxio 512]
Discovered disk: ORCL:RACALL [167768064 blocks (85897248768 bytes), maxio 512]

[root@oracle grid]# oracleasm-discover
Using ASMLib from /opt/oracle/extapi/64/asm/orcl/1/libasm.so
[ASM Library - Generic Linux, version 2.0.4 (KABI_V2)]
Discovered disk: ORCL:AA [4208967 blocks (2154991104 bytes), maxio 512]
Discovered disk: ORCL:BB [4209030 blocks (2155023360 bytes), maxio 512]

=============================

[root@rac01 ~]# rpm -ql oracleasm-support
/etc/init.d/oracleasm
/etc/sysconfig/oracleasm
/usr/lib/oracleasm
/usr/lib/oracleasm/oracleasm-Xshlib
/usr/lib/oracleasm/oracleasm-candidate-p
/usr/lib/oracleasm/oracleasm_debug_link
/usr/sbin/asmscan
/usr/sbin/asmtool
/usr/sbin/oracleasm
/usr/share/doc/oracleasm-support-2.1.8
/usr/share/doc/oracleasm-support-2.1.8/ReleaseNotes
/usr/share/man
/usr/share/man/man8
/usr/share/man/man8/oracleasm-configure.8.gz

==================================

[root@rac01 ~]# man oracleasm-querydisk

[root@rac01 ~]# oracleasm listdisks | xargs oracleasm querydisk -p
Disk "ARCH" is a valid ASM disk
/dev/mapper/mpathcp1: LABEL="ARCH" TYPE="oracleasm"
Disk "DATA2" is a valid ASM disk
/dev/mapper/mpathe: LABEL="DATA2" TYPE="oracleasm"
Disk "FLASH" is a valid ASM disk
/dev/mapper/mpathd: LABEL="FLASH" TYPE="oracleasm"
Disk "RACALL" is a valid ASM disk
/dev/mapper/mpathbp1: LABEL="RACALL" TYPE="oracleasm"

[root@rac01 ~]# blkid
/dev/mapper/vg_rac01-LogVol02: UUID="1c92cb5a-af5e-46e3-858b-944474c60499" TYPE="ext4"
/dev/sda1: UUID="CDBD-4AB1" TYPE="vfat"
/dev/sda2: UUID="6182f6de-645d-4674-a6b4-b4de256a6638" TYPE="ext4"
/dev/sda3: UUID="4iYwsa-z301-oX2a-tfgC-Mtz2-ur8i-dlhK9l" TYPE="LVM2_member"
/dev/mapper/vg_rac01-LogVol00: UUID="8d86f85f-e0e4-4aeb-b803-ee0438b88988" TYPE="swap"
/dev/mapper/vg_rac01-LogVol01: UUID="e2bc7558-f88e-412c-8675-a277dd6a03d8" TYPE="ext4"
/dev/mapper/mpathbp1: LABEL="RACALL" TYPE="oracleasm"
/dev/mapper/mpathcp1: LABEL="ARCH" TYPE="oracleasm"
/dev/mapper/mpathd: LABEL="FLASH" TYPE="oracleasm"
/dev/mapper/mpathe: LABEL="DATA2" TYPE="oracleasm"

/etc/init.d/oracleasm createdisk data1 /dev/mapper/mpathf

iscsiadm -m node -R

===============================

存储层看到的
卷名     data2
卷标识    10
容量      1.00 TiB
卷唯一标识    6005076300810DF6F800000000000012

操作系统层看到的
[root@rac01 ~]# multipath -ll
[root@rac01 ~]# multipath -ll
mpathe (36005076300810df6f800000000000009) dm-8 IBM,2145
size=90G features='0' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=50 status=active
| |- 7:0:0:3  sdk 8:160 active ready running
| `- 8:0:0:3  sdm 8:192 active ready running
`-+- policy='round-robin 0' prio=10 status=enabled
  |- 10:0:0:3 sdq 65:0  active ready running
  `- 9:0:0:3  sdp 8:240 active ready running
mpathd (36005076300810df6f80000000000000a) dm-7 IBM,2145
size=100G features='0' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=50 status=active
| |- 10:0:0:2 sdo 8:224 active ready running
| `- 9:0:0:2  sdn 8:208 active ready running
`-+- policy='round-robin 0' prio=10 status=enabled
  |- 7:0:0:2  sdj 8:144 active ready running
  `- 8:0:0:2  sdl 8:176 active ready running
mpathc (36005076300810df6f800000000000008) dm-4 IBM,2145
size=50G features='0' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=50 status=active
| |- 9:0:0:1  sdg 8:96  active ready running
| `- 10:0:0:1 sdi 8:128 active ready running
`-+- policy='round-robin 0' prio=10 status=enabled
  |- 7:0:0:1  sdf 8:80  active ready running
  `- 8:0:0:1  sdh 8:112 active ready running
mpathb (36005076300810df6f800000000000005) dm-3 IBM,2145
size=80G features='0' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=50 status=active
| |- 7:0:0:0  sdb 8:16  active ready running
| `- 8:0:0:0  sdc 8:32  active ready running
`-+- policy='round-robin 0' prio=10 status=enabled
  |- 9:0:0:0  sdd 8:48  active ready running
  `- 10:0:0:0 sde 8:64  active ready running
mpathf (36005076300810df6f800000000000012) dm-9 IBM,2145
size=1.0T features='0' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=50 status=active
| |- 7:0:0:4  sdr 65:16 active ready running
| `- 8:0:0:4  sds 65:32 active ready running
`-+- policy='round-robin 0' prio=10 status=enabled
  |- 9:0:0:4  sdt 65:48 active ready running
  `- 10:0:0:4 sdu 65:64 active ready running

asmlib的更多相关文章

  1. 转: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. ...

  2. Linux平台下:块设备、裸设备、ASMlib、Udev相关关系

    对磁盘设备(裸分区)的访问方式分为两种:1.字符方式访问(裸设备):2.块方式访问 Solaris平台 : 在Solaris平台下,系统同时提供对磁盘设备的字符.块方式访问.每个磁盘有两个设备文件名: ...

  3. udev/raw/asmlib/多路径 配置asm

    asmlib 是linux上面给磁盘/分区头上面打上asm的标记,供asm使用,而且当磁盘的盘符发生改变的时候,不会影响到asm disk,从效果上说,和udev没有本质区别,在redhat 4和5中 ...

  4. 实验:利用ASMLib创建ASM磁盘

    环境:RHEL 6.5 + Oracle 11.2.0.4 RAC(2 nodes) 目的:在实验环境使用ASMLib配置共享ASM磁盘,虽然我们已经不建议使用ASMLib进行绑盘,但是无奈有客户是这 ...

  5. How To Upgrade ASMLib Kernel Driver as Part of Kernel Upgrade? (文档 ID 1391807.1)

    How To Upgrade ASMLib Kernel Driver as Part of Kernel Upgrade? (文档 ID 1391807.1)

  6. 【转】下载对应内核版本的asmlib

    登陆oracle官网: http://www.oracle.com/ 注意:查询前,需要注册一个OTN账号,注册是免费的. 首页直接搜索“ASMLib”关键词(注意大小写) 进入搜索界面,点击第一项即 ...

  7. ASMlib操作系统包安装与配置asm disk磁盘

    1.加入6块硬盘,每块100g.不管是热加还是冷加.不管是加硬盘,用san存储划lun,或者再加上多路径,都是能够这么做的. 在操作系统层,能识别这种lun.以下的sdb就是一个刚划分的300g的lu ...

  8. ORACLE ASMLIB

    ORACLE ASMLIB   This blog post is more of a note for myself on configuring ASMLib. ASMLib is an opti ...

  9. 用asmlib方式创建oracle集群ASM磁盘(oracleasm)

    创建asm磁盘的几种方式 创建asm方式很多主要有以下几种 1.Faking方式 2.裸设备方式 3.udev方式(它下面有两种方式) 3.1 uuid方式 3.2 raw方式(裸设备方式) 4.as ...

随机推荐

  1. jQuery编程最佳实践笔记

    优化选择器   选择器优化已经不如从前那么重要,因为更多的浏览器实现了document.querySelectorAll()方法,所以选择的重担由jQuery转移到了浏览器. 但是仍然有一些技巧是需要 ...

  2. MVC3之ViewData与ViewBag

    首先先用代码来说话: ViewData: public ActionResult Index() { List<string> colors = new List<string> ...

  3. 为什么匿名内部类参数必须为final类型

    1)  从程序设计语言的理论上:局部内部类(即:定义在方法中的内部类),由于本身就是在方法内部(可出现在形式参数定义处或者方法体处),因而访问方法中的局部变量(形式参数或局部变量)是天经地义的.是很自 ...

  4. Log4j简介

    Log4J日志配置详解   一.Log4j简介Log4j有三个主要的组件:Loggers(记录器),Appenders (输出源)和Layouts(布局).这里可简单理解为日志类别,日志要输出的地方和 ...

  5. Erlang环境用eclipse搭建

    erlide插件eclipse开发erlang   一.相关资料 Erlang 的官方网站是http://www.erlang.org.其左侧的连接指出了我们可以从这里获取的资源. 其中, Downl ...

  6. opensuse sublime 配置

    fcitx输入法支持: 准备文件sublime-imfix.c: /* sublime-imfix.c Use LD_PRELOAD to interpose some function to fix ...

  7. ubuntu用下载的文件替换即可更新

    ./usr/lib/flashplugin-installer/libflashplayer.so 也有可能是 /usr/lib/firefox-addons/plugins

  8. 关于LDA的几何表示——MATLAB实现

    承接这个PCA的练习,还有一个关于LDA的几何表示. 题目如下: 代码实现LDA如下:LDA.m clear clc % 生成training sample MU1 = [6 10]'; MU2 = ...

  9. js地区转盘抽奖插件

    <script type="text/javascript"> var colors = ["#B8D430", "#3AB745&quo ...

  10. sql语句查询结果添加排序列(转)

      给查询出的SQL记录添加序号列,解决方法有以下两种 第一: select ROW_NUMBER() OVER (ORDER BY a.字段 ASC) AS XUHAO,a.* from table ...