Out of Space error when using CIFS to mount file system from NAS or other device


SUMMARY

Aug 21, 2015

Some customers have reported that they get an error usually an out of space error when trying to copy files to a third party NAS or other CIFS file system when using Snare Server v6 even though there are no physical space issues. A symptom is a file could become corrupted and maybe slightly smaller than the original and may not open correctly or seems to be missing data if it was a tar ball or zip file.

The issue appears to be a change in the buffer size for the mount.cifs system call in Ubuntu and it is attempting to use a 57k buffer size and not all devices can handle this.  To address the use a smaller value such as setting wsize=32768 in the mount option. ie

mount -t cifs //host/sharename /mnt/mountpoint -o credentials=/root/mylogindetails,wsize=32768

Ensure that you unmount and remount the file system after you make the change and if you want to make the change permanent then update the /etc/fstab file.