[linux-cifs-client] Transfering large files with CIFS over an openvpn tunnel

Stanislav Maslovski stanislav.maslovski at gmail.com
Fri May 11 07:30:19 GMT 2007


Hello,

I got this problem when switched from smbfs to cifs.

I mounted a share over an openvpn tunnel, like this:
sudo mount -t cifs '\\172.16.1.2\share' /mnt -ousername=xxx,password=yyy,uid=1000,gid=1000,file_mode=0644,dir_mode=0755,iocharset=utf8

On the other side of the tunnel there was Windows XP Professional SP2.
The share was on an NTFS volume.

Then I tried to copy a large file (about 1.3 Gb) to the new mount. The
coping started with a speed of about 20-30 Mbytes/sec (the network
connection speed is much less), and after it "copied" (to where?) about 300 Mbytes
of data the transfer stopped and the following error messages
began to appear on the console:

CIFS VFS: server not responding
CIFS VFS: No response to cmd 47 mid 16722
CIFS VFS: No response to cmd 47 mid 16721
CIFS VFS: Write2 ret -11, written=0
CIFS VFS: Write2 ret -112, written=0
CIFS VFS: Write2 ret -112, written=0
CIFS VFS: Write2 ret -112, written=0
............................

It was impossible to kill the copying process, and in a few tens of secods
the system became practically not responsible: I could not login as root on the other
console, Сtl-Alt-Del was not effective, etc, so I had to hard reset.

After some experimentation I found that adding 'directio' to the mount options
solved this problem.

Before I switched to cifs, smbfs worked flawlessly with the same set-up.

I am not an expert at all, but for me it seems that either cifs in kernel or
something related to openvpn eats lot of RAM (in kernel space?) till the system
effectively dies.

Versions of the related software:
OS: Debian Etch 4.0
Kernel: 2.6.21.1 (also happens with the default 2.6.18 from Debian Etch)
OpenVPN: 2.0.9 (on both sides of the tunnel)

-- 
Stanislav


More information about the linux-cifs-client mailing list