1833029 Members
2261 Online
110049 Solutions
New Discussion

Samba File Corruption

 
Ty Roberts
Frequent Advisor

Samba File Corruption

We are running Samba Version 3.0.1 in a production environment. Recently, other application administrators are reporting that when moving a file from a Samba share mounted on our systems to their local servers the file is not copied across completely. They are using a DOS move command and say no error is reported on their end.

We are in the process of troubleshooting this, but wanted to bounce a few ideas off of everyone on here.

The application in question polls the Samba share every 10 seconds, so as you can imagine it gets lots of traffic. The only error we are seing being reported in the log.smbd is the following, and it is being reported very regularly (almost as often as they access the samba share):

[2005/09/27 09:59:52, 0] smbd/server.c:open_sockets_smbd(377)
open_sockets_smbd: accept: No buffer space available

I have done research on this error and have checked things on the system that have been recomended in other posts:
* tcp_conn_request_max is set to 4096
* No system resources are being pressed (memory, file table, etc)
* dbc_max_pct is set to 1


I am holding firm to my statement that this error is not causing their problems, and am also thinking that if it was Samba that dropped the connection or did not successfully transfer the file it would report some error to the Client OS. ALso since they are doing a move, I would think that if the COPY of the file did not work, then the subsequent delete would not run and the file would still exist on the server side.

Can anyone offer any thoughts or points on this for me? We are going to add in more checks before and after the copy to validate my thoughts, but I wanted to see if there are any Samba experts out there that could help out.

Thanks!
Ty
4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: Samba File Corruption

The error message does not seem to be significant. dbc_max_pct is 1, what is dbc_min_pct

You have no buffer at all and 5/7 has worked for me on other installations.

mv command to local space? What if someone else has the file locked? Try making a copy instead.

Perhaps run fuser -cu and make sure nobody has an open file handle on it. If the file is open for edit that could account for the corruption.

The subsequent delete could be done later with a find +mtime command or other device to not negatively impact the file.

I'd like to see your entire smb.conf file if your security rules allow it.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Geoff Wild
Honored Contributor

Re: Samba File Corruption

The only tuning I have done in samba is in the global section of smb.conf:

socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
keepalive = 0

As far as DBC_MAX_PCT - you want that set to the % that works out to between 500 and 800 MB of ram.

IE - if you have 10GB of ram - set it to 5 or 6 or 7 or 8...

Rememeber - that DBC_MIN_PCT must be equal or lower.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Patrick Wallek
Honored Contributor

Re: Samba File Corruption

Regarding your "No buffer space" message, have a look at this TKB document:

Title: SMBD reports "no buffer space" in syslog
Document ID: 8606412259
http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000081003534

Regarding the 'move' problem, I would also recommend trying to just copy the file rather than moving it and see if you have any better luck.
Ty Roberts
Frequent Advisor

Re: Samba File Corruption

This server has 128GB of memory and the min and max pct are both set to 1. Many years back we "fought the fight" with this setting and the dbc setting are optimal for our environment.

Pattrick, that is a great article and will help me with this problem.