为什么RHEL 6上没有ASMLIB?

为什么RHEL 6上没有ASMLIB?

 

有些人简单解释为Oracle为了推广自家的Oracle Linux而特意为之,实际上这一评价是不公允的。

ASMLIB的特殊性是它有部分Linux Kernel内核级别的组件, 而Kernel的开放与否完全取决于Kernel内核的维护者,对于Red Hat Enterprise Linux而言是Redhat公司。 由于Redhat公司从RHEL 6这个版本开始决定从Kernel中移除ASMLIB,并且不再给与Oracle公司对于该部分内核代码的访问修改权利,这直接导致Oracle不可能build出FOR RHEL 6的ASMLIB版本,因此显然这是Redhat的问题,而非O记得问题。

 

注意ASMLIB仅仅是不支持原生态的RHEL 6的Kernel,这不代表在RHEL 6上不可能用ASMLIB。Metalink文档介绍了相关信息:

 

What is ASMLib?

 

ASMLib is free, optional software for the Automatic Storage Management (ASM) feature of Oracle Database that simplifies the management and discovery of ASM disks and makes I/O processing and kernel resource usage with ASM storage more efficient. ASMLib is not required to use the Automatic Storage Management (ASM) feature of Oracle Database on Linux and all features and functionality of ASM will work without ASMLib.

Software Update Policy for ASMLib running on Red Hat Enterprise Linux

Oracle provides ASMLib software and support for customers who receive Red Hat Enterprise Linux (RHEL) operating system support from Red Hat and have a valid Oracle database support contract. Only the latest release of ASMLib will be provided for new Linux kernels released with each new RHEL minor release (“Update”). For example, if Red Hat were to release kernel 2.6.18-194.0.1.el5, Oracle will only release the latest version of ASMLib, say 2.0.5, for that kernel. Oracle will not release any previous versions of ASMlib for that kernel.

Furthermore, ASMLib software is only provided for Linux kernels for which the corresponding packages (devel, src, binaries) are available to Oracle. For example, Oracle cannot provide ASMLib software for kernels provided under Red Hat’s Extended Update Model or “z-stream” support.

Red Hat Enterprise Linux 6 (RHEL6)

For RHEL6 or Oracle Linux 6, Oracle will only provide ASMLib software and updates when configured Unbreakable Enterprise Kernel (UEK). Oracle will not provide ASMLib packages for kernels distributed by Red Hat as part of RHEL 6 or the Red Hat compatible kernel in Oracle Linux 6. ASMLib updates will be delivered via Unbreakable Linux Network(ULN) which is available to customers with Oracle Linux support. ULN works with both Oracle Linux or Red Hat Linux installations, but ASMlib usage will require replacing any Red Hat kernel with UEK

 
对于RHEL6,只要使用Oracle自己的Unbreakable Enterprise Kernel(UEK)内核则仍可以使用ASMLIB软件及其更新,仅仅是不支持RHEL 6自带的Kernel以及Redhat兼容的Kernel。  可以使用Unbreakable Linux Network(ULN)更新ASMLIB,前提是用户购买了Oracle Linux  Support服务。 不管是Oracle Linux还是Redhat Linux均可以使用ULN服务,但是ASMlib要求必须将任何Redhat Kernel替换为UEK。

 

Unbreakable Linux Network

 

相关阅读:

 在Linux 6上使用UDEV解决RAC ASM存储设备名问题
利用UDEV服务解决RAC ASM存储设备名
Why ASMLIB and why not?
如何诊断ASMLIB故障

如何诊断ASMLIB故障

虽然我并不推荐你使用ASMLIB绑定设备名, 详见这篇文章《Why ASMLIB and why not?》 。  但大概因为介绍ASMLIB的文章远多于UDEV的缘故, 导致有大量对RAC安装配置不太熟悉的朋友仍执意采用ASMLIB,又因为ASMLIB的配置不算太简单所以在实际安装RAC之前的ASMLIB实施过程中有不少人遇到了问题, 其次在ASMLIB的使用过程中麻烦也不少。

这里总结了一下ASMLIB的诊断思路, 如下脚本:

 

cat /etc/sysconfig/oracleasm


1) uname -a
2) rpm -qa | grep ^oracleasm
3) rpm -V oracleasmlib
4) multipath -ll

1) output of command line

# rpm -V oracleasm-support

# /etc/init.d/oracleasm scandisks

# /etc/init.d/oracleasm listdisks

# ls -l -R /dev/oracleasm/

# ls -l /etc/sysconfig/oracleasm

# cat /etc/sysconfig/oracleasm

# mount

2) oracleasm log file

/var/log/oracleasm

3) sosreport

