- 论坛徽章:
- 0
|
請參考:
http://www.redhat.com/docs/manua ... E-NOTES-x86-en.html
- raw Device Mapping
- The raw devices interface has been deprecated in Red Hat Enterprise Linux 5; raw device mapping is now configured via udev rules.
- To configure raw device mapping, add the appropriate entries to /etc/udev/rules.d/60-raw.rules in the following formats:
- *
- For device names:
- ACTION=="add", KERNEL="<device name>", RUN+="raw /dev/raw/rawX %N"
- *
- For major / minor numbers:
- ACTION=="add", ENV{MAJOR}="A", ENV{MINOR}="B", RUN+="raw /dev/raw/rawX %M %m"
- 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.
- If you have a large, pre-existing /etc/sysconfig/rawdevices file, convert it with the following script:
- #!/bin/sh
- grep -v "^ *#" /etc/sysconfig/rawdevices | grep -v "^$" | while read dev major minor ; do
- if [ -z "$minor" ]; then
- echo "ACTION==\"add\", KERNEL==\"${major##/dev/}\", RUN+=\"/usr/bin/raw $dev %N\""
- else
- echo "ACTION==\"add\", ENV{MAJOR}==\"$major\", ENV{MINOR}==\"$minor\", RUN+=\"/usr/bin/raw $dev %M %m\""
- fi
- done
复制代码 |
|