Setting a raw device in RHEL5/OEL5 - Oracle Cluster(转载)

# 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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值