CS01-HS Posted November 10, 2022 Share Posted November 10, 2022 I noticed a couple of strange entries when I ran testparm -v The include for smb-unassigned.conf was added to my isos share (it's nowhere else in the output): [isos] case sensitive = Yes comment = iso images include = /etc/samba/smb-unassigned.conf ... And similarly smb-shares.conf was added to my system share (which, in case it's relevant, is a cache-only share I export through /boot/config/smb-custom.conf to bypass shfs): [system] comment = system data include = /etc/samba/smb-shares.conf path = /mnt/active/system ... Restarting smb and the server didn't change it so something's adding them. Is that where they belong? I run the UD and Recycle Bin plugins which I know make some modifications. And for reference here's my SMB Extras: [global] # Fix for 6.9.0-rc2 Mac client search spotlight backend = tracker # force inclusion of acl_xattr # (doesn't work because it doesn't propagate to shares) ##vfs objects = acl_xattr catia fruit streams_xattr # tweaks from https://wiki.samba.org/index.php/Configure_Samba_to_Work_Better_with_Mac_OS_X min protocol = SMB2 #Custom include = /boot/config/smb-custom.conf Quote Link to comment
wgstarks Posted November 10, 2022 Share Posted November 10, 2022 1 hour ago, CS01-HS said: I run the UD and Recycle Bin plugins which I know make some modifications. And for reference here's my SMB Extras This is probably related to recyclebin. DLandon has already been tagged to confirm this so I won’t tag him again. Looking at your smb-extras.conf you may want to read this as well- https://forums.unraid.net/bug-reports/prereleases/macos-optimization-r2087/ It looks like you are adding settings for a Mac. There have been some changes in recent versions of unRAID regarding how smb settings are applied. 1 Quote Link to comment
CS01-HS Posted November 10, 2022 Author Share Posted November 10, 2022 Right, I have my per-share customizations in smb-fruit. Why does something look off? (Ignore the commented lines, they're leftover from earlier experimentation) Quote Link to comment
dlandon Posted November 10, 2022 Share Posted November 10, 2022 Working on a fix. 1 Quote Link to comment
wgstarks Posted November 10, 2022 Share Posted November 10, 2022 20 minutes ago, CS01-HS said: does something look off? I would think that you would want to put spotlight settings in smb-fruit.conf. It may not matter but as I understand the new changes any settings applied from smb-extras.conf could get overwritten due to the order that settings are applied on array start. Any settings in smb-fruit.conf are applied last in the process. DISCLAIMER- I’m not an smb expert so I may be wrong. Quote Link to comment
CS01-HS Posted November 10, 2022 Author Share Posted November 10, 2022 10 minutes ago, wgstarks said: I would think that you would want to put spotlight settings in smb-fruit.conf. AFAIK the fix still requires a global setting (which you're seeing in extras) and a per-share setting (which I have in fruit) Quote Link to comment
wgstarks Posted November 10, 2022 Share Posted November 10, 2022 So is spotlight indexing working for you? Quote Link to comment
CS01-HS Posted November 10, 2022 Author Share Posted November 10, 2022 Partially - with the fix I can (once again) search my shares in Finder. That backend override to a nonexistent tracker fails gracefully (the default does not.) Proper "spotlight" is more comprehensive, some solutions on this forum but I haven't investigated. Quote Link to comment
wgstarks Posted November 10, 2022 Share Posted November 10, 2022 8 minutes ago, CS01-HS said: Partially - with the fix I can (once again) search my shares in Finder. Yeah, Finder searches work for me without any spotlight settings applied in smb but no spotlight indexing. 1 Quote Link to comment
CS01-HS Posted November 10, 2022 Author Share Posted November 10, 2022 Oh! Well that's useful information. I've had the fix in place since 6.9 broke it. I must have missed a fix in the release notes. I'll test without it, thanks. Quote Link to comment
wgstarks Posted November 10, 2022 Share Posted November 10, 2022 Just to be clear though it’s very slow. Maybe 10 or 15 minutes with shares that have several thousand items. Quote Link to comment
CS01-HS Posted November 10, 2022 Author Share Posted November 10, 2022 I did a quick test on a share with only a dozen files and no subdirs: With my setup search returned the matching result instantly. Then I added spotlight backend = noindex (the default) to smb-custom, restarted samba and searched again. No results after 30 seconds. So I want to say the fix is an improvement except when I removed the newly-added backend line from smb-custom and restarted, nothing changed - still no results. Maybe a proper test requires stopping and starting the array, which I can't do at the moment. Quote Link to comment
wgstarks Posted November 10, 2022 Share Posted November 10, 2022 Yes. AFAIK you have to restart the array to apply every change. I know some posts say samba restart but that never works for me. Can you post the setup you use for the fastest search? Quote Link to comment
CS01-HS Posted November 10, 2022 Author Share Posted November 10, 2022 Add the following line to the [global] section of SMB Extras (which you can do via the GUI): spotlight backend = tracker And the following line to /boot/config/smb-fruit.conf (which will add it to each share) spotlight = yes You can use this post as a reference but I wrote it before the advent of smb-fruit, so this new way is better. 1 Quote Link to comment
dlandon Posted November 10, 2022 Share Posted November 10, 2022 7 hours ago, CS01-HS said: I noticed a couple of strange entries when I ran testparm -v Does the testparm -v show any errors? Quote Link to comment
CS01-HS Posted November 10, 2022 Author Share Posted November 10, 2022 25 minutes ago, dlandon said: Does the testparm -v show any errors? Only WARNINGS before hitting enter but I think those were always there: [email protected]:/boot/config# testparm -v Load smb config files from /etc/samba/smb.conf lpcfg_do_global_parameter: WARNING: The "null passwords" option is deprecated lpcfg_do_global_parameter: WARNING: The "syslog" option is deprecated Loaded services file OK. Weak crypto is allowed by GnuTLS (e.g. NTLM as a compatibility fallback) Server role: ROLE_STANDALONE Press enter to see a dump of your service definitions Quote Link to comment
dlandon Posted November 10, 2022 Share Posted November 10, 2022 What's gloing on here is a change I made to UD to put the share includes in the smb.conf file instead of the smb-extra.conf. The idea was to get the settings out of the smb-extra.conf because of users making all kinds of changes now in the smb-extra.conf and the UD settings would be confusing. When I added the include in the smb.conf file, it was added after the shares include entry. Previously it was before the shares include because it was in smb-extra.conf. This is what caused the "include =" statements to show in the shares with testparm. It looks like testparm is actually including the [global] file includes in the share inappropriately. If no errors or warnings are appearing in testparm regarding the include statements, it appears that it's just a display aberation in testparm. That being said, I'm going to put the include for UD in the smb.conf before shares include and not after. This will prevent the includes from showing in the shares in testparm. Look for a UD update soon. 1 Quote Link to comment
wgstarks Posted November 11, 2022 Share Posted November 11, 2022 6 hours ago, CS01-HS said: Add the following line to the [global] section of SMB Extras (which you can do via the GUI): spotlight backend = tracker And the following line to /boot/config/smb-fruit.conf (which will add it to each share) spotlight = yes You can use this post as a reference but I wrote it before the advent of smb-fruit, so this new way is better. Thanks. Took a few hours to start working (not sure why) but working great now. Only a few seconds lag. 👍 1 Quote Link to comment
CS01-HS Posted November 11, 2022 Author Share Posted November 11, 2022 (edited) 14 hours ago, dlandon said: I'm going to put the include for UD in the smb.conf before shares include and not after. This will prevent the includes from showing in the shares in testparm. Installed and rebooted - mixed results: The smb-shares include line is still present in the share: [system] case sensitive = Yes comment = system data include = /etc/samba/smb-shares.conf The smb-unassigned include line is gone from the share but it's not present anywhere (according to testparm) Should I add it manually to smb-extras and if so where? [global] # Fix for 6.9.0-rc2 Mac client search spotlight backend = tracker # tweaks from https://wiki.samba.org/index.php/Configure_Samba_to_Work_Better_with_Mac_OS_X min protocol = SMB2 #Custom include = /boot/config/smb-custom.conf Edited November 11, 2022 by CS01-HS I shouldn't post before coffee Quote Link to comment
CS01-HS Posted November 11, 2022 Author Share Posted November 11, 2022 (edited) 10 hours ago, wgstarks said: Took a few hours to start working That's strange because I don't think spotlight indexing enters into it. If I had to guess maybe some time within those few hours you disconnected/reconnected automatically or explicitly and that's what did it. Either way, glad it worked. Edited November 11, 2022 by CS01-HS Quote Link to comment
dlandon Posted November 11, 2022 Share Posted November 11, 2022 49 minutes ago, CS01-HS said: The smb-shares include line is still present in the share: This isn't the place to define a share. As it is now, the "include = /etc/samba/smb-shares.conf" is being added to the [system] share because it is right after the smb-extra.conf include in smb.conf and the scope is still [system] when it returns to smb.conf and not [global]. The smb-extra.conf settings are global. I don't know your disk and shares configuration, but set up a [system] share on your cache disk? Hopefully your cache is not on the array. 50 minutes ago, CS01-HS said: The smb-unassigned include line is gone from the share but it's not present anywhere (according to testparm) Should I add it manually to smb-extras and if so where? There is no need to add it manually. The include is in smb.conf. Again, don't depend on testparm to show the includes properly. Quote Link to comment
CS01-HS Posted November 11, 2022 Author Share Posted November 11, 2022 4 minutes ago, dlandon said: Again, don't depend on testparm to show the includes properly. Got it. Shame there's no simple way to confirm, makes me wonder about my own customizations. 5 minutes ago, dlandon said: As it is now, the "include = /etc/samba/smb-shares.conf" is being added to the [system] share because it is right after the smb-extra.conf include in smb.conf and the scope is still [system] when it returns to smb.conf and not [global]. Huh, so is it better to put the smb-custom include at the top of smb-extras so scope is [global] when it returns? e.g. #Custom include = /boot/config/smb-custom.conf [global] # Fix for 6.9.0-rc2 Mac client search spotlight backend = tracker # tweaks from https://wiki.samba.org/index.php/Configure_Samba_to_Work_Better_with_Mac_OS_X min protocol = SMB2 9 minutes ago, dlandon said: a [system] share on your cache disk? Hopefully your cache is not on the array. I have a dedicated pool that serves docker, VM and scratch called active (single-disk, XFS), cache is separate. Here's my full smb-custom.conf if you're curious: Spoiler [scratch] comment = scratch disk case sensitive = Yes path = /mnt/active/scratch spotlight = Yes valid users = me macos limited vfs objects = catia fruit streams_xattr extd_audit recycle write list = me macos limited recycle:exclude_dir = .Recycle.Bin recycle:exclude = *.tmp recycle:versions = Yes recycle:minsize = 1 recycle:touch_mtime = No recycle:touch = Yes recycle:keeptree = Yes recycle:directory_mode = 0777 recycle:repository = .Recycle.Bin fruit:zero_file_id = yes fruit:delete_empty_adfiles = yes fruit:wipe_intentionally_left_blank_rfork = yes fruit:veto_appledouble = no fruit:posix_rename = yes fruit:model = MacSamba fruit:encoding = native [system] comment = system data case sensitive = Yes path = /mnt/active/system spotlight = Yes valid users = me macos vfs objects = catia fruit streams_xattr extd_audit recycle write list = me macos recycle:exclude_dir = .Recycle.Bin recycle:exclude = *.tmp recycle:versions = Yes recycle:minsize = 1 recycle:touch_mtime = No recycle:touch = Yes recycle:keeptree = Yes recycle:directory_mode = 0777 recycle:repository = .Recycle.Bin fruit:zero_file_id = yes fruit:delete_empty_adfiles = yes fruit:wipe_intentionally_left_blank_rfork = yes fruit:veto_appledouble = no fruit:posix_rename = yes fruit:model = MacSamba fruit:encoding = native Quote Link to comment
dlandon Posted November 11, 2022 Share Posted November 11, 2022 Define the shares as Unraid shares cache only, set "Enhanced macOS interoperability" to "Yes" and set up the smb-fruit.conf for the fruit customizations. The recycle bin would be applied automatically. You are doing too much customization for my comfort. Quote Link to comment
CS01-HS Posted November 11, 2022 Author Share Posted November 11, 2022 Yes I've done all of that. My only aim with smb-custom was to define the path explicitly - bypass shfs to avoid SMB-related fuse errors which have broken my shares/necessitated restarts. The rest of those settings I took as-is from testparm. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.