3 Jun 2004 23:34
write system call returning success after SCSI write failure
jiju peter <jpeter16 <at> yahoo.com>
2004-06-03 21:34:38 GMT
2004-06-03 21:34:38 GMT
I am running RHEL3 server connected to a
JBOD using a fiber channel HBA. I mounted
a disk using ext3 file system with -o sync
option on directory /mntb.
Then I unplugged the fiber channel cable and
did following commands.
echo 1 > /tmp/file1
cp /tmp/file1 /mntb/file
echo $?
The cp command waited for 30 seconds and there
are SCSI and file system error messages on the
console as expected. I am sure that the data
did not reach the fiber channel disk. But the
exit status of cp command is zero.
This is an strace of cp command
====
open("/mntb/file", O_WRONLY|O_TRUNC|O_LARGEFILE) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=2, ...}) = 0
read(3, "2\n", 4096) = 2
write(4, "2\n", 2) = 2
read(3, "", 4096) = 0
close(4) = 0
close(3) = 0
===========
(Continue reading)
RSS Feed