HI again,

You might remember my Samba-related cry for help, last November.  I'm writing 
again to report that the problem has been resolved on my systems, as near as I 
can tell.  Perhaps my experience will help others.

The "fix" has come as a result of some changes to my filesystem structure that 
I made as a result of a recent drive replacement (the 1.8T of photos from my 
last trip ran me out of storage).  The upshot of that is that I don't know 
whether my previous troubles were misconfiguration on my part, or some sort of 
subtle bug in any of the players at the table: Samba on FreeBSD on ZFS or macOS 
Catalina's smbfs.  After some experimentation I was able to conclude that 
Lightroom itself was unlikely to be the root problem: failure was easily 
repeatable with a find in a macOS terminal session.

Quick summary of the problem: macOS Catalina would silently and 
seemingly-spontaneously disconnect from my Samba filesystems, exported from my 
FreeBSD-12-STABLE server when doing any activity that listed or stat-ed all of 
the files in a directory of some thousands.  To make matters worse, before the 
macOS 10.15.3 release, this disconnection would leave the smbfs driver, or some 
other macOS kernel state broken, and it would not be possible to re-mount or 
properly eject the failed mount without a reboot.  Since I was rebooting a lot, 
Apple were getting a lot of crash dumps from me, and their 10.15.3 release 
seems to have fixed whatever was stuck in the kernel - reboots were no longer 
required - but the disconnection problem persisted.

I have a couple of users on the file server, with the usual home directories in 
/home/<uname> and these were exported using Samba's [homes] configuration 
stanza, in the usual fashion.  I also had a shared directory, at /home/us, 
which was exported by a separate Samba stanza with an explicit path = /home/us, 
because "us" isn't a user.

When the drives filled up and I installed a new set, since I was going to 
restore from backups I took the opportunity to create a new zfs file system for 
"us" (/tank/us), and tweaked the smb4.conf accordingly.

That seems to have returned the file systems/server/macOS combination to robust 
good health.  I have not experienced a spontaneous-unmount since that change, 
and nothing else about the configuration has changed.

My guess: SMB2 enhanced security rules, which Samba enforces, insist that each 
host can only log-in/mount a given share once: any secondary mount attempt 
should cause the server to drop all mounts.  (Sorry, I can't remember which 
reference site pointed that out to me.)  Perhaps Samba is interpreting the rule 
on the basis of underlying host-side filesystem structure?  That would put the 
old /home/us and /home/uname shares on the same filesystem, and trigger the 
security rule?  Well, I always had both "mounted", but perhaps there was a 
particular pattern of heavy or slow access that triggered something?  Anyway, 
having all of the filesystems exported by Samba coming from unique zfs 
filesystems on the FreeBSD side has made everything happy.  Yay?

FWIW I'm running the latest Samba-4.10.13 from ports on FreeBSD 12.1-STABLE 
r358963 GENERIC  amd64 on a AMD Ryzen 7 1700 Eight-Core Processor with hardware 
threads turned on.

By the way, the current Samba stable release is 4.12.0 (one week old) and 
4.11.0 was released last September.  Is there some particular incompatibility 
with FreeBSD that is keeping these out of Ports?  I got quite close to trying 
to build the newer version myself, but then the problem went away...

Cheers,

Andrew Reilly
M: 0409-824-272
arei...@bigpond.net.au



> On 24 Nov 2019, at 13:46 , Matt Garber <matt.gar...@gmail.com> wrote:
> 
> On Sat, Nov 23, 2019 at 9:34 PM Andrew Reilly <arei...@bigpond.net.au 
> <mailto:arei...@bigpond.net.au>> wrote:
> 
> The other protagonist in this tale, also connected to the gigabit
> LAN, is an iMac running current-Catalina on APFS flash, mounting
> three filesystems over SMB, from Samba 4.10.10.  After appropriate
> Samba tweaking this seems to be at least as reliable as it ever was
> with netatalk or NFS, and apparently better supported by Apple.
> 
> Considering all of the other bugs and instability introduced (or 
> reintroduced) in Catalina: did you have this same Lightroom import workflow 
> configured in Mojave (or whichever other previous macOS version you were 
> using), and if so, were you encountering the same issue?
> 
> 
> Thanks,
> —
> Matt Garber
> 

_______________________________________________
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"

Reply via email to