[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

write system call returning success after SCSI write failure



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
===========
 
Looks like files system is not propagating the 
error to the system call. With the sync option in
mount command I expected the open and write system
calls to fail if I/O to FC disk returned error.

I repeated this test using two vendor's 
fiber channel HBAs. Both gave same result. I can see 
SCSI commands returning with error.

Is this expected behavior with ext3-fs mounted with
sync option?

thanks,
J Peter


	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]