红帽Linux 6.5上配置ASM流程

简介:   ASM(Automatic Storage Management)是Oracle官方推荐的软件存储解决方案。自10g版本正式推出以来,软件架构层面上ASM的地位是在不断的提升。

 

ASMAutomatic Storage Management)是Oracle官方推荐的软件存储解决方案。自10g版本正式推出以来,软件架构层面上ASM的地位是在不断的提升。首先是11gASM从数据库层面剥离出来,并归入Grid Infrastructure进行管理。其次就是ASM Disk成为ACFSAutomatic Cluster File System)的基础组件。原有以RAW Device为基础的软存储机制,正在逐步被边缘化。

在产品政策上,ASM也提出了一些变化。原有的部署环境Linux下,ASM工具包提供三个免费的rpm驱动包。但是自Red Hat 6.x系列之后,Oracle宣布不会再提供高版本的ASM驱动程序包。针对使用Oracle Linux的用户,只有通过购买官方订阅的方式,才能获得ASM驱动支持。

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

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

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

 

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.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包和分区配置

 

依据kmodoracleasmliboracleasm-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组件。

 

 

[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、结论

 

从近几个版本ASM的演化情况看,在未来相当长时间内,ASM将是Oracle主要系统存储解决方案。而且Oracle RAC基于的主要是ASM,了解配置方法策略对我们而言很重要。


目录
相关文章
|
5月前
|
存储 监控 负载均衡
在Linux中,如何进行集群管理?
在Linux中,如何进行集群管理?
|
8月前
|
监控 安全 Ubuntu
Linux初步了解流程
Linux初步了解流程
46 0
|
8月前
|
存储 监控 Linux
如何在 Rocky Linux 9 上安装 Sensu 监控解决方案?
如何在 Rocky Linux 9 上安装 Sensu 监控解决方案?
148 0
如何在 Rocky Linux 9 上安装 Sensu 监控解决方案?
|
8月前
|
Prometheus 监控 Cloud Native
Linux|centos7 Prometheus的自动服务发现 一(文件发现机制)
Linux|centos7 Prometheus的自动服务发现 一(文件发现机制)
145 0
|
Web App开发 运维 网络协议
Linux巩固篇010-Linux apache服务部署静态网站
纸上得来终觉浅,绝知此事要躬行
12397 5
Linux巩固篇010-Linux apache服务部署静态网站
|
网络协议 IDE Linux
linux的搭建以及网关配置
linux的搭建以及网关配置
390 0
|
Kubernetes Devops Linux
linux k8s之KubeSphere启用DevOps
linux k8s之KubeSphere启用DevOps
|
监控 Linux Shell
阿里云监控 Linux Agent安装
阿里云监控 Linux Agent安装 安装 直接复制以下命令后在服务器上使用 root 权限运行即可。 64位 sudo bash -c "wget -e 'http_proxy=hzcmsproxy.
1870 0
|
存储 Java 大数据
GeoAnalyticsServer在Linux下集群部署手册
 1         GeoAnalyticsServer分布式部署架构图 此次使用三台机器进行矢量大数据服务器分布式部署,与单机部署不同,此次部署剥离比较消耗硬件资源的大数据计算节点、存储节点,这两节点均可在后续进行横向扩展。
2054 0