- 论坛徽章:
- 0
|
环境:
[root@rac2 raw]# uname -a
Linux rac2 2.6.18-194.el5 #1 SMP Mon Mar 29 22:10:29 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
[root@rac2 raw]# cat /etc/issue
Enterprise Linux Enterprise Linux Server release 5.5 (Carthage)
Kernel \r on an \m
启因:
[root@rac2 raw]# cat /etc/rc.local
..............................................................
raw /dev/raw/raw1 /dev/sdt
[root@rac2 raw]# raw -qa
/dev/raw/raw1: bound to major 8, minor 32
--向裸设备写入内容:
[root@rac2 iscsitest]# dd if=/iscsitest/test bs=1024 of=/dev/sdt count=1
0+1 records in
0+1 records out
43 bytes (43 B) copied, 0.001704 seconds, 25.2 kB/s
--显示内容正常:
[root@rac2 iscsitest]# dd if=/dev/raw/raw1 count=1
lasldkd
alskdflaskdf
iSCSI app RAW test!!
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.00077 seconds, 665 kB/s
--写入裸设备绑定时,报错:
[root@rac2 raw]# dd if=/iscsitest/test bs=1024 of=/dev/raw/raw1 count=1
dd: writing `/dev/raw/raw1': Invalid argument
0+1 records in
0+0 records out
0 bytes (0 B) copied, 0.001174 seconds, 0.0 kB/s
[root@rac2 raw]# dd if=/iscsitest/test of=/dev/raw/raw1
dd: writing `/dev/raw/raw1': Invalid argument
0+1 records in
0+0 records out
0 bytes (0 B) copied, 0.001174 seconds, 0.0 kB/s
[root@rac2 raw]# ls -al /dev/raw/raw1
crwxrwxr-x 1 root root 162, 1 May 7 01:40 /dev/raw/raw1
不知道为何,可以使用DD命令直接写入裸设备/dev/sdt.
但不能写入/dev/raw/raw1.只能读。权限没有问题。
请高人指点。 |
|