Setting a raw device in RHEL5/OEL5 - Oracle Cluster

来源:互联网 发布:保定网络主播招聘 编辑:程序博客网 时间:2024/05/20 03:41
# fdisk -l
-----------------------------------------------------------------
Disk /dev/hda: 16.1 GB, 16106127360 bytes
255 heads, 63 sectors/track, 1958 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 1958 15623212+ 8e Linux LVM

Disk /dev/sda: 213 MB, 213909504 bytes
64 heads, 32 sectors/track, 204 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 204 208880 83 Linux

Disk /dev/sdb: 213 MB, 213909504 bytes
64 heads, 32 sectors/track, 204 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 204 208880 83 Linux

Disk /dev/sdc: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdc1 1 391 3140676 83 Linux

Disk /dev/sdd: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdd1 1 391 3140676 83 Linux
-----------------------------------------------------------------

# cd /etc/udev/rules.d
# vi 60-raw.rules
-----------------------------------------------------------------
ACTION=="add", KERNEL=="sda1", RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add", KERNEL=="sdb1", RUN+="/bin/raw /dev/raw/raw2 %N"
ACTION=="add", KERNEL=="sdc1", RUN+="/bin/raw /dev/raw/raw3 %N"
ACTION=="add", KERNEL=="sdd1", RUN+="/bin/raw /dev/raw/raw4 %N"
-----------------------------------------------------------------

# vi 99-raw-permissions.rules
-----------------------------------------------------------------
KERNEL=="raw[1-4]", MODE="0660", GROUP="oinstall", OWNER="oracle"
-----------------------------------------------------------------

# start_udev
# raw -qa
/dev/raw/raw1: bound to major 8, minor 1
/dev/raw/raw2: bound to major 8, minor 17
/dev/raw/raw3: bound to major 8, minor 33
/dev/raw/raw4: bound to major 8, minor 49

# ls -l /dev/raw/raw*
crw-rw---- 1 oracle oinstall 162, 1 Apr 6 11:31 /dev/raw/raw1
crw-rw---- 1 oracle oinstall 162, 2 Apr 6 11:31 /dev/raw/raw2
crw-rw---- 1 oracle oinstall 162, 3 Apr 6 11:31 /dev/raw/raw3
crw-rw---- 1 oracle oinstall 162, 4 Apr 6 11:31 /dev/raw/raw4
原创粉丝点击