红帽Linux 6.5上配置ASM流程(一)

2015-07-16 12:08:13 · 作者: · 浏览: 3

针对这种商业竞争关系,Red Hat也提出了一定的应对策略。Red Hat推荐使用DM-Multipath这种系统级别支持ASM Diskgroup创建,如果用户一定要使用ASM,官方可以使用kmod工具驱动包,来进行安装工作。


当然,和Oracle一样,kmod只允许购买Red Hat官方订阅的用户才能下载。


本篇介绍kmod模式下如何创建ASM Disk和一些配置步骤,留待需要的朋友们待查。


1、环境介绍


笔者使用Red Hat Linux 6.5作为工作操作系统。
?


Red Hat Enterprise Linux Server release 6.5 (Santiago)


从Oracle官方网站和Red Hat官方网站上下载到ASM驱动文件,用于配置ASM Disk。
?


[root@NCR-Standby-Asm upload]# ls -l


total 200


-rw-r--r-- 1 root root 35044 May 21 11:23 kmod-oracleasm-2.0.6.rh1-2.el6.x86_64.rpm


-rw-r--r-- 1 root root 35176 May 21 11:23 kmod-oracleasm-2.0.6.rh1-3.el6_5.x86_64.rpm


-rw-r--r-- 1 root root 36248 May 21 11:23 kmod-oracleasm-2.0.8-4.el6_6.x86_64.rpm


-rw-r--r-- 1 root root 13300 May 21 11:23 oracleasmlib-2.0.4-1.el6.x86_64.rpm


-rw-r--r-- 1 root root 74984 May 21 11:23 oracleasm-support-2.1.8-1.el6.x86_64.rpm



注意:目前kmod是必须从Red Hat官方进行下载的,而且只提供了64位版本。同时,针对不同的Linux Kernel版本,可以使用不同的kmod包程序。


另外两个oracle asm支持包是从Oracle官方网站下载得来。


2、安装ASM包和分区配置


依据kmod、oracleasmlib和oracleasm-support的顺序安装驱动程序包。
?


[root@NCR-Standby-Asm upload]# rpm -ivh kmod-oracleasm-2.0.6.rh1-3.el6_5.x86_64.rpm?


warning: kmod-oracleasm-2.0.6.rh1-3.el6_5.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY


Preparing...? ? ? ? ? ? ? ? ########################################### [100%]


? 1:kmod-oracleasm? ? ? ? ########################################### [100%]



[root@NCR-Standby-Asm upload]# rpm -ivh oracleasmlib-2.0.4-1.el6.x86_64.rpm?


warning: oracleasmlib-2.0.4-1.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY


Preparing...? ? ? ? ? ? ? ? ########################################### [100%]


? 1:oracleasmlib? ? ? ? ? ########################################### [100%]


[root@NCR-Standby-Asm upload]# rpm -ivh oracleasm-support-2.1.8-1.el6.x86_64.rpm?


warning: oracleasm-support-2.1.8-1.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY


Preparing...? ? ? ? ? ? ? ? ########################################### [100%]


? 1:oracleasm-support? ? ? ########################################### [100%]


确定ASM Disk Group对应的物理磁盘(或者分区)。


[root@NCR-Standby-Asm profile.d]# fdisk -l


Disk /dev/sda: 85.9 GB, 85899345920 bytes


255 heads, 63 sectors/track, 10443 cylinders


(篇幅原因,有省略……)


Disk identifier: 0x0da7eb93


?


? Device Boot? ? ? Start? ? ? ? End? ? ? Blocks? Id? System


/dev/sdb1? ? ? ? ? ? ? 1? ? ? ? 2612? ? 20980858+? 83? Linux


/dev/sdb2? ? ? ? ? ? 2613? ? ? ? 5224? ? 20980890? 83? Linux


/dev/sdb3? ? ? ? ? ? 5225? ? ? ? 7836? ? 20980890? 83? Linux


/dev/sdb4? ? ? ? ? ? 7837? ? ? 13054? ? 41913585? ? 5? Extended


/dev/sdb5? ? ? ? ? ? 7837? ? ? 10448? ? 20980858+? 83? Linux


/dev/sdb6? ? ? ? ? 10449? ? ? 13054? ? 20932663+? 83? Linux


?


?


说明:投产环境下,请使用单个盘作为ASM Disk,强化HA特性。


?


3、配置ASM


?


使用oracleasm配置相关信息。


?


?


[root@NCR-Standby-Asm upload]# /usr/sbin/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 []: grid


Default group to own the driver interface []: asmadmin


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
?


启动ASM组件。


[ro