Create an ASM disk for a bare Device

Source: Internet
Author: User

1. First add three Disks

2. Installation Package

[Root @ myorcl asm] # ls

Oracleasm-2.6.18-348.6.1.el5-2.0.5-1.el5.i686.rpm

Oracleasm-2.6.18-348.6.1.el5debug-2.0.5-1.el5.i686.rpm

Oracleasm-2.6.18-348.6.1.el5PAE-2.0.5-1.el5.i686.rpm

Oracleasm-2.6.18-348.6.1.el5xen-2.0.5-1.el5.i686.rpm

Oracleasmlib-2.0.4-1.el5.i386.rpm

Oracleasm-support-2.1.8-1.el5.i386.rpm

3. view 3 Disks

[Root @ myorcl asm] # fdisk-l

Disk/dev/sdb: 21.4 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 cylinders

Units = cylinders of 16065*512 = 8225280 bytes

Disk/dev/sdb doesn' t contain a valid partition table

Disk/dev/sdc: 21.4 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 cylinders

Units = cylinders of 16065*512 = 8225280 bytes

Disk/dev/sdc doesn' t contain a valid partition table

Disk/dev/sdd: 21.4 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 cylinders

Units = cylinders of 16065*512 = 8225280 bytes

Disk/dev/sdd doesn't contain a valid partition table

3. Create a partition using a method similar to the following

Root @ myorcl asm] # fdisk/dev/sdc

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel. Changes will remain in memory only,

Until you decide to write them. After that, of course, the previous

Content won't be recoverable.

The number of cylinders for this disk is set to 2610.

There is nothing wrong with that, but this is larger than 1024,

And coshould in certain setups cause problems:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

(E.g., dos fdisk, OS/2 FDISK)

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w (rite)

Command (m for help): n

Command action

Eextended

Pprimary partition (1-4)

P

Partition number (1-4): 1

First cylinder (1-2610, default 1 ):

Using default value 1

Last cylinder or + size or + sizeM or + sizeK (1-2610, default 2610 ):

Using default value 2610

Command (m for help): w

The partition table has been altered!

Calling ioctl () to re-read partition table.

Syncing disks.

[Root @ myorcl asm] # partprobe/dev/sdb

[Root @ myorcl asm] # partprobe/dev/sdc

[Root @ myorcl asm] # partprobe/dev/sdd

[Root @ myorcl asm] # Add vi/etc/udev/rules. d/60-raw.rules

ACTION = "add", KERNEL = "sdb1", RUN + = "/bin/raw/dev/raw/raw100% N"

ACTION = "add", KERNEL = "sdc1", RUN + = "/bin/raw/dev/raw/raw101% N"

ACTION = "add", KERNEL = "sdd1", RUN + = "/bin/raw/dev/raw/raw102% N"

[Root @ myorcl asm] # Add vi/etc/udev/rules. d/90-raw.rules

KERNEL = "raw10 *", OWNER = "oracle", GROUP = "dba", MODE = "0660" -- devices with raw10 * already belong to oracle.

Start the start_udev Service

[Root @ myorcl asm] # start_udev

Starting udev: [OK]

View Permissions

[Root @ myorcl asm] # ll/dev/raw

Total 0

Crw-rw ---- 1 oracle dba 162,100 Jul5 raw100

Crw-rw ---- 1 oracle dba 162,101 Jul5 raw101

Crw-rw ---- 1 oracle dba 162,102 Jul5 raw102

4. Add a cluster ready Service

[Root @ myorcl asm] #/u01/app/oracle/product/10.2.0/db_1/bin/localconfig add

/Etc/oracle does not exist. Creating it now.

Successfully accumulated necessary OCR keys.

Creating OCR keys for user 'root', privgrp 'root '..

Operation successful.

Configuration for local CSS has been initialized

Adding to inittab

Startup will be queued to init within 90 seconds.

Checking the status of new Oracle init process...

Expecting the CRS daemons to be up within 600 seconds.

CSS is active on these nodes.

Myorcl

CSS is active on all nodes.

Oracle CSS service is installed and running under init (1 M)

[Root @ myorcl asm] # oracleasm configure-I

Processing 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

Answer will keep that current value. Ctrl-C will abort.

Default user to own the driver interface []: oracle

Default group to own the driver interface []: oinstall

Start Oracle ASM library driver on boot (y/n) [n]: y

Scan for Oracle ASM disks on boot (y/n) [y]: y

Writing Oracle ASM library driver configuration: done

5. configure it through DBCA

[Oracle @ myorcl ~] $ Dbca

Configure ASM

 

You can see the previous bare device.

The redundancy mechanism is normal: two disk groups, hight: three disk groups, external: external redundancy: one disk group.

Then complete without configuring other options

6. Access the instance

[Oracle @ myorcl ~] $ Export ORACLE_SID = + ASM

[Oracle @ myorcl ~] $ Sqlplus/as sysdba

SQL * Plus: Release 10.2.0.1.0-Production on Fri Jul 5 07:59:01 2013

Copyright (c) 1982,200 5, Oracle. All rights reserved.

Connected:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-Production

With the Partitioning, OLAP and Data Mining options

SQL> select instance_name from v $ instance;

INSTANCE_NAME

------------------------------------------------

+ ASM

View ASM disk groups

SQL> desc v $ asm_diskgroup

NameNull? Type

-----------------------------------------------------------------------------

GROUP_NUMBERNUMBER

NAMEVARCHAR2 (30)

SECTOR_SIZENUMBER

BLOCK_SIZENUMBER

ALLOCATION_UNIT_SIZENUMBER

STATEVARCHAR2 (11)

TYPEVARCHAR2 (6)

TOTAL_MBNUMBER

FREE_MBNUMBER

Required_pai_free_mbnumber

USABLE_FILE_MBNUMBER

OFFLINE_DISKSNUMBER

UNBALANCEDVARCHAR2 (1)

COMPATIBILITYVARCHAR2 (60)

DATABASE_COMPATIBILITYVARCHAR2 (60)

7. Check whether the database instance can use the ASM disk group.

[Oracle @ myorcl asm] $ export ORACLE_SID = orcl

[Oracle @ myorcl asm] $ sqlplus/as sysdba

SQL * Plus: Release 10.2.0.1.0-Production on Fri Jul 5 08:03:07 2013

Copyright (c) 1982,200 5, Oracle. All rights reserved.

Connected:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-Production

With the Partitioning, OLAP and Data Mining options

SQL>

SQL>

SQL> select name from v $ asm_diskgroup;

NAME

--------------------------------------------------------------------------------

DB

8. Create an ASM instance Database

Related Article

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.