Q. Iâ€™m using NAS server share to make a backup of my webserver. However samba is not allowing me to backup of large files (2GB+).
My Samba share mount command is as follows:
smbmount //nas1.domain.com/sharename /datanas -o username=LOGINNAME,password=LOGINPASSWORD
Now if I copy file called /var/log/httpd/access.log (which is 3.5 GB file):
cp /var/log/httpd/access.log /datanas
I get ab error – file size limit exceeded
How do I solve this problem and copy large files to NAS samba share?
A. Linux kernel use smbfs.ko/smbfs.o module and it does not support file sizes greater than 2 GB. This is well known problem.
Mount your NAS samba share with lfs (large file system) option. General syntax is as follows:
smbmount //Hostname/Username /local/mountpoint -o username=username,password=password,lfs
# smbmount //nas1.domain.com/sharename /datanas -o username=LOGINNAME,password=LOGINPASSWORD,lfs
- //nas1.domain.com/sharename : Server and Share name
- /datanas : Local mount point
- -o username=LOGINNAME,password=LOGINPASSWORD,lfs : Specify login, password and lfs options
Now you should be able to copy large files w/o a problem.Share this tutorial on: