ITPub博客

首页 > 数据库 > Oracle > Setting up ASM on linux with LVM (Doc ID 292348.1)

Setting up ASM on linux with LVM (Doc ID 292348.1)

Oracle 作者:rongshiyuan 时间:2015-03-04 16:21:23 0 删除 编辑

Setting up ASM on linux with LVM (Doc ID 292348.1)


In this Document

Goal
Fix

Applies to:

Oracle Server - Enterprise Edition - Version 10.1.0.2 to 10.1.0.3 [Release 10.1]
Linux x86-64
Linux x86-64
Oracle Server Enterprise Edition - Version: 10.1.0.2 to 10.1.0.3

Goal

Installing ASM on Linux with Logical Volume manager (LVM)

Fix

ASM With LVM on Linux

Configuring Raw Partitions on Linux
=================================

The following subsections describe how to configure raw partitions or raw logical volumes on Linux.

Using Raw Logical Volumes :-
The following procedures contained in this section describe how to create raw partitions for Oracle database file storage.
This procedure works on all supported Linux distributions. However, on Red Hat Enterprise Linux 3 and UnitedLinux 1.0 you can use Logical Volume Manager (LVM) to create logical volumes of the required size and use them instead of raw partitions.

NOTE :- Using LVM can provide benefits when used as a the method for storing Oracle database files on raw devices. For example, LVM enables you to overcome the limitations on the number of partitions that you can create on a single physical disk.


If you want to use logical volumes instead of raw partitions, follow these steps:

1. Create a separate volume group for the Oracle database files. You can use a name such as oracle_vg or dbname_vg for the volume group.
2. Create the required number of logical volumes using the sizes listed in the "Create Raw Partitions"
Use a naming convention similar to the following when creating the logical volumes: dbname_objectname_raw_sizem For example, you might name the logical volume for the SYSTEM table space (500 MB) in the sales database as follows: sales_system_raw_500m
Note: The use of logical volumes for raw devices is supported only for single-instance databases. They are not supported for RAC databases. See Also: For more information about completing steps 1 and 2, see the operating system documentation or the lvm man page.

USING LINUX LVM:-
=================

Examples
We have disk partitions /dev/sda3, /dev/sdb1 and /dev/hda2 free for use
and want to create a volume group named "test_vg". Steps required:

1. Change partition type for these 3 partitions to 0x8e with fdisk.
(see pvcreate(8): 0x8e identifies LVM partitions)

2. pvcreate /dev/sda3 /dev/sdb1 /dev/hda2

3. vgcreate test_vg /dev/sda3 /dev/sdb1 /dev/hda2

With our volume group "test_vg" now online, we can create logical vol-
umes. For example a logical volume with a size of 10GB and standard
name (/dev/test_vg/lvol1) and another one named "my_test_lv" with size
200MB striped (RAID0) across all the three physical volumes.

Steps required:

1. lvcreate -L 10000 test_vg

2. lvcreate -L 200 -n my_test_lv -i 3 test_vg

For example create a file system with
"mkfs -t ext2 /dev/test_vg/my_test_lv" and mount it with
"mount /dev/test_vg/my_test_lv /usr1"
OR Specify in the




Bind the Partitions to Raw Devices
===========================
After you have created the required logical volumes , you must bind the volumes to raw devices.
However, you must first determine what raw devices are already bound to other devices. The procedure that you must follow to complete this task varies, depending on the distribution that you are using:

Red Hat: 1. To determine what raw devices are already bound to other devices, enter the following command:
# /usr/sbin/raw -qa
Raw devices have device names in the form /dev/raw/rawn, where n is a number that identifies the raw device.

2.Open the /etc/sysconfig/rawdevices file in any text editor and add a line similar to the following for each volume that you created:

3./dev/raw/raw1 /dev/test_vg/my_test_lv Specify an unused raw device for each volume

4. For each raw device that you specified in the rawdevices file, enter commands similar to the following to set the owner, group, and permissions on the device file:
5. # chown oracle:oinstall /dev/dev/rawn
6.# chmod 660 /dev/raw/rawn 4.

7. To bind the partitions to the raw devices, enter the following command:
# /sbin/service rawdevices restart
By editing the rawdevices file, the system binds the partitions to the raw devices when it reboots.


Create the DBCA Raw Device Mapping File
====================================


To allow Database Configuration Assistant (DBCA) to identify the appropriate raw partition for each database file, you must create a raw device mapping file, as follows:

1.Set the ORACLE_BASE environment variable to specify the Oracle base directory that you identified or created previously: Bourne, Bash or Korn shell:

$ ORACLE_BASE=/u01/app/oracle ; export ORACLE_BASE


2.Create a database file subdirectory under the Oracle base directory and set the appropriate owner, group, and permissions on it:

# mkdir -p $ORACLE_BASE/oradata/dbname
# chown -R oracle:oinstall $ORACLE_BASE/oradata
# chmod -R 775 $ORACLE_BASE/oradata

In this example, dbname is the name of the database that you chose previously.

3. Change directory to the $ORACLE_BASE/oradata/dbname directory.
4. Edit the dbname_raw.conf file in any text editor to create a file similar to the following:
system=/dev/raw/raw1
sysaux=/dev/raw/raw2
example=/dev/raw/raw3
users=/dev/raw/raw4
temp=/dev/raw/raw5
undotbs1=/dev/raw/raw6
redo1_1=/dev/raw/raw8
redo1_2=/dev/raw/raw9
control1=/dev/raw/raw12
control2=/dev/raw/raw13
spfile=/dev/raw/raw14
pwdfile=/dev/raw/raw15


5.Use the following guidelines when creating or editing this file:
Each line in the file must have the following format: database_object_identifier=raw_device_path For a single instance database, the file must specify one automatic undo tablespace datafile (undotbs1), and at least two redo log files (redo1_1, redo1_2).
Specify at least two control files (control1, control2).

To use manual instead of automatic undo management, specify a single RBS tablespace datafile (rbs) instead of the automatic undo management tablespaces.

6. Save the file and note the file name that you specified.

When you are configuring the oracle user s environment later in this chapter, set the DBCA_RAW_CONFIG environment variable to specify the full path to this file.





 

Document Details

 
Rate this document Email link to this documentOpen document in new windowPrintable Page
Type:
Status:
Last Major Update:
Last Update:
HOWTO
ARCHIVED
22-Aug-2012
22-Aug-2012
     
 

Related Products

 
Oracle Database - Enterprise Edition
     
 

Document References

 
     
 

Recently Viewed

 
     




来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/17252115/viewspace-1448198/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2009-11-24

  • 博文量
    798
  • 访问量
    3206705