您好,登錄后才能下訂單哦!
這篇文章將為大家詳細講解有關RedHat 4,5,6怎樣配置RAW或SCSI Rule,文章內容質量較高,因此小編分享給大家做個參考,希望大家閱讀完這篇文章后對相關知識有一定的了解。
1修改裸設備服務的配置文件: /etc/sysconfig/rawdevices. 添加下面2行。
格式:裸設備名 塊設備名
/dev/raw/raw1 /dev/sdb1
/dev/raw/raw2 /dev/sdb2
2 設置Oracle 用戶對裸設備的訪問權限。
編輯UDEV的權限文件:/etc/udev/permissions.d/50-udev.permissions
找到raw device部分,修改成如下格式:
# raw devices
raw*:oracle:dba:0660
raw/*:oracle:dba:0660
3 確認裸設備服務自啟動,2個節(jié)點都要執(zhí)行
[root@raw1 /]# chkconfig --list rawdevices
rawdevices 0:off 1:off 2:off 3:on 4:on 5:on 6:off
4. 啟動raw devices 服務,確認裸設備創(chuàng)建成功,權限正確:
[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 重啟服務:
[root@rac1 ~]# start_udev
Starting udev: [ OK ]
3 查看raw設備:
[root@rac1 ~]# ls -lrt /dev/raw
1 獲取需要綁定為ASM Disk的磁盤uuid
# /sbin/scsi_id -g -u -s /block/sdb SATA_VBOX_HARDDISK_VBd306dbe0-df3367e3_ |
2 新建/etc/udev/rules.d/99-oracle-asmdevices.rules,增加以下內容
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 重啟服務:
[root@rac1 ~]# start_udev
Starting udev: [ OK ]
1 編輯/etc/scsi_id.config文件,如果該文件不存在,則創(chuàng)建該文件,添加如下行:
options=--whitelisted --replace-whitespace |
備注:在我的測試中,此步驟可以省略
2 獲取需要綁定為ASM Disk的磁盤uuid,比如我們要使用/dev/sdc作為ASM磁盤,那么:
# 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,增加以下內容
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 重啟服務:
[root@rac1 ~]# start_udev
Starting udev: [ OK ]
關于RedHat 4,5,6怎樣配置RAW或SCSI Rule就分享到這里了,希望以上內容可以對大家有一定的幫助,可以學到更多知識。如果覺得文章不錯,可以把它分享出去讓更多的人看到。
免責聲明:本站發(fā)布的內容(圖片、視頻和文字)以原創(chuàng)、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據(jù),一經查實,將立刻刪除涉嫌侵權內容。