Configuring Disks for Automatic Storage Management with ASMLIB

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

To install and configure the ASMLIB driver software, follow these steps:

  1. Enter the following command to determine thekernel version and architecture of the system:

    # uname -rm
    
  2. 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, whereversion 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
    
  3. Switch user to the root user:

    $ su -
    
  4. 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
    
  5. Enter the following command to run the oracleasm initialization script with the configure option:

    # /etc/init.d/oracleasm configure
    
  6. Enter the following information in response to the prompts that the script displays:

    PromptSuggested 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 (typicallydba).
    Start Oracle Automatic Storage Management Library driver on boot (y/n):Entery 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.
  7. 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:

  1. If you intend to use IDE, SCSI, or RAID devices in the Automatic Storage Management disk group, then follow these steps:

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

    2. 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:

      Disk TypeDevice Name FormatDescription
      IDE disk
      /dev/hdxn
      
      In this example,x is a letter that identifies the IDE disk andn 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 andn is the partition number. For example,/dev/sda is the first disk on the first SCSI bus.
      RAID disk
      /dev/rd/cxdypz
      /dev/ida/cxdypz
      
      Depending on the RAID controller, RAID devices can have different device names. In the examples shown,x is a number that identifies the controller,y is a number that identifies the disk, andz is a number that identifies the partition. For example,/dev/ida/c0d1 is the second logical drive on the first controller.

      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.
    3. Use either fdisk or parted to create a single whole-disk partition on the disk devices that you want to use.

  2. 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.

  3. To make the disk available on the other nodes in the cluster, enter the following command asroot 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

  1. 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
    
  2. 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.

  3. 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

OptionDescription
configure

Use the configure option to reconfigure the Automatic Storage Management library driver, if necessary:

# /etc/init.d/oracleasm configure
enable
disable

Use the disable and enable options to change the actions of the Automatic Storage Management library driver when the system starts. Theenable option causes the Automatic Storage Management library driver to load when the system starts:

# /etc/init.d/oracleasm enable
start
stop
restart

Use the start, stop, andrestart options to load or unload the Automatic Storage Management library driver without restarting the system:

# /etc/init.d/oracleasm restart
createdisk

Use the createdisk option to mark a disk device for use with the Automatic Storage Management library driver and give it a name:

# /etc/init.d/oracleasm createdisk DISKNAME devicename
deletedisk

Use the deletedisk option to unmark a named disk device:

# /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 querydisk option to determine if a disk device or disk name is being used by the Automatic Storage Management library driver:

# /etc/init.d/oracleasm querydisk {DISKNAME | devicename}
listdisks

Use the listdisks option to list the disk names of marked Automatic Storage Management library driver disks:

# /etc/init.d/oracleasm listdisks
scandisks

Use the scandisks option to enable cluster nodes to identify which shared disks have been marked as Automatic Storage Management library driver disks on another node:

# /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

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值