From owner-freebsd-fs@freebsd.org Thu Dec 19 20:26:30 2019 Return-Path: Delivered-To: freebsd-fs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3A6BE1EA8F6 for ; Thu, 19 Dec 2019 20:26:30 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi1-f175.google.com (mail-oi1-f175.google.com [209.85.167.175]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47f3LY1vVdz45g0 for ; Thu, 19 Dec 2019 20:26:28 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oi1-f175.google.com with SMTP id l136so3673144oig.1 for ; Thu, 19 Dec 2019 12:26:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fi10kavSYvdilRQvaiZLrOvdX8VO8LpHB9+9pD9pTKE=; b=Gwce0a/ZNYXm/0ETy4ydL3tSI1K8LzrdvNuh6kMGM6+bTfmLO26cbjkzxoBAVgiE+i Snaxkcpr10qOnjjdoJ1xe7wS7mIxsdYpkugKF2GnZhVPx6RySrkxzZpAg2Jp+6Zoqt/k VRr26zVEQZvKW1k4CF8RzDYpPZ4oc17cQrhn60hYMRN9AyxngI0JvAVhbPG455pH6DzT M1iXy9FghVNfUx3ihIxH8sINL0FuRMN2BZ1bPLiHpNf4J+e41Q5hH3K5KC5J/J8hoRzA 06hNoIoL6JkJkmTxSs7JjBr2wFyQ7YAcRnGu3SxtJthMfnpanZb3rW+63rwGRPJ3RitM PlBA== X-Gm-Message-State: APjAAAX9udA/31Qx7lo8VndKHCnsJrLEKAOChiKbddXIacSQOhcOTnTE ifbnqbJ3H/aQ3fj2qg+vcgM6s5oMTcPSDLrTKqc= X-Google-Smtp-Source: APXvYqwmYVaJCcjt0MgygA7Sk7EgTxvZqzWZBgPkxhjkx9w4lk2aviJubHjQyrTVClbUjREvleR+fw0pcJhdAxNwZEo= X-Received: by 2002:aca:5ad4:: with SMTP id o203mr3112835oib.73.1576787187983; Thu, 19 Dec 2019 12:26:27 -0800 (PST) MIME-Version: 1.0 References: <9b556cbe-f9f3-ab15-6fcd-71397d18c126@freebsd.org> <20170623104654.07e5a3e0@ernst.home> <45b0864b-680c-8fe0-f5a5-353b6373d069@freebsd.org> <20170624045543.GY39245@kduck.kaduk.org> <201912191647.xBJGleRa028173@higson.cam.lispworks.com> In-Reply-To: From: Alan Somers Date: Thu, 19 Dec 2019 13:26:16 -0700 Message-ID: Subject: Re: SMBv1 Deprecation / SMBv2 support in FreeBSD To: Miroslav Lachman <000.fbsd@quip.cz> Cc: Martin Simmons , freebsd-fs , theunusualmatt@gmail.com X-Rspamd-Queue-Id: 47f3LY1vVdz45g0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.167.175 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-2.07 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-fs@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; TO_DN_SOME(0.00)[]; URI_COUNT_ODD(1.00)[3]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[175.167.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-1.07)[ip: (-0.30), ipnet: 209.85.128.0/17(-3.12), asn: 15169(-1.90), country: US(-0.05)]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[175.167.85.209.rep.mailspike.net : 127.0.0.17]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Dec 2019 20:26:30 -0000 On Thu, Dec 19, 2019 at 11:40 AM Miroslav Lachman <000.fbsd@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