Udev implements disk binding during Oracle ASM installation

Source: Internet
Author: User
Tags unique id

Udev is relatively mature compared to Oracle's own asmlib.

Article reprinted from: Maclean Liu's personal technology blog [http://www.oracledatabase12g.com/]

In <why asmlib and why not?> we introduced the use of Asmlib as a special design for the Oracle Automatic Storage management feature

The advantages and disadvantages of the kernel support library (kernel), and the recommended use of a proven UDEV solution to replace Asmlib.

Here we will give the specific steps to configure Udev, or relatively simple:

1. Verify that the necessary Udev packages are installed on all RAC nodes

[[email protected] ~]# Rpm-qa|grep Udev

Udev-095-14.21.el5

2. Obtain a unique identifier name for the device's block device via scsi_id, assuming that the LUN is already on the system SDC-SDP

For I in C D E F g h i j k l m n o p;

Do

echo "sd$i" "' Scsi_id-g-u-s/block/sd$i '";

Done

SDC 1iet_00010001

SDD 1iet_00010002

SDE 1iet_00010003

SDF 1iet_00010004

SDG 1iet_00010005

SDH 1iet_00010006

SDI 1iet_00010007

SDJ 1iet_00010008

SDK 1iet_00010009

SDL 1iet_0001000a

SDM 1iet_0001000b

SDN 1iet_0001000c

SDO 1iet_0001000d

SDP 1iet_0001000e

A unique identifying name that corresponds to the block device name listed above

3. Create the necessary udev configuration files,

First switch to the configuration file directory

[Email protected] ~]# CD/ETC/UDEV/RULES.D

Define the necessary rule profiles

[email protected] rules.d]# Touch 99-oracle-asmdevices.rules

[email protected] rules.d]# cat 99-oracle-asmdevices.rules

kernel== "sd*", bus== "scsi", program== "/sbin/scsi_id-g-u-s%p", result== "1iet_00010001", name= "OCR1", owner= "grid", Group= "Asmadmin", mode= "0660"

kernel== "sd*", bus== "scsi", program== "/sbin/scsi_id-g-u-s%p", result== "1iet_00010002", name= "Ocr2", owner= "grid", Group= "Asmadmin", mode= "0660"

kernel== "sd*", bus== "scsi", program== "/sbin/scsi_id-g-u-s%p", result== "1iet_00010003", name= "Asm-disk1", OWNER= " Grid ", group=" Asmadmin ", mode=" 0660 "

kernel== "sd*", bus== "scsi", program== "/sbin/scsi_id-g-u-s%p", result== "1iet_00010004", name= "Asm-disk2", OWNER= " Grid ", group=" Asmadmin ", mode=" 0660 "

kernel== "sd*", bus== "scsi", program== "/sbin/scsi_id-g-u-s%p", result== "1iet_00010005", name= "Asm-disk3", OWNER= " Grid ", group=" Asmadmin ", mode=" 0660 "

kernel== "sd*", bus== "scsi", program== "/sbin/scsi_id-g-u-s%p", result== "1iet_00010006", name= "Asm-disk4", OWNER= " Grid ", group=" Asmadmin ", mode=" 0660 "

kernel== "sd*", bus== "scsi", program== "/sbin/scsi_id-g-u-s%p", result== "1iet_00010007", name= "Asm-disk5", OWNER= " Grid ", group=" Asmadmin ", mode=" 0660 "

kernel== "sd*", bus== "scsi", program== "/sbin/scsi_id-g-u-s%p", result== "1iet_00010008", name= "Asm-disk6", OWNER= " Grid ", group=" Asmadmin ", mode=" 0660 "

kernel== "sd*", bus== "scsi", program== "/sbin/scsi_id-g-u-s%p", result== "1iet_00010009", name= "Asm-disk7", OWNER= " Grid ", group=" Asmadmin ", mode=" 0660 "

kernel== "sd*", bus== "scsi", program== "/sbin/scsi_id-g-u-s%p", result== "1iet_0001000a", name= "Asm-disk8", OWNER= " Grid ", group=" Asmadmin ", mode=" 0660 "

kernel== "sd*", bus== "scsi", program== "/sbin/scsi_id-g-u-s%p", result== "1iet_0001000b", name= "ASM-DISK9", OWNER= " Grid ", group=" Asmadmin ", mode=" 0660 "

kernel== "sd*", bus== "scsi", program== "/sbin/scsi_id-g-u-s%p", result== "1iet_0001000c", name= "Asm-disk10", OWNER= " Grid ", group=" Asmadmin ", mode=" 0660 "

kernel== "sd*", bus== "scsi", program== "/sbin/scsi_id-g-u-s%p", result== "1iet_0001000d", name= "asm-disk11", OWNER= " Grid ", group=" Asmadmin ", mode=" 0660 "

kernel== "sd*", bus== "scsi", program== "/sbin/scsi_id-g-u-s%p", result== "1iet_0001000e", name= "asm-disk12", OWNER= " Grid ", group=" Asmadmin ", mode=" 0660 "

Result is the output of/sbin/scsi_id-g-u-s%p--match The returned string of the last program call. This key may

Used in any following rule after a program call.

Fill in order with the unique ID name you just acquired.

Owner is the user who installs the grid infrastructure, typically Grid,group is asmadmin in 11GR2

Mode with 0660

Name is the device name after Udev is mapped,

It is recommended that you create separate diskgroup for OCR and vote disk, so that you can easily differentiate the DiskGroup-specific device named OCR1. form of the OCRN

The remaining disks can be named according to their actual use or disk group name

4. Copy the rule file to another node

[Email protected] rules.d]# SCP 99-oracle-asmdevices.rules OTHER_NODE:/ETC/UDEV/RULES.D

5. Start the Udev service on all nodes, or restart the server

[Email protected] rules.d]#/sbin/udevcontrol reload_rules

[Email protected] rules.d]#/sbin/start_udev

Starting udev: [OK]

6. Check if the device is in place

[Email protected] rules.d]# Cd/dev

[Email protected] dev]# ls-l ocr*

BRW-RW----1 grid asmadmin 8, 17:31 OCR1

BRW-RW----1 grid asmadmin 8, 17:31 OCR2

[Email protected] dev]# ls-l asm-disk*

BRW-RW----1 grid asmadmin 8, 17:31 Asm-disk1

BRW-RW----1 Grid asmadmin 8, 208 Jul 17:31 Asm-disk10

BRW-RW----1 Grid asmadmin 8, 224 Jul 17:31 asm-disk11

BRW-RW----1 grid asmadmin 8, 17:31 asm-disk12

BRW-RW----1 grid asmadmin 8, 17:31 Asm-disk2

BRW-RW----1 grid asmadmin 8, 17:31 ASM-DISK3

BRW-RW----1 grid asmadmin 8, 17:31 ASM-DISK4

BRW-RW----1 grid asmadmin 8, 17:31 asm-disk5

BRW-RW----1 Grid asmadmin 8, 144 Jul 17:31 asm-disk6

BRW-RW----1 grid asmadmin 8, 17:31 asm-disk7

BRW-RW----1 Grid asmadmin 8, 176 Jul 17:31 ASM-DISK8

BRW-RW----1 Grid asmadmin 8, 192 Jul 17:31 ASM-DISK9

Udev implements disk binding during Oracle ASM installation

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.