[Samba] CreateHardLink problem

David Overton david at overtons.id.au
Tue Mar 3 07:13:42 GMT 2009


Hi,

I'm developing a Windows backup application that needs to be able to
create possibly hundreds of thousands of hard links on an SMB share.
I'm running into a strange problem when that share happens to be on a
Samba server.  When the application tries to create the 10000th hard
link, the win32 CreateHardLink() function returns error code 5 "Access
is denied".  The Samba log shows:

[2009/03/03 01:29:08,  0] smbd/files.c:file_new(79)
  ERROR! Out of file structures

Some googling suggested that the "out of file structures" error occurs
when Samba exceeds its max open files limit.  Sure enough, if I change
"max open files" in smb.conf, the number of successful calls to
CreateHardLink() before the error occurs changes accordingly.

Configurations I've tried this on:
QNAP NAS device running Linux 2.6.12 (ARM) and Samba 3.0.23d
Ubuntu Server 8.10 running Linux 2.6.27 (i686) and Samba 3.2.3.
Both of these with Windows Vista as client.

Several of our customers have reported this bug with different
versions of Linux/Samba on the server and different versions of
Windows on the client, so it seems to be a widespread problem.

Has anyone encountered this problem before?  I'm not sure whether it
is a bug in Samba or Windows?
I'm new to this list.  Is this the right place to report this or would
it be better to submit a Bugzilla report?
Any idea what I can do to work around it, other than setting "max open
files" to a ridiculously high value?

Thanks

David


More information about the samba mailing list