Redhat 4, 5, 6 set up bare devices

Source: Internet
Author: User
Tags dba uuid
RedHat 4 RAW Configuration


1 Modify the configuration file for the bare device service:/etc/sysconfig/rawdevices. Add the following 2 lines.


Format: Bare device name block device name
/dev/raw/raw1/dev/sdb1
/dev/raw/raw2/dev/sdb2


2 Set the access rights of the Oracle user to the bare device.
Edit Udev's permissions file:/etc/udev/permissions.d/50-udev.permissions
Locate the raw Device section and modify it to the following format:
# Raw Devices
raw*:oracle:dba:0660
raw/*:oracle:dba:0660




3 Confirm that the bare device service is starting and 2 nodes are executing
[Root@raw1/]# chkconfig--list rawdevices
Rawdevices 0:off 1:off 2:off 3:on 4:on 5:on 6:off


4. Start the raw devices service to confirm that the bare device was created successfully and that the permissions are correct:
[ROOT@RAW1/]# Service rawdevices restart
Assigning devices:
/DEV/RAW/RAW1-/DEV/SDB1
/dev/raw/raw1:bound to Major 8, minor 17
/DEV/RAW/RAW1-/DEV/SDB2
/dev/raw/raw1:bound to Major 8, minor 18


Done


[Oracle@raw2 ~]$ Cd/dev/raw
[Oracle@raw2 raw]$ LS-LRT
Total 0
CRW-RW----1 Oracle DBA 162, 1 Feb 03:08 RAW1
CRW-RW----1 Oracle DBA 162, 2 Feb 03:08 raw2





RedHat 5 Raw Configuration


1 Modify/etc/udev/rules.d/60-raw.rules File


action== "Add", kernel== "/dev/sdb1", run+= "/bin/raw/dev/raw/raw1%N"
action== "Add", env{major}== "8", env{minor}== "+", run+= "/bin/raw/dev/raw/raw1%M%M"
action== "Add", kernel== "/DEV/SDC1", run+= "/bin/raw/dev/raw/raw2%N"
action== "Add", env{major}== "8", env{minor}== ", run+="/bin/raw/dev/raw/raw2%M%M "
action== "Add", kernel== "/dev/sdd1", run+= "/bin/raw/dev/raw/raw3%N"
action== "Add", env{major}== "8", env{minor}== "$", run+= "/bin/raw/dev/raw/raw3%M%M"
action== "Add", kernel== "/dev/sde1", run+= "/bin/raw/dev/raw/raw4%N"
action== "Add", env{major}== "8", env{minor}== ", run+="/bin/raw/dev/raw/raw4%M%M "
action== "Add", kernel== "Raw1", owner= "grid", group= "Asmadmin", mode= "0660"
action== "Add", kernel== "raw2", owner= "grid", group= "Asmadmin", mode= "0660"
action== "Add", kernel== "raw3", owner= "grid", group= "Asmadmin", mode= "0660"
action== "Add", kernel== "Raw4", owner= "grid", group= "Asmadmin", mode= "0777"


2 Restart Service:


[Root@rac1 ~]# Start_udev
Starting udev: [OK]


3 Viewing RAW devices:
[Root@rac1 ~]# Ls-lrt/dev/raw





RedHat 5 UDEV SCSI rules configuration
1 Get the disk UUID that needs to be bound to ASM disk
#/sbin/scsi_id-g-u-s/block/sdb
Sata_vbox_harddisk_vbd306dbe0-df3367e3_


2 new/etc/udev/rules.d/99-oracle-asmdevices.rules, add the following content
kernel== "Sd*1", bus== "scsi", program== "/sbin/scsi_id-g-u-s/block/$parent", result== "sata_vbox_harddisk_ Vbd306dbe0-df3367e3_ ", name=" Asm-disk1 ", owner=" Oracle ", group=" DBA ", mode=" 0660 "


3 Restart Service:
[Root@rac1 ~]# Start_udev
Starting udev: [OK]





RedHat 6 UDEV SCSI Rules
1 Edit the/etc/scsi_id.config file, if the file does not exist, create the file, and add the following line:
Options=--whitelisted--replace-whitespace


Note: In my test, this step can be omitted


2 Get the disk UUID that needs to be bound to ASM disk, for example, if we want to use/DEV/SDC as ASM disks, then:
# scsi_id--whitelisted--replace-whitespace--DEVICE=/DEV/SDC
1ata_vbox_harddisk_vb36a9e548-1838194a
Or
#/sbin/scsi_id-g-u-d/dev/sdb
Sata_vbox_harddisk_vbd306dbe0-df3367e3_


3 new/etc/udev/rules.d/99-oracle-asmdevices.rules, add the following content
kernel== "Sd*1", bus== "scsi", program== "/sbin/scsi_id-g-u-d/dev/$parent", result== "sata_vbox_harddisk_ Vbd306dbe0-df3367e3_ ", name=" Asm-disk1 ", owner=" Oracle ", group=" DBA ", mode=" 0660 "
Or
kernel== "dm-*", program= "scsi_id--page=0x83--whitelisted--device=/dev/%k", result== " 3600c0ff00015c7b70253c05001000000 ", owner:=" grid ", group:=" Oinstall "
kernel== "dm-*", program= "scsi_id--page=0x83--whitelisted--device=/dev/%k", result== " 3600c0ff00015c7b72553c05001000000 ", owner:=" grid ", group:=" Oinstall "
kernel== "dm-*", program= "scsi_id--page=0x83--whitelisted--device=/dev/%k", result== " 3600c0ff00015c7b77165c05001000000 ", owner:=" grid ", group:=" Oinstall "
kernel== "dm-*", program= "scsi_id--page=0x83--whitelisted--device=/dev/%k", result== " 3600c0ff00015c7b73753c05001000000 ", owner:=" grid ", group:=" Oinstall "
kernel== "dm-*", program= "scsi_id--page=0x83--whitelisted--device=/dev/%k", result== " 3600c0ff00015c7b78065c05001000000 ", owner:=" grid ", group:=" Oinstall "
Or
kernel== "sd*", bus== "scsi", program== "/sbin/scsi_id--whitelisted--replace-whitespace--device=/dev/$name", RESULT= = "3600c0ff00015c7b70253c05001000000", name= "asmocrvote01", owner= "grid", group= "Asmadmin", mode= "0660"
kernel== "sd*", bus== "scsi", program== "/sbin/scsi_id--whitelisted--replace-whitespace--device=/dev/$name", RESULT= = "3600c0ff00015c7b77165c05001000000", name= "Asmdata01", owner= "grid", group= "Asmadmin", mode= "0660"
kernel== "sd*", bus== "scsi", program== "/sbin/scsi_id--whitelisted--replace-whitespace--device=/dev/$name", RESULT= = "3600c0ff00015c7b73753c05001000000", name= "Asmdata02", owner= "grid", group= "Asmadmin", mode= "0660"
kernel== "sd*", bus== "scsi", program== "/sbin/scsi_id--whitelisted--replace-whitespace--device=/dev/$name", RESULT= = "3600c0ff00015c7b72553c05001000000", name= "Asmfra01", owner= "grid", group= "Asmadmin", mode= "0660"


4 Restart Service:
[Root@rac1 ~]# Start_udev
Starting udev: [OK]

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.