ASM安装和配置

本文详细介绍了Oracle Automatic Storage Management(ASM)的安装和配置过程,包括ASM驱动的安装、配置,Grid Infrastructure的安装,创建ASM实例,以及如何添加、删除磁盘和磁盘组。通过这些步骤,读者将能够全面掌握ASM的管理和维护。
摘要由CSDN通过智能技术生成

ASM安装和配置

1. 软件准备 2

1.1 ASM driverAsmlib2

2. 安装驱动-Asmlib2

2.1 安装ASM Driver2

2.2 配置驱动 3

2.3 创建ASM磁盘4

3. 安装ASM软件-Grid Infrastructure12

3.1 Pre install 12

3.2 Installing the Software Binaries 15

3.3 Post install: 28

4. 创建ASM实例-ASM Instance29

4.1 手动创建ASM实例29

4.2 asmca创建ASM实例31

5. 启动和关闭ASM实例32

5.1 启动ASM实例32

5.2 关闭ASM实例34

6. 添加新磁盘 34

7. 添加/删除新磁盘组36

7.1 添加新磁盘组 36

7.2 删除磁盘组 38

8. 向已有的磁盘组添加/删除新磁盘39

8.1 向已有的磁盘组添加新磁盘 39

8.2 从已有的磁盘组删除磁盘 41

1. 软件准备


1.1 ASM driverAsmlib


l oracleasm-support-version.arch.rpm

l oracleasm-kernel-version.arch.rpm

l oracleasmlib-version.arch.rpm

Enter the following command to determine the kernel version and architecture of the system:

# uname -rm

Download the required ASMLIB packages from the Oracle Technology Network (OTN) Web site:

http://www.oracle.com/us/technologies/linux/downloading-asmlib-176895.html

Note:

You must install oracleasm-support package version 2.0.1 or later to use ASMLIB on Red Hat Enterprise Linux Advanced Server, or SUSE Linux Enterprise Server.

You must install the following packages, where version is the version of the ASMLIB driver, arch is the system architecture, and kernel is the version of the kernel that you are using.

1.2 Grid Infrastructure


http://www.oracle.com/technetwork/products/clusterware/downloads/index.html



2. 安装驱动-Asmlib


2.1 安装ASM Driver


Switch user to the root user:

$ su -

Enter a command similar to the following to install the packages:

# rpm -Uvh oracleasm-support-version.arch.rpm \

           oracleasm-kernel-version.arch.rpm \

           oracleasmlib-version.arch.rpm

For example, if you are using the Red Hat Enterprise Linux AS 4 enterprise kernel on an AMD64 system, then enter a command similar to the following:

# rpm -Uvh oracleasm-support-2.0.1.x86_64.rpm \

           oracleasmlib-2.0.1.x86_64.rpm \

           oracleasm-2.6.9-11.EL-2.0.1.x86_64.rpm

[root@rac1 rpm]# ls | grep asm

oracleasm-2.6.9-89.ELsmp-2.0.5-1.el4.i686.rpm

oracleasmlib-2.0.4-1.el4.i386.rpm

oracleasm-support-2.1.7-1.el4.i386.rpm

rpm -Uvh oracleasm-support-2.1.7-1.el4.i386.rpm \

         oracleasmlib-2.0.4-1.el4.i386.rpm \

          oracleasm-2.6.9-89.ELsmp-2.0.5-1.el4.i686.rpm


[root@rac1 rpm]# rpm -qa |grep asm

[root@rac1 rpm]# rpm -Uvh oracleasm-support-2.1.7-1.el4.i386.rpm \

>          oracleasmlib-2.0.4-1.el4.i386.rpm \

>           oracleasm-2.6.9-89.ELsmp-2.0.5-1.el4.i686.rpm

warning: oracleasm-support-2.1.7-1.el4.i386.rpm: V3 DSA signature: NOKEY, key ID b38a8516

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

   1:oracleasm-support      ########################################### [ 33%]

   2:oracleasm-2.6.9-89.ELsm########################################### [ 67%]

   3:oracleasmlib           ########################################### [100%]

[root@rac1 rpm]# 

2.2 配置驱动


Enter the following command to run the oracleasm initialization script with the configure option:

# /usr/sbin/oracleasm configure -i

or

#/etc/init.d/oracleasm configure

[root@rac1 rpm]# /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 [grid]: 

Default group to own the driver interface [dba]: 

Start Oracle ASM library driver on boot (y/n) [y]: 

Scan for Oracle ASM disks on boot (y/n) [y]: 

Writing Oracle ASM library driver configuration: done

Initializing the Oracle ASMLib driver:                     [  OK  ]

Scanning the system for Oracle ASMLib disks:               [  OK  ]

[root@rac1 rpm]# 



2.3 创建ASM磁盘


If you intend to use IDE, SCSI, or RAID devices in the Oracle ASM disk group, then follow these steps:

If necessary, install or configure the shared disk devices that you intend to use for the disk group and restart the system.

To identify the device name for the disks to use, enter the following command:

Depending on the type of disk, the device name can vary:

Disk Type

Device Name Format

Description

IDE disk

/dev/hdxn

In this example, x is a letter that identifies the IDE disk and n is the partition number. For example, /dev/hda is the first disk on the first IDE bus.

SCSI disk

/dev/sdxn

In this example, x is a letter that identifies the SCSI disk and n is the partition number. For example, /dev/sda is the first disk on the first SCSI bus.

To include devices in a disk group, you can specify either whole-drive device names or partition device names.

Note:

Oracle recommends that you create a single whole-disk partition on each disk.

Use either fdisk or parted to create a single whole-disk partition on the disk devices.

Enter a command similar to the following to mark a disk as an Oracle ASM disk:

# /usr/sbin/oracleasm createdisk DISK1 /dev/sdb1

In this example, DISK1 is the name you assign to the disk.

Note:

The disk names that you specify can contain uppercase letters, numbers, and the underscore character. They must start with an uppercase letter. 

If you are using a multi-pathing disk driver with Oracle ASM, then make sure that you specify the correct logical device name for the disk.

To make the disk available on the other nodes in the cluster, enter the following command as root on each node:

# /usr/sbin/oracleasm scandisks

This command identifies shared disks attached to the node that are marked as Oracle ASM disks.

[root@rac1 rpm]# fdisk -l

Disk /dev/sda: 107.3 GB, 107374182400 bytes

255 heads, 63 sectors/track, 13054 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值