Pednekar, Shirish
2022-May-11 06:54 UTC
[Samba] Truncated list of files/folders when using AWS EFS share
Hello Samba Team, I have Samba Server Version 4.14.5 installed on RHEL8 (REDHAT_SUPPORT_PRODUCT_VERSION="8.5") Installed on an EC2 instance and the mount is an EFS. I can't list all the files/folders browsing from the windows client. The output varies depending on the client from which I am looking from. However, if I share a local folder rather than an EFS, then I get consistent and correct results. The writeup below refers the details on the AWS EFS dive only. Config in samba.conf --- [global] realm = SAMPLE.ORG workgroup = EXAM security = ads kerberos method = secrets and keytab template homedir = /home/%U idmap config * : backend = tdb idmap config * : range = 10000-199999 idmap config EXAM : backend = sss idmap config EXAM : range = 200000-2147483647 load printers = no machine password timeout = 0 log level = 4 [data-robo] comment = AWS EFS share drive browseable = Yes read only = No write list = @group1, at group2 public = No path = /data/robo2 valid users = @group1, at group2 force directory mode = 777 --- * There is a production folder with ~4210 files. As i listed on the shell on the samba box itself. This is the log output when browsing from windows file explorer .. the number of files shown is 389 [2022/05/04 02:48:29.047315, 4] ../../source3/smbd/vfs.c:936(vfs_ChDir) vfs_ChDir to /data/Simulations2 [2022/05/04 02:48:29.048635, 3] ../../source3/smbd/smb2_server.c:3874(smbd_smb2_request_error_ex) smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[1] status[STATUS_NO_MORE_FILES] || at ../../source3/smbd/smb2_query_directory.c:160 * This is when listing from a mobaxterm .. the number of files shown is 364 [2022/05/03 07:38:54.786180, 3] ../../source3/smbd/smb2_server.c:3874(smbd_smb2_request_error_ex) smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[1] status[STATUS_NO_MORE_FILES] || at ../../source3/smbd/smb2_query_directory.c:160 [2022/05/03 07:38:54.787453, 4] ../../source3/smbd/vfs.c:936(vfs_ChDir) vfs_ChDir to simulations/test_tmp [2022/05/03 07:38:54.787493, 4] ../../source3/smbd/vfs.c:936(vfs_ChDir) * I mapped the shared to a V: on windows box then went v: and performed a "dir" from dos prompt .. the number of files shown is 478 File(s) [2022/05/04 02:54:44.764868, 3] ../../source3/smbd/smb2_server.c:3874(smbd_smb2_request_error_ex) smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[1] status[STATUS_NO_MORE_FILES] || at ../../source3/smbd/smb2_query_directory.c:160 * This is when listed from a powershell on the same windows box .. the number of files shown is 24 [2022/05/04 02:53:46.623643, 3] ../../source3/smbd/smb2_server.c:3874(smbd_smb2_request_error_ex) smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[1] status[STATUS_NO_MORE_FILES] || at ../../source3/smbd/smb2_query_directory.c:160 Another test was , If I create a wew subfolders and then create say 500 files/folders there , about 350 show up. But all can be accessed if I give the complete address in the windows explorer. If I create 350, then all show up. If I create the 351st folder, then one gets randomly invisible but it can be accessed if I give the complete address in the windows explorer. If I delete the 351st dir, then the other 350 show up correctly. If I create another subfolder, maybe 200 will show up, so this number may be random. Greatly appreciate your assistance. Many thanks for your help, Shirish
Rowland Penny
2022-May-11 07:27 UTC
[Samba] Truncated list of files/folders when using AWS EFS share
On Wed, 2022-05-11 at 06:54 +0000, Pednekar, Shirish via samba wrote:> Hello Samba Team, > > > I have Samba Server Version 4.14.5 installed on RHEL8 > (REDHAT_SUPPORT_PRODUCT_VERSION="8.5") > Installed on an EC2 instance and the mount is an EFS. I can't list > all the files/folders browsing from the windows client. The output > varies depending on the client from which I am looking from. > However, if I share a local folder rather than an EFS, then I get > consistent and correct results. > > The writeup below refers the details on the AWS EFS dive only. > > Config in samba.conf > --- > [global] > realm = SAMPLE.ORG > workgroup = EXAM > security = ads > kerberos method = secrets and keytab > template homedir = /home/%U > idmap config * : backend = tdb > idmap config * : range = 10000-199999 > idmap config EXAM : backend = sss > idmap config EXAM : range = 200000-2147483647You are using sssd for authentication (this is not maintained by Samba, hence Samba cannot supply support for it), so I suggest you start by contacting the sssd-users mailing list for help, either that, or move to winbind authentication. Rowland
Ralph Boehme
2022-May-11 07:30 UTC
[Samba] Truncated list of files/folders when using AWS EFS share
On 5/11/22 08:54, Pednekar, Shirish via samba wrote:> I have Samba Server Version 4.14.5 installed on RHEL8 > (REDHAT_SUPPORT_PRODUCT_VERSION="8.5") Installed on an EC2 instance > and the mount is an EFS. I can't list all the files/folders browsing > from the windows client.does EFS support xattrs? If not, you could try setting "store dos attributes = no", but I'm not sure if this is going to help. You may want to closely inspect a Samba log with level 10, comparing both cases to find out where things go south. The code of the directory enumeration loop is not that hard to follow, in the logs look out for lines containing "smbd_dirptr_get_entry". Hth! -slow -- Ralph Boehme, Samba Team https://samba.org/ SerNet Samba Team Lead https://sernet.de/en/team-samba -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenPGP_signature Type: application/pgp-signature Size: 840 bytes Desc: OpenPGP digital signature URL: <http://lists.samba.org/pipermail/samba/attachments/20220511/073cf49c/OpenPGP_signature.sig>