Tuning Samba for more speed 2

  • This is a follow-up to thread: Tunning Samba for more speed


    Hi!


    Tried following this to speed up my SMB shares also!


    My findings are:
    when adding:
    socket options = TCP_NODELAY SO_RCVBUF=65536 SO_SNDBUF=65536
    read raw = yes 1
    write raw = yes
    max xmit = 65535
    dead time = 15
    getwd cache = yes
    I get some improvements on speed, but not much.
    Tried adding "min protocol = smb2" also, but then my Mac (El Capitan) refuses to connect with the error "There was a problem connecting to the server “openmediavault - SMB/CIFS”.". Removing it results in me being able to connect again. But then I see my connection using SMBv1!
    US001277:~ odinb$ smbutil statshares -a
    ==================================================================================================
    SHARE ATTRIBUTE TYPE VALUE
    ==================================================================================================
    OMV-Media
    SERVER_NAME openmediavault - SMB/CIFS._smb._tcp.local
    USER_ID 839448149
    SMB_NEGOTIATE AUTO_NEGOTIATE
    SMB_VERSION SMB_1
    SMB_SHARE_TYPE UNKNOWN
    EXTENDED_SECURITY_SUPPORTED TRUE
    UNIX_SUPPORT TRUE
    LARGE_FILE_SUPPORTED TRUE
    CLIENT_REQUIRES_SIGNING TRUE
    --------------------------------------------------------------------------------------------------
    US001277:~ odinb$
    As far as I know, El Capitan should be compatible with smb3 (Poor SMB3 Performance).
    I do not have any settings on my Mac to force smbv1 only:
    US001277:~ odinb$ cat /etc/nsmb.conf
    cat: /etc/nsmb.conf: No such file or directory
    US001268677:~ epkodin$ cat ~/Library/Preferences/nsmb.conf
    cat: /Users/epkodin/Library/Preferences/nsmb.conf: No such file or directory
    US001277:~ odinb$


    OMV2.2.5 Stone Burner (which I run) has samba version 3.6.6 installed as far as I can see:
    root@openmediavault:/etc# smbstatus
    Samba version 3.6.6
    PID Username Group Machine
    -------------------------------------------------------------------
    12892 oder users us001277 (192.168.1.70)
    Service pid machine Connected at
    -------------------------------------------------------
    OMV-Media 12892 us001277 Sun Jul 31 16:40:35 2016
    No locked files
    root@openmediavault:/etc#


    Could it be that SMB2 is not supported fully in Samba 3.6.6? If not, why can I not connect after adding "min protocol = smb2" to OMV?

  • OMV 2.x uses samba 3.6.6 which does support smb2. The problem isn't the protocol as much as Win10 and samba 3.6. Install the backports kernel (if you have already, button to do it in omv-extras) and then install samba 4 from backports. This supports Win10 and smb3 protocol.

    omv 5.5.2 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.3.3
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Thanks for the response!


    Did the "backports kernel" via OMV-Extras.


    Code
    root@openmediavault:/# uname -a
    Linux openmediavault 3.16.0-0.bpo.4-amd64 #1 SMP Debian 3.16.7-ckt25-2+deb8u3~bpo70+1 (2016-07-07) x86_64 GNU/Linux
    root@openmediavault:/#


    Do not see anything related to back ports (for samba 4), how do I do the second step?

  • Thanks, did the upgrade, and now ran into another issue!


    I now cannot access my shares! Have rebooted both OMV and client, re-created the share under SMB/CIFS, re-authorised under "Access Rights Management", still no cigar!


    On windows, I get the error "The network path was not found", and on OS X I get "The operation can't be completed because the original item for "share" can't be found.".


    What log should I check when trying to connect?


    Did a "tail -f" on both "/var/log/messages" and "/var/log/samba/log.smbd", but I am not seeing anything when trying to connect!


  • Still no go, even rebooted the OMV server...


    "tail -f" on the above 2 files still not showing anything, but I did check the "/var/log/samba/log.smbd" file for messages, and found something, do not know if it is related or not:


    Code
    [2016/08/02 17:06:06, 0] ../source3/smbd/server.c:1189(main)
    smbd version 4.1.17-Debian started.
    Copyright Andrew Tridgell and the Samba Team 1992-2013
    [2016/08/02 17:06:06, 1] ../source3/param/loadparm.c:3179(lp_do_parameter)
    WARNING: The "null passwords" option is deprecated
    [2016/08/02 17:06:06, 0] ../source3/param/loadparm.c:1325(lp_bool)
    lp_bool(yes 1): value is not boolean!
  • Yes, I have the following:



    Code
    socket options = TCP_NODELAY SO_RCVBUF=65536 SO_SNDBUF=65536
    read raw = yes 1
    write raw = yes
    max xmit = 65535
    dead time = 15
    getwd cache = yes
    # min protocol = smb2

    and it is added to "/etc/samba/smb.conf".


    tried removing them, still no go, rebooted, still no go...

  • Are you manually editing the smb.conf file? If so, you shouldn't. Remove everything from extra options in settings and by share.


    I just tested samba 4.1 on an OMV 2 VM and it works fine. You must have some option and/or customization that doesn't work with samba 4.

    omv 5.5.2 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.3.3
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • No matter what settings I try on my VM, it still works. So, post the output of: cat /etc/samba/smb.conf

    omv 5.5.2 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.3.3
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • root@openmediavault:~# cat /etc/samba/smb.conf
    #======================= Global Settings =======================
    [global]
    workgroup = WORKGROUP
    server string = %h server
    dns proxy = no
    log level = 1
    syslog = 1
    log file = /var/log/samba/log.%m
    max log size = 1000
    syslog only = yes
    panic action = /usr/share/samba/panic-action %d
    encrypt passwords = true
    passdb backend = tdbsam
    obey pam restrictions = yes
    unix password sync = no
    passwd program = /usr/bin/passwd %u
    passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
    pam password change = yes
    socket options = TCP_NODELAY IPTOS_LOWDELAY
    guest account = nobody
    load printers = no
    disable spoolss = yes
    printing = bsd
    printcap name = /dev/null
    unix extensions = yes
    wide links = no
    create mask = 0777
    directory mask = 0777
    use sendfile = yes
    aio read size = 16384
    aio write size = 16384
    null passwords = yes
    local master = yes
    time server = no
    wins support = no


    #======================= Share Definitions =======================
    [OMV-Media]
    path = /media/f7e3bc30-c184-4f4d-aa81-b87ffeb6d844/OMV-Media/
    guest ok = no
    read only = no
    browseable = yes
    inherit acls = yes
    inherit permissions = yes
    ea support = no
    store dos attributes = no
    vfs objects = recycle
    recycle:repository = .recycle/%U
    recycle:keeptree = yes
    recycle:versions = yes
    recycle:touch = yes
    recycle:directory_mode = 0777
    recycle:subdir_mode = 0700
    recycle:exclude =
    recycle:exclude_dir =
    recycle:maxsize = 0
    printable = no
    create mask = 0755
    force create mode = 0644
    directory mask = 0755
    force directory mode = 0755
    hosts deny = admin
    hide dot files = yes
    valid users = "odinb","omvadmin","sabnzbd","vbox",@"plex"
    invalid users =
    read list = "vbox",@"plex"
    write list = "odinb","omvadmin","sabnzbd"


    root@openmediavault:~#

  • I was able to almost duplicate your config and it still works. Not sure why you have admin in hosts deny but even that doesn't cause a problem. So, I have no idea why it isn't working. What is the output of: dpkg -l | grep samba

    omv 5.5.2 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.3.3
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • oops, the "admin" thing is from Lastpass trying to login. i usually logoff lastpass to avoid this, but must have forgotten!
    Fixed in the config now!

    Code
    root@openmediavault:~# dpkg -l | grep samba
    ii python-samba 2:4.1.17+dfsg-1~bpo70+1 amd64 Python bindings for Samba
    ii samba 2:4.1.17+dfsg-1~bpo70+1 amd64 SMB/CIFS file, print, and login server for Unix
    ii samba-common 2:4.1.17+dfsg-1~bpo70+1 all common files used by both the Samba server and client
    ii samba-common-bin 2:4.1.17+dfsg-1~bpo70+1 amd64 Samba common files used by both the server and the client
    ii samba-dsdb-modules 2:4.1.17+dfsg-1~bpo70+1 amd64 Samba Directory Services Database
    ii samba-libs:amd64 2:4.1.17+dfsg-1~bpo70+1 amd64 Samba core libraries
    root@openmediavault:~#
  • I really don't know. I can't duplicate this. Just tried on a second OMV 2.x VM. Is everything updated?

    omv 5.5.2 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.3.3
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Yes, everything is updated, I usually run:
    aptitude update && sudo aptitude safe-upgrade && sudo apt-get autoclean && sudo apt-get autoremove


    to update/clean every now and then.


    Removed the SMB share, and tried re-adding it, since it is obviously something with the share definition.


    When trying to re-crerate, I get:


    Code
    Error #3005:
    exception 'OMVException' with message 'The configuration object is not unique: A shared folder with the given name already exists' in /usr/share/openmediavault/engined/rpc/sharemgmt.inc:343
    Stack trace:
    #0 [internal function]: OMVRpcServiceShareMgmt->set(Array, Array)
    #1 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
    #2 /usr/share/php/openmediavault/rpc.inc(79): OMVRpcServiceAbstract->callMethod('set', Array, Array)
    #3 /usr/sbin/omv-engined(500): OMVRpc::exec('ShareMgmt', 'set', Array, Array, 1)
    #4 {main}

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!