Using Udev on Linux 6 to address ASM storage device issues

Source: Internet
Author: User

1. Add record to/etc/scsi_id.config

echo "options=--whitelisted--replace-whitespace" >>/etc/scsi_id.config


2. In this example, the block device sdb-> SDD needs to be bound

[[email protected] ~]# for i in B c D;

> Do

> echo "kernel==\" sd*\ ", bus==\" scsi\ ", program==\"/sbin/scsi_id--whitelisted--replace-whitespace--device=/dev/ \ $name \ ", result==\" '/sbin/scsi_id--whitelisted--replace-whitespace--device=/dev/sd$i ' \ ", name=\" asm-disk$i\ ", Owner=\ "grid\", group=\ "asmadmin\", mode=\ "0660\" "

> Done

kernel== "sd*", bus== "scsi", program== "/sbin/scsi_id--whitelisted--replace-whitespace--device=/dev/$name", RESULT= = "291bbf9b896a0f503", name= "ASM-DISKB", owner= "grid", group= "Asmadmin", mode= "0660"

kernel== "sd*", bus== "scsi", program== "/sbin/scsi_id--whitelisted--replace-whitespace--device=/dev/$name", RESULT= = "24D3963EC66158AAC", name= "ASM-DISKC", owner= "grid", group= "Asmadmin", mode= "0660"

kernel== "sd*", bus== "scsi", program== "/sbin/scsi_id--whitelisted--replace-whitespace--device=/dev/$name", RESULT= = "2A188DF0F367EC9AD", name= "ASM-DISKD", owner= "grid", group= "Asmadmin", mode= "0660"


3. Write these rule to/etc/udev/rules.d/99-oracle-asmdevices.rules and modify the value of name as needed.


[Email protected] rules.d]# VI 99-oracle-asmdevices.rules

kernel== "sd*", bus== "scsi", program== "/sbin/scsi_id--whitelisted--replace-whitespace--device=/dev/$name", RESULT= = "291bbf9b896a0f503", name= "Asm-data", owner= "grid", group= "Asmadmin", mode= "0660"

kernel== "sd*", bus== "scsi", program== "/sbin/scsi_id--whitelisted--replace-whitespace--device=/dev/$name", RESULT= = "24D3963EC66158AAC", name= "ASM-OCR", owner= "grid", group= "Asmadmin", mode= "0660"

kernel== "sd*", bus== "scsi", program== "/sbin/scsi_id--whitelisted--replace-whitespace--device=/dev/$name", RESULT= = "2A188DF0F367EC9AD", name= "Asm-fra", owner= "grid", group= "Asmadmin", mode= "0660"

4. Start Udev

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

Starting udev: [OK]

[Email protected] rules.d]# ll/dev/asm*

BRW-RW----1 Grid asmadmin 8, June 22:43/dev/asm-data

BRW-RW----1 Grid asmadmin 8, June 22:43/dev/asm-fra

BRW-RW----1 Grid asmadmin 8, June 22:43/DEV/ASM-OCR

[Email protected] rules.d]#


Note: RHEL5 commands differ from RHEL6

The RHEL5 command is:/sbin/scsi_id-g-u-s

For example:

For i in B c D;
Do
echo "kernel==\" sd*\ ", bus==\" scsi\ ", program==\"/sbin/scsi_id-g-u-s%p\ ", result==\" ' scsi_id-g-u-s/block/sd$i ' \ ", Name=\ "Asm-disk$i\", owner=\ "grid\", group=\ "asmadmin\", mode=\ "0660\" "
Done

This article is from "Technical achievement dream!" "Blog, be sure to keep this provenance http://dreamsanqin.blog.51cto.com/845412/1665576

Using Udev on Linux 6 to address ASM storage device issues

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.