[Samba] Missing Files/Missing Folders from an NFS Share

Jeremy Allison jra at samba.org
Wed Feb 15 17:48:10 UTC 2023


On Wed, Feb 15, 2023 at 02:06:38PM +0100, Conor Armstrong via samba wrote:
>Folks
>
>I'm having trouble with a samba share of a folder.  When the number of
>entries in the folder is large, then large numbers of entries are missing
>when viewed from a Windows 10 client.  For example a folder with 5000 sub
>folders, only about 550 show up.
>
>If I share an identical folder, which is backed on local block storage on
>the server all the folders appear as expected on the windows client.
>
>If I access the share locally on the server using smbclient, then I can see
>all the folders as expected.
>
>It is not a permissions issue - there is full read/write for owner, group &
>world on all folders, parent folder etc.  Also, folder names are not long -
>just a 4 digit number.
>
>The server is Unbuntu 22.04 and the Samba version is 4.15.13.
>
>I have run the server at Debug Level 10 and captured the logs of the folder
>mounted via an NFS share and then compare it to the same folder mounted
>from a local block storage device, I can see that the error seems to be
>arising within the smbd_marshall_dir_entry function in trans2.c as follows:
>
>[2023/02/15 00:03:11.268209,  9, pid=2573823, efective(33, 33), real(33,
>0)] ../../source3/smbd/trans2.c:2426(smbd_marshall_dir_entry)
>
>  smbd_marshall_dir_entry: out of space (wanted 112, had 8)

This error isn't a "fatal" error. It's just informational
(and internal) meaning we're going to return STATUS_MORE_ENTRIES.

The client should just keep issuing findnext requests until
the enumeration is finished. This message may be a red herring.

>I have looked at the source code and it appears to be the size of the
>*in_output_buffer* is too small.  Not yet sure where that buffer is
>allocated and why it would be sufficient for a share from block storage and
>not one from an NFS share when the contents of both are identical.

That buffer almost certainly not the problem. To debug
this, get a comparative wireshark trace between "working"
to local storage and "failing" to NFS storage and look
at the findfirst/findnext calls.

But as Rowland already said, Samba over NFS isn't a great
idea. Maybe put Samba on the NFS server ? Or upgrade to
4.17 ?



More information about the samba mailing list