By default the "sos" package should be installed into EL4u6 or later.
(If not, please download the sos package from ULN https://linux.oracle.com)

You just need type command "sosreport" as root user, and press "Enter" or "yes" for all the questions.

The sosreport will run for several minutes, according to different system, the running time might be more longer.
Once completed, "sosreport" will generate a compressed sosreport-xx-xx.bz2 file under /tmp. 


[summary]
- confirm system build asm disk on muoltipath devices
- modify /etc/udev/rules.d.90-dm.rules
- currently both nodes could find the asm disk from scandisks and listdisks
- sharon.honor will try installer again, if necessary need get help from application(RAC) team


1. Reboot the box.

2. Run the following commands
#fdisk -l
#multipath -ll
#blkid
#cat /etc/sysconfig/oracleasm
#cat /etc/sysconfig/oracleasm-_dev_oracleasm

#uptime
#/etc/init.d/oracleasm start
#/etc/init.d/oracleasm listdisks

#uptime
#/etc/init.d/oracleasm scandisk

Please also modify the /etc/sysconfig/oracleasm-_dev_oracleasm with below.
ORACLEASM_SCANORDER="dm"
ORACLEASM_SCANEXCLUDE="sd"


The devices that asmlib will scan is controlled in the /etc/sysconfig/oracleasm file 
with the "scanorder" and "scanexclude" parameters.

Why ASMLIB and why not?

ASMLIB是一种基于Linux module,专门为Oracle Automatic Storage Management特性设计的内核支持库(kernel support library)。

长久以来我们对ASMLIB的认识并不全面,这里我们来具体了解一下使用ASMLIB的优缺点。

理论上我们可以从ASMLIB API中得到的以下益处:

  1. 总是使用direct,async IO
  2. 解决了永久性设备名的问题,即便在重启后设备名已经改变的情况下
  3. 解决了文件权限、拥有者的问题
  4. 减少了I/O期间从用户模式到内核模式的上下文切换,从而可能降低cpu使用率
  5. 减少了文件句柄的使用量
  6. ASMLIB API提供了传递如I/O优先级等元信息到存储设备的可能

虽然从理论上我们可以从ASMLIB中得到性能收益,但实践过程中这种优势是几乎可以忽略的,没有任何性能报告显示ASMLIB对比Linux上原生态的udev设备管理服务有任何性能上的优势。在Oracle官方论坛上有一篇<ASMLib and Linux block devices>讨论ASMLIB性能收益的帖子,你可以从中看到”asmlib wouldn’t necessarily give you much of an io performance benefit, it’s mainly for ease of management as it will find/discover the right devices for you, the io effect of asmlib is large the same as doing async io to raw devices.”的评论,实际上使用ASMLIB和直接使用裸设备(raw device)在性能上没有什么差别。

ASMLIB可能带来的缺点:

  1. 对于多路径设备(multipathing)需要在/etc/sysconfig/oracleasm-_dev_oracleasm配置文件中设置ORACLEASM_SCANORDER及ORACLEASM_SCANEXCLUDE,以便ASMLIB能找到正确的设备文件,具体可以参考Metalink Note<How To Setup ASM & ASMLIB On Native Linux Multipath Mapper disks? [ID 602952.1]>
  2. 因为ASM INSTANCE使用ASMLIB提供的asm disk,所以增加了额外的层面
  3. 每次Linux Kernel更新,都需要替换新的ASMLIB包
  4. 增加了因人为错误造成宕机downtime的可能
  5. 使用ASMLIB意味着要花费更多时间去创建和维护
  6. 因为ASMLIB的存在,可能引入更多的bug,这是我们最不想看到的
  7. 使用ASMLIB创建的disk,其disk header并不会和普通的asm disk header有什么不同,仅仅是在头部多出了ASMLIB的属性空间。

结论:
我个人的观点是尽可能不要使用ASMLIB,当然这不是DBA个人所能决定的事情。另一方面这取决于个人习惯,在rhel 4的早期发行版本中没有提供udev这样的设备管理服务,这导致在rhel 4中大量的ASM+RAC组合的系统使用ASMLIB , 经网友指出udev 作为kernel 2.6的新特性被引入,在rhel4的初始版本中就已经加入了udev绑定服务,但是在rhel4时代实际udev的使用并不广泛(In Linux 2.6, a new feature was introduced to simplify device management and hot plug capabilities. This feature is called udev and is a standard package in RHEL4 or Oracle
Enterprise Linux 4 (OEL4) as well as Novell’s SLES9 and SLES10.)。如果是在RHEL/OEL 5中那么你已经有充分的理由利用udev而放弃ASMLIB。

Reference:
ASMLIB Performance vs Udev
RAC+ASM 3 years in production Stories to share
How To Setup ASM & ASMLIB On Native Linux Multipath Mapper disks? [ID 602952.1]
ASMLib and Linux block devices

沪ICP备14014813号-2

沪公网安备 31010802001379号