You are not logged in.

#1 2011-09-11 12:51:17

Urfaust
Member
From: Germany
Registered: 2009-01-30
Posts: 164

[Workaround] Input/Output error when copying large files over SMB/CIFS

Hi,

I have a fileserver which serves some shares via SMB. I mount these with

//IP_Adress/data /media/data cifs credentials=/path/to/credentials,iocharset=utf8,uid=1000,gid=1000 0 0

Now when I copy large files or a bunch of smaller files (can't name an exact file size but mostly >800MB) I always get an "Input/Output Error". I tried to copy the files with Thunar, PCManFm and via CLI, it's always the same. Also the whole system stalls/is very sluggish when copying, I sometimes can't move the mouse coursor....
It sometimes works when I copy the files one by one but if it's one large file I get the I/O error again.
The fileserver is a freenas box, don't know if this is related to the problem....

Any ideas how to narrow this down?

Thanks.

EDIT:
Got a bunch of messages in the logs:

[ 3171.825414] Status code returned 0xc0000008 NT_STATUS_INVALID_HANDLE
[ 3171.825424] CIFS VFS: Send error in read = -9
[ 3176.885044] CIFS VFS: Send error in read = -11

Will try to look into that.

EDIT2:

Found this blogentry which solved the problem so far.

echo 0 > /proc/fs/cifs/OplockEnabled

This will disable Opportunistic Locking.

The entry is 3 years old. So would it help to fill a bug, Arch Bugtracker, upstream?

Last edited by Urfaust (2011-09-11 15:07:49)

Offline

#2 2011-09-12 22:43:36

loblik
Member
Registered: 2011-09-12
Posts: 2

Re: [Workaround] Input/Output error when copying large files over SMB/CIFS

I have exactly the same problem.

This is related log file created by the server.

[2011/09/12 19:44:05.305132,  0] smbd/process.c:244(read_packet_remainder)
  read_fd_with_timeout failed for client 0.0.0.0 read error = NT_STATUS_CONNECTION_RESET.
[2011/09/12 19:44:19.687109,  0] smbd/process.c:244(read_packet_remainder)
  read_fd_with_timeout failed for client 0.0.0.0 read error = NT_STATUS_CONNECTION_RESET.
[2011/09/12 19:44:36.815509,  0] smbd/process.c:244(read_packet_remainder)
  read_fd_with_timeout failed for client 0.0.0.0 read error = NT_STATUS_CONNECTION_RESET.
[2011/09/12 19:44:57.005984,  0] smbd/process.c:244(read_packet_remainder)
  read_fd_with_timeout failed for client 0.0.0.0 read error = NT_STATUS_END_OF_FILE.

The client side log looks clear.

Disabling 'Opportunistic Locking' solved the problem for me but performance impact is really noticeable.
I have older machine and transfer is almost two times slower when it is disabled.

Last edited by loblik (2011-09-12 22:45:22)

Offline

#3 2011-09-13 16:33:16

Urfaust
Member
From: Germany
Registered: 2009-01-30
Posts: 164

Re: [Workaround] Input/Output error when copying large files over SMB/CIFS

I copied some files after disabling OpLock. I fully saturated my 100mbit line as before, didn't test wireless though....
Thats strange.

Last edited by Urfaust (2011-09-13 16:34:44)

Offline

#4 2011-09-20 01:30:32

Sp0tter
Member
Registered: 2011-09-20
Posts: 1

Re: [Workaround] Input/Output error when copying large files over SMB/CIFS

echo 0 > /proc/fs/cifs/OplockEnabled

This worked for me with no noticeable speed loss.

Offline

Board footer

Powered by FluxBB