Tuning Samba for more speed 2

    • OMV 2.x

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • 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 4.1.4 arrakis | 64 bit | 4.15 backports kernel | omvextrasorg 4.1.3
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      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.

      Source Code

      1. root@openmediavault:/# uname -a
      2. 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
      3. root@openmediavault:/#

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

      The post was edited 1 time, last by odinb ().

    • 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!

      Source Code

      1. root@openmediavault:/# apt-cache policy samba
      2. samba:
      3. Installed: 2:3.6.6-6+deb7u10
      4. Candidate: 2:3.6.6-6+deb7u10
      5. Version table:
      6. 2:4.1.17+dfsg-1~bpo70+1 0
      7. 100 http://ftp.debian.org/debian/ wheezy-backports/main amd64 Packages
      8. *** 2:3.6.6-6+deb7u10 0
      9. 500 http://security.debian.org/ wheezy/updates/main amd64 Packages
      10. 100 /var/lib/dpkg/status
      11. 2:3.6.6-6+deb7u7 0
      12. 500 http://ftp.us.debian.org/debian/ wheezy/main amd64 Packages
      13. root@openmediavault:/# apt-get -t wheezy-backports install samba=2:4.1.17+dfsg-1~bpo70+1
      14. Reading package lists... Done
      15. Building dependency tree
      16. Reading state information... Done
      17. The following extra packages will be installed:
      18. libasn1-8-heimdal libgssapi3-heimdal libhcrypto4-heimdal libhdb9-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal libkdc2-heimdal
      19. libkrb5-26-heimdal libldb1 libntdb1 libpython2.7 libroken18-heimdal libtalloc2 libtdb1 libtevent0 libwbclient0 libwind0-heimdal python-dnspython
      20. python-ldb python-ntdb python-samba python-talloc python-tdb samba-common samba-common-bin samba-dsdb-modules samba-libs tdb-tools
      21. Suggested packages:
      22. bind9 bind9utils ctdb ldb-tools smbldap-tools winbind heimdal-clients
      23. Recommended packages:
      24. attr samba-vfs-modules
      25. The following NEW packages will be installed:
      26. libasn1-8-heimdal libgssapi3-heimdal libhcrypto4-heimdal libhdb9-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal libkdc2-heimdal
      27. libkrb5-26-heimdal libldb1 libntdb1 libpython2.7 libroken18-heimdal libtevent0 libwind0-heimdal python-dnspython python-ldb python-ntdb python-samba
      28. python-talloc python-tdb samba-dsdb-modules samba-libs tdb-tools
      29. The following packages will be upgraded:
      30. libtalloc2 libtdb1 libwbclient0 samba samba-common samba-common-bin
      31. 6 upgraded, 24 newly installed, 0 to remove and 38 not upgraded.
      32. Need to get 14.3 MB of archives.
      33. After this operation, 4,216 kB of additional disk space will be used.
      34. Do you want to continue [Y/n]? y
      35. root@openmediavault:/# apt-cache policy samba
      36. samba:
      37. Installed: 2:4.1.17+dfsg-1~bpo70+1
      38. Candidate: 2:4.1.17+dfsg-1~bpo70+1
      39. Version table:
      40. *** 2:4.1.17+dfsg-1~bpo70+1 0
      41. 100 http://ftp.debian.org/debian/ wheezy-backports/main amd64 Packages
      42. 100 /var/lib/dpkg/status
      43. 2:3.6.6-6+deb7u10 0
      44. 500 http://security.debian.org/ wheezy/updates/main amd64 Packages
      45. 2:3.6.6-6+deb7u7 0
      46. 500 http://ftp.us.debian.org/debian/ wheezy/main amd64 Packages
      47. root@openmediavault:/#
      Display All

      The post was edited 1 time, last by odinb ().

    • 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:

      Source Code

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


      Source Code

      1. socket options = TCP_NODELAY SO_RCVBUF=65536 SO_SNDBUF=65536
      2. read raw = yes 1
      3. write raw = yes
      4. max xmit = 65535
      5. dead time = 15
      6. getwd cache = yes
      7. # 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 4.1.4 arrakis | 64 bit | 4.15 backports kernel | omvextrasorg 4.1.3
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      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 4.1.4 arrakis | 64 bit | 4.15 backports kernel | omvextrasorg 4.1.3
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      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 4.1.4 arrakis | 64 bit | 4.15 backports kernel | omvextrasorg 4.1.3
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      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!

      Source Code

      1. root@openmediavault:~# dpkg -l | grep samba
      2. ii python-samba 2:4.1.17+dfsg-1~bpo70+1 amd64 Python bindings for Samba
      3. ii samba 2:4.1.17+dfsg-1~bpo70+1 amd64 SMB/CIFS file, print, and login server for Unix
      4. ii samba-common 2:4.1.17+dfsg-1~bpo70+1 all common files used by both the Samba server and client
      5. ii samba-common-bin 2:4.1.17+dfsg-1~bpo70+1 amd64 Samba common files used by both the server and the client
      6. ii samba-dsdb-modules 2:4.1.17+dfsg-1~bpo70+1 amd64 Samba Directory Services Database
      7. ii samba-libs:amd64 2:4.1.17+dfsg-1~bpo70+1 amd64 Samba core libraries
      8. root@openmediavault:~#

      The post was edited 2 times, last by odinb ().

    • I really don't know. I can't duplicate this. Just tried on a second OMV 2.x VM. Is everything updated?
      omv 4.1.4 arrakis | 64 bit | 4.15 backports kernel | omvextrasorg 4.1.3
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      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:

      Source Code

      1. Error #3005:
      2. 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
      3. Stack trace:
      4. #0 [internal function]: OMVRpcServiceShareMgmt->set(Array, Array)
      5. #1 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
      6. #2 /usr/share/php/openmediavault/rpc.inc(79): OMVRpcServiceAbstract->callMethod('set', Array, Array)
      7. #3 /usr/sbin/omv-engined(500): OMVRpc::exec('ShareMgmt', 'set', Array, Array, 1)
      8. #4 {main}