博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
oracle-asm
阅读量:6234 次
发布时间:2019-06-21

本文共 8182 字,大约阅读时间需要 27 分钟。

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

 

转载于:https://www.cnblogs.com/createyuan/p/5827842.html

你可能感兴趣的文章
架构设计知识梳理(2) Flux
查看>>
Android当内存监控到阈值时应该怎么办?
查看>>
阿里云宣布与国内规模最大的汽车企业上汽集团合作
查看>>
调试js碰到循环断点(debugger),应该怎么做?
查看>>
JB的测试之旅-网站的响应式与自适应
查看>>
图解 SQL 里的各种 JOIN
查看>>
2018 总结
查看>>
网页图标的优雅使用与总结
查看>>
iOS 录制视频时,添加水印
查看>>
工厂模式 抽象模式
查看>>
搞懂“分布式锁”,看这篇文章就对了
查看>>
1 序言 [全栈攻城师的技术札记]
查看>>
LeetCode之DI String Match(Kotlin)
查看>>
LeetCode之Two Sum IV Input is a BST(Kotlin)
查看>>
iOS 瀑布流之栅格布局
查看>>
Android中Activity的启动流程
查看>>
Parity钱包漏洞全分析及区块链安全风险应对措施
查看>>
到底是用"静态类"还是单例
查看>>
Redis RedLock 完美的分布式锁么?
查看>>
深入剖析Redis系列(八) - Redis数据结构之集合
查看>>