這篇文章將為大家詳細(xì)講解有關(guān)RedHat 4,5,6怎樣配置RAW或SCSI Rule,文章內(nèi)容質(zhì)量較高,因此小編分享給大家做個(gè)參考,希望大家閱讀完這篇文章后對(duì)相關(guān)知識(shí)有一定的了解。
專注于為中小企業(yè)提供成都網(wǎng)站建設(shè)、成都網(wǎng)站設(shè)計(jì)服務(wù),電腦端+手機(jī)端+微信端的三站合一,更高效的管理,為中小企業(yè)花溪免費(fèi)做網(wǎng)站提供優(yōu)質(zhì)的服務(wù)。我們立足成都,凝聚了一批互聯(lián)網(wǎng)行業(yè)人才,有力地推動(dòng)了上千企業(yè)的穩(wěn)健成長(zhǎng),幫助中小企業(yè)通過(guò)網(wǎng)站建設(shè)實(shí)現(xiàn)規(guī)模擴(kuò)充和轉(zhuǎn)變。1修改裸設(shè)備服務(wù)的配置文件: /etc/sysconfig/rawdevices. 添加下面2行。
格式:裸設(shè)備名 塊設(shè)備名
/dev/raw/raw1 /dev/sdb1
/dev/raw/raw2 /dev/sdb2
2 設(shè)置Oracle 用戶對(duì)裸設(shè)備的訪問(wèn)權(quán)限。
編輯UDEV的權(quán)限文件:/etc/udev/permissions.d/50-udev.permissions
找到raw device部分,修改成如下格式:
# raw devices
raw*:oracle:dba:0660
raw/*:oracle:dba:0660
3 確認(rèn)裸設(shè)備服務(wù)自啟動(dòng),2個(gè)節(jié)點(diǎn)都要執(zhí)行
[root@raw1 /]# chkconfig --list rawdevices
rawdevices 0:off 1:off 2:off 3:on 4:on 5:on 6:off
4. 啟動(dòng)raw devices 服務(wù),確認(rèn)裸設(shè)備創(chuàng)建成功,權(quán)限正確:
[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 28 03:08 raw1
crw-rw---- 1 oracle dba 162, 2 Feb 28 03:08 raw2
1修改/etc/udev/rules.d/60-raw.rules 文件
ACTION=="add", KERNEL=="/dev/sdb1", RUN+="/bin/raw /dev/raw/raw1 %N" ACTION=="add", ENV{MAJOR}=="8", ENV{MINOR}=="17", 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}=="33", 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}=="49", 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}=="65", 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 重啟服務(wù):
[root@rac1 ~]# start_udev
Starting udev: [ OK ]
3 查看raw設(shè)備:
[root@rac1 ~]# ls -lrt /dev/raw
1 獲取需要綁定為ASM Disk的磁盤(pán)uuid
# /sbin/scsi_id -g -u -s /block/sdb SATA_VBOX_HARDDISK_VBd306dbe0-df3367e3_ |
2 新建/etc/udev/rules.d/99-oracle-asmdevices.rules,增加以下內(nèi)容
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 重啟服務(wù):
[root@rac1 ~]# start_udev
Starting udev: [ OK ]
1 編輯/etc/scsi_id.config文件,如果該文件不存在,則創(chuàng)建該文件,添加如下行:
options=--whitelisted --replace-whitespace |
備注:在我的測(cè)試中,此步驟可以省略
2 獲取需要綁定為ASM Disk的磁盤(pán)uuid,比如我們要使用/dev/sdc作為ASM磁盤(pán),那么:
# scsi_id --whitelisted --replace-whitespace --device=/dev/sdc 1ATA_VBOX_HARDDISK_VB36a9e548-1838194a |
或
# /sbin/scsi_id -g -u -d /dev/sdb SATA_VBOX_HARDDISK_VBd306dbe0-df3367e3_ |
3 新建/etc/udev/rules.d/99-oracle-asmdevices.rules,增加以下內(nèi)容
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" |
或
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" |
或
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 重啟服務(wù):
[root@rac1 ~]# start_udev
Starting udev: [ OK ]
關(guān)于RedHat 4,5,6怎樣配置RAW或SCSI Rule就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,可以學(xué)到更多知識(shí)。如果覺(jué)得文章不錯(cuò),可以把它分享出去讓更多的人看到。