The Automatic Storage Management library driver (ASMLIB) simplifies the configuration and management of the disk devices by eliminating the need to rebind raw devices used with ASM each time the system is restarted.
A disk that is configured for use with Automatic Storage Management is known as a candidate disk.
If you intend to use Automatic Storage Management for database storage for Linux, then Oracle recommends that you install the ASMLIB driver and associated utilities, and use them to configure candidate disks.
Note:
If you do not use the Automatic Storage Management library driver, then you must bind each disk device that you want to use to a raw device, as described in Configuring Database File Storage on ASM and Raw Devices .To use the Automatic Storage Management library driver (ASMLIB) to configure Automatic Storage Management devices, complete the following tasks.
-
Installing and Configuring the Automatic Storage Management Library Driver Software
-
Administering the Automatic Storage Management Library Driver and Disks
Installing and Configuring the Automatic Storage Management Library Driver Software
To install and configure the ASMLIB driver software, follow these steps:
-
Enter the following command to determine thekernel version and architecture of the system:
# uname -rm
-
If necessary, download the required ASMLIB packages from the OTN Web site:
http://www.oracle.com/technology/tech/linux/asmlib/index.html
Note:
ASMLIB driver packages for some kernel versions are available in the Oracle Clusterware directory on the 10g Release 2 (10.2) DVD-ROM, in thecrs/RPMS/asmlib
directory. However, Oracle recommends that you check the OTN Web site for the most up-to-date packages.You must install
oracleasm-support
package version 2.0.1 or laterto use ASMLib on Red Hat Enterprise Linux 4.0 Advanced Server, or SUSE Linux Enterprise Server 9.You must install the following packages, where
version
is the version of the ASMLIB driver,arch
is the system architecture, andkernel
is the version of the kernel that you are using:oracleasm-support-version.arch.rpm oracleasm-kernel-version.arch.rpm oracleasmlib-version.arch.rpm
-
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.i386.rpm \ oracleasmlib-2.0.1.x86_64.rpm \ oracleasm-2.6.9-11.EL-2.0.1.x86_64.rpm
-
Enter the following command to run the
oracleasm
initialization script with theconfigure
option:# /etc/init.d/oracleasm configure
-
Enter the following information in response to the prompts that the script displays:
Prompt Suggested Response Default user to own the driver interface: Specify the Oracle software owner user (typically, oracle
).Default group to own the driver interface: Specify the OSDBA group (typically dba
).Start Oracle Automatic Storage Management Library driver on boot (y/n): Enter y
to start the Oracle Automatic Storage Management library driver when the system starts.
The script completes the following tasks:
-
Creates the
/etc/sysconfig/oracleasm
configuration file -
Creates the
/dev/oracleasm
mount point -
Loads the
oracleasm
kernel module -
Mounts the ASMLIB driver file system
Note:
The ASMLIB driver file system is not a regular file system. It is used only by the Automatic Storage Management library to communicate with the Automatic Storage Management driver.
-
-
Repeat this procedure on all nodes in the cluster where you want to install Oracle Real Application Clusters.
Configuring the Disk Devices to Use the Automatic Storage Management Library Driver on x86 and Itanium Systems
To configure the disk devices that you want to use in an Automatic Storage Management disk group, follow these steps:
-
If you intend to use IDE, SCSI, or RAID devices in the Automatic Storage Management 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 that you want to use, enter the following command:
# /sbin/fdisk -l
Depending on the type of disk, the device name can vary:
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 that you want to use. -
Use either
fdisk
orparted
to create a single whole-disk partition on the disk devices that you want to use.
-
-
Enter a command similar to the following to mark a disk as an Automatic Storage Management disk:
# /etc/init.d/oracleasm createdisk DISK1 /dev/sdb1
In this example,
DISK1
is a name that you want to 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 Automatic Storage Management, 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:# /etc/init.d/oracleasm scandisks
This command identifies shared disks attached to the node that are marked as Automatic Storage Management disks.
Configuring the Disk Devices to Use the Automatic Storage Management Library Driver on IBM zSeries Based Systems
-
If you formatted the DASD with the compatible disk layout, then enter a command similar to the following to create a single whole-disk partition on the device:
# /sbin/fdasd -a /dev/dasdxxxx
-
Enter a command similar to the following to mark a disk as an ASM disk:
# /etc/init.d/oracleasm createdisk DISK1 /dev/sdb1
In this example,
DISK1
is a name that you want to 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 ASM, then make sure that you specify the correct logical device name for the disk.
-
To make the disk available on the other cluster nodes, enter the following command as root on each node:
# /etc/init.d/oracleasm scandisks
This command identifies shared disks attached to the node that are marked as ASM disks.
Note:
To create a database during the installation using the ASM library driver, you must choose an installation method that runs DBCA in interactive mode. For example, you can run DBCA in an interactive mode by choosing the Custom installation type, or the Advanced database configuration option. You must also change the default disk discovery string toORCL:*.
Administering the Automatic Storage Management Library Driver and Disks
To administer the Automatic Storage Management library driver and disks, use theoracleasm
initialization script with different options, as described inTable 3-4.
Table 3-4 ORACLEASM Script Options
Option | Description |
---|---|
configure | Use the # /etc/init.d/oracleasm configure |
enable disable | Use the # /etc/init.d/oracleasm enable |
start stop restart | Use the # /etc/init.d/oracleasm restart |
createdisk | Use the # /etc/init.d/oracleasm createdisk DISKNAME devicename |
deletedisk | Use the # /etc/init.d/oracleasm deletedisk DISKNAME
Caution: Do not use this command to unmark disks that are being used by an Automatic Storage Management disk group. You must delete the disk from the Automatic Storage Management disk group before you unmark it. |
querydisk | Use the # /etc/init.d/oracleasm querydisk {DISKNAME | devicename} |
listdisks | Use the # /etc/init.d/oracleasm listdisks |
scandisks | Use the # /etc/init.d/oracleasm scandisks |
When you have completed creating and configuring Automatic Storage Management, with ASMLIB, proceed toChapter 4, "Installing Oracle Clusterware".
摘自:Oracle® Database Oracle Clusterware and Oracle Real Application Clusters Installation Guide 10g Release 2 (10.2) for Linux
FROM :http://docs.oracle.com/cd/B19306_01/install.102/b14203/storage.htm#BABIFHAB