本篇内容介绍了“Linux 6.5上配置ASM的流程”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!
1、环境介绍
笔者使用Red Hat Linux 6.5作为工作操作系统。
[root@NCR-Standby-Asm ~]# cat /etc/redhat-release
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.rh2-2.el6.x86_64.rpm
-rw-r--r-- 1 root root 35176 May 21 11:23 kmod-oracleasm-2.0.6.rh2-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.rh2-3.el6_5.x86_64.rpm
warning: kmod-oracleasm-2.0.6.rh2-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 <ENTER> 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组件。
[root@NCR-Standby-Asm upload]# /etc/init.d/oracleasm enable
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [ OK ]
Scanning the system for Oracle ASMLib disks: [ OK ]
4、创建ASM Disk
下面进行ASM Disk的创建。
[root@NCR-Standby-Asm dev]# fdisk -l | grep sdb
Disk /dev/sdb: 107.4 GB, 107374182400 bytes
/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
使用oracleasm createdisk进行创建。
[root@NCR-Standby-Asm upload]# /usr/sbin/oracleasm createdisk DATA1 /dev/sdb1
Writing disk header: done
Instantiating disk: done
[root@NCR-Standby-Asm dev]# /usr/sbin/oracleasm createdisk DATA2 /dev/sdb2
Writing disk header: done
Instantiating disk: done
[root@NCR-Standby-Asm dev]# /usr/sbin/oracleasm createdisk DATA3 /dev/sdb3
Writing disk header: done
Instantiating disk: done
[root@NCR-Standby-Asm dev]# /usr/sbin/oracleasm createdisk DATA5 /dev/sdb5
Writing disk header: done
Instantiating disk: done
[root@NCR-Standby-Asm dev]# /usr/sbin/oracleasm createdisk DATA6 /dev/sdb6
Writing disk header: done
Instantiating disk: done
检查结果:
[root@NCR-Standby-Asm dev]# /usr/sbin/oracleasm listdisks
DATA1
DATA2
DATA3
DATA5
DATA6
后续就可以使用GUI asmca进行ASM Disk Group配置。
5、结论
郑重声明:本文版权归原作者所有,转载文章仅为传播更多信息之目的,如作者信息标记有误,请第一时间联系我们修改或删除,多谢。