How to Setup partitioned Linux Block Devices Using UDEV (non-asmlib) and Assign them to ASM

Source: Internet
Author: User

Document ID 1528148.1


Applies to:oracle database-standard edition-version 10.2.0.1 to 12.1.0.2 [Release 10.2 to 12.1]
Information in this document applies to any platform.
Goal

The present document provides an example about what to setup/configure partitioned Linux block devices using Udev (NON-ASML IB) and assign them to ASM as candidate member disks.

Solution

1) This example is performed on an OEL 6.3 configuration (ASM release 11.2.0.3-64-bit):

[Email protected] ~]$ uname-a
Linux asmlnx2 2.6.39-200.24.1.el6uek.x86_64 #1 SMP Sat June 02:39:07 EDT x86_64 x86_64 x86_64 gnu/linux

[Email protected] ~]$ cat/etc/*release*

Oracle Linux Server Release 6.3
Red Hat Enterprise Linux Server release 6.3 (Santiago)
Oracle Linux Server Release 6.3



2) Identify The new disk in your Linux configuration (e.g. OEL 6.3 or RedHat 6.3):

[Email protected] ~]$ ls-l/DEV/XVDV
BRW-RW----1 root disk 202, 5376 Feb 21:31/DEV/XVDV



3) Create a new disk partition on it:

[Email protected] ~]#FDISK/DEV/XVDV
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF Disklabel
Building a new DOS disklabel with disk identifier 0xba335ded.
Changes'll remain in memory only, until the decide to write them.
After that, of course, the previous content won ' t is recoverable.

Warning:invalid flag 0x0000 of partition Table 4 would be a corrected by W (rite)

Warning:dos-compatible mode is deprecated. It ' s strongly recommended to
Switch off the mode (command ' C ') and change display units to
Sectors (Command ' u ').

Command (M for help): N
Command Action
E Extended
P primary partition (1-4)
P
Partition number (1-4): 1
First cylinder (1-261, default 1):
Using Default value 1
Last cylinder, +cylinders or +size{k,m,g} (1-261, default 261):
Using Default Value 261

Command (M for help): W
The partition table has been altered!

Calling IOCTL () to re-read partition table.
Syncing disks.

[Email protected] ~]# PARTPROBE/DEV/XVDV

[Email protected] ~]# PARTPROBE/DEV/XVDV1

[Email protected] ~]# ls-l/DEV/XVDV
BRW-RW----1 root disk 202, 5376 Feb 21:38/DEV/XVDV

[Email protected] ~]# ls-l/DEV/XVDV1
BRW-RW----1 root disk 202, 5377 Feb 21:38/dev/xvdv1

4) Set The new UDEV rules on the new partition ("/dev/xvdv1") as follows:

[Email protected] ~]# Vi/etc/udev/rules.d/99-oracle-asmdevices.rules
kernel== "Xvdv1", name= "Asmdisk1_udev_p1", owner= "grid", group= "Asmadmin", mode= "0660"



5) Reload and Restart the Udev rules:

[Email protected] ~]# Udevadm control--reload-rules

[Email protected] ~]# Start_udev
Starting udev: [OK]




6) Make sure the new Udev partition device are created with the correct ownership (grid & asmadmin) A nd permissions (brw-rw----):

[Email protected] ~]# ls-ltr/dev/asm*
BRW-RW----1 grid asmadmin 202, 5377 Feb 21:47/dev/asmdisk1_udev_p1



7) Now you can use it to create a new diskgroup or add it to an existing diskgroup as follows:


[Email protected] ~]# Su-grid
[Email protected] ~]$. Oraenv
Oracle_sid = [Grid]? +asm
The Oracle base has been set To/u01/app/grid
[Email protected] ~]$ sqlplus "/as sysasm"

Sql*plus:release 11.2.0.3.0 Production on Mon Feb 11 21:56:31 2013

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit Production
With the Automatic Storage Management option


Sql> Show Parameter asm_diskstring

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
Asm_diskstring string


Sql> alter system Set asm_diskstring ='/dev/asmdisk1_udev_p1 'Scope=both;

System altered.


Sql> Show Parameter asm_diskstring

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
Asm_diskstring string/DEV/ASMDISK1_UDEV_P1



Sql> Select path from the v$asm_disk where path like '%udev% ';

PATH
--------------------------------------------------------------------------------
/DEV/ASMDISK1_UDEV_P1


sql> Create DiskGroup UDEVDG external redundancy disk'/dev/asmdisk1_udev_p1 ';

DiskGroup created.

Note 1:additional Examples is described at the following manual:

    • Configuring Storage for Oracle asm/database Files Using Block Devices

Or

    • Configuring Disk Devices manually for Oracle ASM

Community Discussions

Still have questions? Use the Communities window below to search for similar discussions or start a new discussion on this subject. (Window is the live community not a screenshot)

This article is from "the director of the audience, for Me" blog, please be sure to keep this source http://jonsen.blog.51cto.com/4559666/1671076

How to Setup partitioned Linux Block Devices Using UDEV (non-asmlib) and Assign them to ASM

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.