免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3050 | 回复: 2

fedora11f没有raw命令和rawdevices服务,如何绑定裸设备? [复制链接]

论坛徽章:
0
发表于 2009-08-08 06:47 |显示全部楼层
如题,请各位大哥帮帮忙, 有没有替代的命令?

论坛徽章:
7
天蝎座
日期:2013-08-16 23:19:32丑牛
日期:2014-01-08 09:20:14寅虎
日期:2014-01-11 11:03:44午马
日期:2014-04-28 11:02:40天秤座
日期:2014-05-16 23:24:24摩羯座
日期:2014-07-20 10:46:04卯兔
日期:2014-08-08 15:21:41
发表于 2009-08-08 12:42 |显示全部楼层
帮你顶一下

论坛徽章:
0
发表于 2009-08-08 13:49 |显示全部楼层
請參考:

http://www.redhat.com/docs/manua ... E-NOTES-x86-en.html


  1. raw Device Mapping

  2.     The raw devices interface has been deprecated in Red Hat Enterprise Linux 5; raw device mapping is now configured via udev rules.

  3.     To configure raw device mapping, add the appropriate entries to /etc/udev/rules.d/60-raw.rules in the following formats:

  4.         *

  5.           For device names:

  6.           ACTION=="add", KERNEL="<device name>", RUN+="raw /dev/raw/rawX %N"

  7.         *

  8.           For major / minor numbers:

  9.           ACTION=="add", ENV{MAJOR}="A", ENV{MINOR}="B", RUN+="raw /dev/raw/rawX %M %m"

  10.     Replace <device name> with the name of the device you need to bind (for example, /dev/sda1). "A" and "B" are the major / minor numbers of the device you need to bind, and X is the raw device number that you want the system to use.

  11.     If you have a large, pre-existing /etc/sysconfig/rawdevices file, convert it with the following script:

  12.     #!/bin/sh

  13.     grep -v "^ *#" /etc/sysconfig/rawdevices | grep -v "^$" | while read dev major minor ; do
  14.             if [ -z "$minor" ]; then
  15.                     echo "ACTION==\"add\", KERNEL==\"${major##/dev/}\", RUN+=\"/usr/bin/raw $dev %N\""
  16.             else
  17.                     echo "ACTION==\"add\", ENV{MAJOR}==\"$major\", ENV{MINOR}==\"$minor\", RUN+=\"/usr/bin/raw $dev %M %m\""
  18.             fi
  19.     done


复制代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP