/dev/raw/raw1 /dev/sdb1
/dev/raw/raw2 /dev/sdc1
/dev/raw/raw3 /dev/sdd1
/dev/raw/raw4 /dev/sde1
/dev/raw/raw5 /dev/sdf1
/dev/raw/raw6 /dev/sdg1
/dev/raw/raw7 /dev/sdh1
然后执行如下命令:
/sbin/service rawdevices restart
预计应该有类似如下的输出:
Assigning devices:
/dev/raw/raw1 --> /dev/emcpowera1
/dev/raw/raw1: bound to major 8, minor 33
/dev/raw/raw2 --> /dev/emcpowerd1
/dev/raw/raw2: bound to major 8, minor 49
/dev/raw/raw3 --> /dev/emcpowere1
/dev/raw/raw3: bound to major 8, minor 65
done
编辑 /etc/udev/rules.d/60-raw.rules
在其中的最后添加如下内容:
ACTION=="add",KERNEL=="sdb1",RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add",KERNEL=="sdc1",RUN+="/bin/raw /dev/raw/raw2 %N"
ACTION=="add",KERNEL=="sdd1",RUN+="/bin/raw /dev/raw/raw3 %N"
ACTION=="add",KERNEL=="sde1",RUN+="/bin/raw /dev/raw/raw4 %N"
ACTION=="add",KERNEL=="sdf1",RUN+="/bin/raw /dev/raw/raw5 %N"
ACTION=="add",KERNEL=="sdg1",RUN+="/bin/raw /dev/raw/raw6 %N"
ACTION=="add",KERNEL=="sdh1",RUN+="/bin/raw /dev/raw/raw7 %N"
kernel=="raw[1-8]",owner="oracle",group="dba",mode="660"
保存退出后重启后,执行raw –aq就可以看到配置好的裸设备了
/dev/raw/raw1 bound to major 8, minor 17
/dev/raw/raw2 bound to major 8, minor 33
/dev/raw/raw3 bound to major 8, minor 49
/dev/raw/raw4 bound to major 8, minor 65
/dev/raw/raw5 bound to major 8, minor 81
/dev/raw/raw6 bound to major 8, minor 97
/dev/raw/raw7 bound to major 8, minor 113
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23655288/viewspace-732079/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/23655288/viewspace-732079/