[Practice] vmwarevm RedhatEnterpriseLinux6Oracle11GR2, single-node configuration ASM

Source: Internet
Author: User

After twists and turns, we finally successfully configured Oracle11GR2 ASM when the vmwarevm Redhat Enterprise Linux 6 has installed a single-node Oracle database 11G R2. The record process is as follows:

Environment: VMWare Player 5.0.2 build-1031769, Red hat Enterprise Linux 6.4, Oracle 11.2.0.3, Oracle Grid Infrastructure 11.2.0.3 (beginning to use 11.2.0.1)

1. Configure grid and oracle users

[Grid @ RHVM Desktop] $ id oracle
Uid = 501 (oracle) gid = 502 (oinstall) groups = 502 (oinstall), 501 (dba), 1300 (asmdba), 1200 (asmadmin)

The oracle user did not add asmadmin, but the/dev/asm * permission is grid: asmadmin. As a result, the user does not have the permission to migrate data. Therefore, this permission is added.

[Grid @ RHVM Desktop] $ id grid
Uid = 1001 (grid) gid = 502 (oinstall) groups = 502 (oinstall), 501 (dba), 1200 (asmadmin), 1300 (asmdba)

Ii. Use udev to configure Oracle ASM

This section describes how to configure Oracle ASM using the udev device in Red Hat Enterprise Linux 6 of fengge. For more information, see http://www.itpux.com/thread-65-1-1.html. Here, the "Multi-disk non-partition mode" is used ":

1. Prepare the following three Disks (not partitioned) for the following purposes:
Crsdg 10g
DGSYSTEM 10g
DGDATA 10g
[Root @ oradb ~] # Fdisk-l

Disk/dev/sdc: 10.7 GB, 10737418240 bytes

Disk/dev/sdd: 10.7 GB, 10737418240 bytes

Disk/dev/sde: 10.7 GB, 10737418240 bytes

2. Configure udev

2.1 edit the/etc/scsi_id.config file. If the file does not exist, create the file and add the following lines:
Options = -- whitelisted -- replace-whitespace

2.2 obtain the Disk uuid to be bound to the ASM disk. If you use the vmwarevm, you need to add Disk. EnableUUID = "TRUE" to the vmware configuration file ",

To obtain the uuid.

For example, if you want to use/dev/sdc as the ASM disk, you can obtain it as follows:

Scsi_id -- whitelisted -- replace-whitespace -- device =/dev/sdc

Obtain the scsi IDs of sdc, sdd, and sde.

2.3 compile the udev rules file, write the scsi_id command in PROGRAM, and write the uuid returned in the above command in RESULT. This is no different from RHEL5, but the syntax of the scsi_id command has changed.

Vi/etc/udev/rules. d/99-oracle-asmdevices.rules

KERNEL = "sdc", BUS = "scsi", PROGRAM = "/sbin/scsi_id -- whitelisted -- replace-whitespace -- device =/dev/$ name ", RESULT = "36000c29b1fa3aefb13e00666faf4f81c", NAME = "asm-crs-sdc", OWNER = "grid", GROUP = "asmadmin", model = "0660"
KERNEL = "sdd", BUS = "scsi", PROGRAM = "/sbin/scsi_id -- whitelisted -- replace-whitespace -- device =/dev/$ name ", RESULT = "36000c29c913069e64a31376645383443", NAME = "asm-sysdg-sdd", OWNER = "grid", GROUP = "asmadmin", model = "0660"
KERNEL = "sde", BUS = "scsi", PROGRAM = "/sbin/scsi_id -- whitelisted -- replace-whitespace -- device =/dev/$ name ", RESULT = "36000c292204a4f53b2547ff4c3650776", NAME = "asm-datadg-sde", OWNER = "grid", GROUP = "asmadmin", model = "0660"

2.4 restart the udev Device
/Sbin/udevadm control -- reload-rules
/Sbin/start_udev

