connecting to NAS over samba a little slow

Recently bought myself a nas drive (Buffalo Linkstation LS210D)
Connecting to it over smb in openSUSE seems a little slow.
When I click to open the drive (share file) plasma notifications show me that it is “examining” the drive. This can take between 20 seconds and one minute.
On my other devices (raspbpi/OSMC, android devices, win10) the connection is immediate.
Here is a copy of my smb.conf

# smb.conf is the main Samba configuration file. You find a full commented
# version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the
# samba-doc package is installed.
[global]
    workgroup = farcusnet
    netbios name = suselaptop
    server string = ""
    passdb backend = tdbsam
    printing = cups
    printcap name = cups
    printcap cache time = 750
    cups options = raw
    preferred master = auto
    map to guest = Bad User
    include = /etc/samba/dhcp.conf
    logon path = \\%L\profiles\.msprofile
    logon home = \\%L\%U\.9xprofile
    logon drive = P:
    usershare allow guests = Yes
[homes]
    comment = Home Directories
    valid users = %S, %D%w%S
    browseable = No
    read only = No
    inherit acls = Yes
[profiles]
    comment = Network Profiles Service
    path = %H
    read only = No
    store dos attributes = Yes
    create mask = 0600
    directory mask = 0700
[users]
    comment = All users
    path = /home
    read only = No
    inherit acls = Yes
    veto files = /aquota.user/groups/shares/
[groups]
    comment = All groups
    path = /home/groups
    read only = No
    inherit acls = Yes
[printers]
    comment = All Printers
    path = /var/tmp
    printable = Yes
    create mask = 0600
    browseable = No
[print$]
    comment = Printer Drivers
    path = /var/lib/samba/drivers
    write list = @ntadmin root
    force group = ntadmin
    create mask = 0664
    directory mask = 0775



Also, file transfers over smb seem a little slow (around 8mb sec) compared to ftp (approx 30mb sec). Unfortunately the NAS doesn’t support NFS.

It’s hard to advise because I have no idea what’s going on in the NAS. But just to see if anything pops up regarding the connection, run this command and return the results:

smbtree -N

But do it twice, this way:

First experiment: make a connection your normal way, before running the command. Then disconnect. Then run the command. Return here the output of the first experiment and the approximate seconds it took to finish writing the output from the command.

Second experiment: reboot the computer and after the logon you immediately run the command. Return here the output of the second experiment and the approximate seconds it took to finish writing the output.

thanks for the help . . .
there didn’t appear to be any difference in the output or the time for either instance.
Output was

farcus@linux-aw6a:~> smbtree -N
FARCUSNET
        \\SUSELAPTOP      
        \\LINKSTATION                   LinkStation
                \\LINKSTATION\info              LinkStation Utilities
                \\LINKSTATION\share             LinkStation folder
                \\LINKSTATION\IPC$              IPC Service (LinkStation)


timing for both instances was approx 50 seconds.
“suselaptop” comes up almost instantly while “Linkstation\info” comes up at the 40 second mark and the remainder about 10 seconds later.

To access the Linkstation I simply use Dolphin to browse to smb://linkstation/share/
After I access it once I can then usually access it quickly for a period of time. After a period of inactivity it takes a while to load again.

But as I said before . . . other devices can access the share folder almost instantly.

I was looking for a hint from Linkstation re sleep, but there doesn’t seem to be any of that.

There’s a lot of unnecessary stuff in your global stanza, but I can’t really see any bad stuff there.

You could try this for the smb.conf file, but don’t get hopes up:


# smb.conf is the main Samba configuration file. You find a full commented
# version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the
# samba-doc package is installed.
[global]
    workgroup = farcusnet
    netbios name = suselaptop
    server string = ""
    name resolve order = bcast host lmhosts wins
    passdb backend = tdbsam
    printing = cups
    printcap name = cups
    printcap cache time = 750
    cups options = raw
    preferred master = auto
    map to guest = Bad User
    usershare allow guests = Yes

[homes]
    comment = Home Directories
    valid users = %S, %D%w%S
    browseable = No
    read only = No
    inherit acls = Yes

[printers]
    comment = All Printers
    path = /var/tmp
    printable = Yes
    create mask = 0600
    browseable = No

[print$]
    comment = Printer Drivers
    path = /var/lib/samba/drivers
    write list = @ntadmin root
    force group = ntadmin
    create mask = 0664
    directory mask = 077

actually, those changes to smb.conf seem to have made a world of difference. I can access the NAS now within a few seconds.
My original smb.conf was essentially the default included with the installation and some minor changes made using your guide linked from the forum sticky.
I’ll save this smb.conf in a safe place for future updates.

Thanks for the help

I’m assuming that the name resolution was the crux of the issue here?

name resolve order = bcast host lmhosts wins

Well… probably… I find that particular string “bcast host lmhosts wins” as one of the best for workgroups and most folk who cruise around here are in workgroup environments.