ASM安装和配置
3. 安装ASM软件-Grid Infrastructure12
3.2 Installing the Software Binaries 15
1. 软件准备
1.1 ASM driver-Asmlib
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