2.5 check the udev Device
[Root @ oradb rules. d] # ls-lsa/dev/asm *
0 brw-rw ----. 1 grid asmadmin 8, 32 Jul 18 19:50/dev/asm-crs-sdc
0 brw-rw ----. 1 grid asmadmin 8, 64Jul 18 19:50/dev/asm-datadg-sde
0 brw-rw ----. 1 grid asmadmin 8, 48 Jul 18 19:50/dev/asm-sysdg-sdd

3. Test the udev Device

Use udevadm for testing. Note that the udevadm command does not accept mount device names such as/dev/sdc.
The name of the original device such as/sys/block/sdc.
Ls-lsa/dev/block/
Udevadm info -- query = all -- path =/sys/block/sdc
Udevadm info -- query = all -- path =/sys/block/sdd
Udevadm info -- query = all -- path =/sys/block/sde
Udevadm info -- query = all -- name = asm-crs-sdc
Udevadm info -- query = all -- name = asm-datadg-sde
Udevadm info -- query = all -- name = asm-sysdg-sdd

The/dev/sdc device will be bound to/dev/asm-crs-sdc after udev is started.
The/dev/sdd device will be bound to/dev/asm-sysdg-sdd after udev is started.
The/dev/sde device will be bound to/dev/asm-datadg-sde after udev is started.

/Sbin/udevadm test/sys/block/sdc
/Sbin/udevadm test/sys/block/sdd
/Sbin/udevadm test/sys/block/sde

Iii. Install oracle 11g grid infrastructure:

1. Run runInstaller and select "select" configure Grid Infrastructure for a standalone server ".

2. when creating an ASM Disk Group, select "External" for "Capacity dency", select "All Disks" for "Add Disks", enter/dev/asm * for "Change Discovery Path", and select All three created Disk paths;

3. Perform Prerequiste checks, select Ignore all;

4. Error reported during Installation to 76%: OUI-10094: Problem in saving inventory. Installation cannot continue./opt/app/oracle/orainventory/ContentsXML/comps. xml (Permission denied)

Run the following statement:

1). Use deinstall. sh to delete an unsuccessful installation;

2) re-create the $ ORACLE_HOME directory andCreate a new oraInst. loc file:

This file shoshould have the follow content:
Inventory_loc =/opt/app/oraclegrid/product/11.2.0/grid/oraInventory
Inst_group = oinstall

3 ).Start OUI with the following options:

./RunInstaller-invPtrLoc $ ORACLE_HOME/oraInst. loc
The-invPtrLoc flag is used to locate the oraInst. loc file.
5. Run root. sh.

6. When the error [INS-20802] update Inventory failed is reported in update Inventory, it is a dummy process that can be ignored and skipped;

7. At this time, the + ASM instance has been automatically created and started automatically, and the listener is also started automatically. The port is 1521. At this time, the listener of oracle database does not need to be started again, and zidon is registered to this listener.

[Grid @ RHVM ~] $ Sqlplus/as sysasm
SQL * Plus: Release 11.2.0.3.0 Production on Wed Jan 1 21:43:49 2014
Copyright (c) 1982,201 1, Oracle. All rights reserved.
Connected:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit Production
With the Automatic Storage Management option
SQL> show parameter instance
NAME TYPE
---------------------------------------------------------------------
VALUE
------------------------------
Cluster_database_instances integer
1
Instance_name string
+ ASM
Instance_number integer
1
Instance_type string
Asm
SQL>

4. migrate data to ASM:

1. log on to EM using the sys user and select Migrate to ASM in the server label. After the upgrade, all files will be migrated to the "+ DATA" directory:

+ DATA/ipcdb/datafile/system.257.835737429
+ DATA/ipcdb/datafile/sysaux.258.835737491
+ DATA/ipcdb/datafile/undotbs1.259.835737555
+ DATA/ipcdb/datafile/users.262.835737591
+ DATA/ipcdb/datafile/user_02.261.835737589
+ DATA/ipcdb/datafile/users_03.260.835737581
+ DATA/ipcdb/datafile/users_04.269.835738407

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.