1、创建裸设备 linux-250:~ # fdisk /dev/sda13(查看分区信息)
he number of cylinders for this disk is set to 26108.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/sda13: 214.7 GB, 214753803264 bytes
255 heads, 63 sectors/track, 26108 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda13p1 1 13 104391 83 Linux
/dev/sda13p2 14 26 104422 83 Linux
/dev/sda13p3 27 39 104422 83 Linux
/dev/sda13p4 40 26108 209399242 5 Extended
/dev/sda13p5 40 76 297171 83 Linux
/dev/sda13p6 77 138 497983 83 Linux
/dev/sda13p7 139 145 56196 83 Linux
/dev/sda13p8 146 152 56196 83 Linux
/dev/sda13p9 153 159 56196 83 Linux
/dev/sda13p10 160 161 16033 83 Linux
/dev/sda13p11 162 163 16033 83 Linux
/dev/sda13p12 164 165 16033 83 Linux
/dev/sda13p13 166 167 16033 83 Linux
/dev/sda13p14 168 229 497983 83 Linux
/dev/sda13p15 230 291 497983 83 Linux
2、绑定裸设备
发现在/dev/下没有raw,自己创建raw目录
#mkdir raw
#cd raw
#mknod raw1 c 162 1
#mknod raw2 c 162 2
#mknod raw3 c 162 3
#mknod raw5 c 162 5
#mknod raw6 c 162 6
#mknod raw7 c 162 7
#mknod raw8 c 162 8
#mknod raw9 c 162 9
#raw /dev/raw/raw1 /dev/sda13p1
-------错误
Cannot open master raw device
裸设备配置时raw命令报错
现象描述:SLES10 SP3系统下,利用命令
# raw /dev/raw/raw1 /dev/sda13p1挂接裸设备失败.
3、原因分析:
一、可能的原因有:
1、内核编译错误.
2、相关module未安装.
3、相关module未加载.
二、module查询方法:
# zgrep -i raw /proc/config.gz
若返回类似:
CONFIG_IEEE1394_RAWIO=m
CONFIG_IP_NF_RAW=y
CONFIG_IP6_NF_RAW=y
CONFIG_RAW_DRIVER is not set
则是原因1或原因2导致裸设备挂接失败
建议重新部署操作系统.
若返回类似:
CONFIG_IP_NF_RAW=m
CONFIG_IP6_NF_RAW=m
CONFIG_IEEE1394_RAWIO=m
CONFIG_ARCNET_RAW=m
CONFIG_HDLC_RAW=y
CONFIG_HDLC_RAW_ETH=y
CONFIG_SERIO_RAW=m
CONFIG_RAW_DRIVER=m
CONFIG_MAX_RAW_DEVS=4096
CONFIG_SND_RAWMIDI=m
CONFIG_USB_SERIAL_SIERRAWIRELESS=m
则是原因3导致裸设备挂接失败.
4、处理过程:
一、利用命令# raw –qa查询裸设备,返回报错:
Cannot open master raw dev