Operations upon a file sized greater than 2 GB fail with a 'file size limit exceeded' error.
Samba shares that are mounted using smbmount (which internally use the command mount -t smbfs) use the smbfs.o kernel module. This module does not support file sizes larger than 2 GB.
Resolving The Problem
The 2.4 linux kernels introduced support for large file sizes (LFS). They can pass the lfs option to the smbfs kernel module.
A common misconception about smbfs.o is that it is a part of the Samba package. It is actually a filesystem module for the kernel to dialogue over the CIFS/SMB protocol.
If you need to copy a file to Samba Share using smbclient, then use the following syntax:
$smbclient //<machine_name>/<samba_share_name> <password> -U <username> -c 'put <file_name>'
To test this:
1. As root, generate a file of 2.1 gigabytes:
dd if=/dev/zero of=largefile bs=100M count=21
2. Mount the file system including the lfs option:
mount -t smbfs //my_server/share /mnt/smbfs -o username=nz,lfs
3. Copy it:
cp largefile /mnt/smbfs
If you have an older kernel, you will need to upgrade to get this large file support.
17 October 2019