SMBv1 Deprecation / SMBv2 support in FreeBSD

Alan Somers asomers at freebsd.org
Thu Dec 19 20:26:30 UTC 2019


On Thu, Dec 19, 2019 at 11:40 AM Miroslav Lachman <000.fbsd at quip.cz> wrote:

> Martin Simmons wrote on 2019/12/19 17:47:
> >>>>>> On Thu, 19 Dec 2019 00:12:00 +0100, Miroslav Lachman said:
> >>
> >> I would like to resurrect this old thread from 2017-06 as I have the
> >> need to use mount_smbfs on FreeBSD but this old implementation (still)
> >> lacks support for SMB2/3.
> >>
> >> I am not a developer so I cannot do any coding work. I would like to
> >> know if somebody tried to add support for SMBv2 to FreeBSD? Is it really
> >> hard to extend it to support SMB2? Or should it be implemented from
> scratch?
> >> I tried to find more on this topic in mailing lists and FreeBSD forums
> >> without much success. I found that Apple open source has it. For example
> >>
> https://opensource.apple.com/source/smb/smb-759.40.1/kernel/smbfs/smbfs_smb_2.c.auto.html
> >> I know Apple kernel is too different but anyway - can it be ported to
> >> FreeBSD in some way?
> >>
> >> It is very sad that FreeBSD is so far behind competitors in some network
> >> service where FreeBSD was very strong in the past.
> >>
> >> CIFS/SMB2 is the only option in some heterogenous environments.
> >
> > Have you tried using sysutils/fusefs-smbnetfs?  I don't know how fast it
> is,
> > but I think FreeBSD's FUSE has improved since that thread started.
>
> I didn't tried it because what I read about it on forums is nothing
> good. Slow, unstable, not suitable for mounting 30+ shares on boot from
> fstab. Somebody reported speed with fusefs-smbnetfs less than 1Mbps.
> Also I found somebody trying to use gvfs to access samba shares on
> headless servers but again it was something I don't want in production.
> It gvfs is also userspace for browsing not for permanent mounting on
> defined mount points.
>
> I didn't find any other alternative in ports.
>
> Kind regards
> Miroslav Lachman
>

I think you should give it a shot.  I rewrote the FUSE kernel module for
FreeBSD 12.1.  Some of the changes, like to cacheing, could have big
effects on smb performance.  And cem made some changes in 2018 to the I/O
size which led to big improvements in other file systems' performance,
too.  At the very least a benchmark would be interesting.
-Alan


More information about the freebsd-fs mailing list