What's new

Samba share speed fix?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Yes, i was doing a lot of things wrong. My jffs/config/smb file had extension .conf and not .conf.add.
By the way, while i try a couple of things, whats the difference between .conf.add and .postconf?

Cheers
 
Appart from the .conf.add VS .postconf question, i seem to have another problem and maybe that is whats causing my issues.
I have a USB pen on the first USB port and a disk on the second port. Somehow I manage to get both to automount, but now for example one of the drives disappear.
I really don't understand why. Right now at the moment, the /dev/sdb and /dev/sdb1 are visible, but the /dev/sda and /dev/sda1 aren't even visible anymore.
This makes me loose entware and consequently dnscrypt-proxy which then makes my dnsmasq stop working.
 
Check this: now I did a clean reboot. The USB pen is mounted (that's where entware setup is), but the USB hdd is detected but not mounted.

Untitled.png
Untitled.png


appart from this:

admin@AsusRouter:/tmp/home/root# mount
rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro)
proc on /proc type proc (rw)
tmpfs on /tmp type tmpfs (rw)
devfs on /dev type tmpfs (rw,noatime)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw)
/dev/mtdblock5 on /jffs type jffs2 (rw,noatime)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sdb1 on /tmp/mnt/sdb1 type ext3 (rw,nodev,noatime,data=ordered)
admin@AsusRouter:/tmp/home/root#

Why is SDA1 missing and not mounted?
 
1. I've added my USB devices to my custom /etc/fstab, so I don't have much experience with the automtic mount feature of the ASUS firmware. What's inside your fstab?
Did you try to disconnect the missing USB drive and reconnect it?
Did you already try "mount -a"?

2. I have an AC56U and the ""Reducing USB3.0 interference" option is under Additional Settings => Wireless => Professsionell => Band = 2.4
 
  • Like
Reactions: Phk
1. I've added my USB devices to my custom /etc/fstab, so I don't have much experience with the automtic mount feature of the ASUS firmware. What's inside your fstab?
I'm trying to mannualy mount this, but still got an error
admin@AsusRouter:/tmp/home/root# mount /dev/sda1 /tmp/mnt/sda1/
mount: mounting /dev/sda1 on /tmp/mnt/sda1/ failed: Invalid argument​
notice i had to create the sda1 dir under /tmp/mnt.
Did you try to disconnect the missing USB drive and reconnect it?
Did you already try "mount -a"?
too many times :)

2. I have an AC56U and the ""Reducing USB3.0 interference" option is under Additional Settings => Wireless => Professsionell => Band = 2.4
Only option there with the words interference is "Enhanced interference management" and is disabled and as far as i know has nothing to do with USB. Please note AC66u has no usb3.


I'm really pissed of with this, and sorry for stealing this thread. At first the disk was working, but now not even that, so maybe I should move my questions to another thread.
 
Is the drive visible via "fdisk -l" and really /dev/sda1?
Regarding the "Invalid argument" do you have a customized fstab in your jffs folder? Perhaps it contains invalid mount options/parameter?
 
  • Like
Reactions: Phk
That could be why Asus didn't configure these then. Sometimes, optimizations only work within a very specific usage scenarios. Also, some optimizations are more about latency than throughput.

It's possible that the default values used by Samba are more optimal for a low-power router.

There was a similar conversation a couple of years ago...

The config is conservative, as there is little control over what kind of devices (speed, size, etc), and having to support both wired and wireless clients across many different OS's (and versions within) - the config will definitely ensure that there is no data loss...
 
Is the drive visible via "fdisk -l" and really /dev/sda1?
Regarding the "Invalid argument" do you have a customized fstab in your jffs folder? Perhaps it contains invalid mount options/parameter?
As you might already be guessing, it was an USB interface problem (the HDD case is probably broken).
I've changed to a different disk and the mounts go automatically OK now. I'll try the speeds and report back.

Another issue which i can't find in the foruns, at the share root I can only see folders from the first drive. I've tried using the webgui but even allowing RW to the folder in the second drive, the SMB only shows folders from the first one :| Ideas? Thanks a lot again
 
One is just a file that gets appended, the other is a shell script that can do anything you program into it.

https://github.com/RMerl/asuswrt-merlin/wiki/Custom-config-files
Understood. I've read the wiki, but didn't understand that .postconfig were shell scripts and not appends, sorry.

Finally I've come up with a new HDD, re-partitioned as ext3 and worked the SMB mounts.

Now back to the topic, my speed is roughly 5~6MB/s, and this is a fast disk which does 100mb/s when plugged to my PC.

Let me post my confs to help figure this out:
  • I'm connected via WLAN AC, 900mbps stable
  • I've created /jffs/scripts/smb.postconf as follows:
admin@AsusRouter:/tmp/home/root# cat /jffs/scripts/smb.postconf
#!/bin/sh
CONFIG=$1
source /usr/sbin/helper.sh
pc_insert "wide links = no" "socket options = IPTOS_LOWDELAY TCP_NODELAY SO_RCVBUF=131072 SO_SNDBUF=131072" $CONFIG
  • I've created /jffs/configs/smb.conf.add as follows:
smb encrypt = disabled
use spnego = no
client use spnego = no
disable spoolss = yes
strict allocate = no
strict locking = no
use sendfile = no
oplocks = yes
level2 oplocks = yes
kernel oplocks = yes
  • Finally, let me post the current /etc/smb.conf that is running:
[global]
workgroup = WORKGROUP
netbios name = AsusRouter
server string = AsusRouter
unix charset = UTF8
display charset = UTF8
log file = /var/log.samba
log level = 0
max log size = 5
security = USER
guest ok = no
map to guest = Bad User
encrypt passwords = yes
pam password change = no
null passwords = yes
max protocol = NT1
passdb backend = smbpasswd
smb encrypt = disabled
smb passwd file = /etc/samba/smbpasswd
force directory mode = 0777
force create mode = 0777
max connections = 10
socket options = TCP_NODELAY SO_KEEPALIVE SO_RCVBUF=65536 SO_SNDBUF=65536
obey pam restrictions = no
disable spoolss = yes
host msdfs = no
strict allocate = No
bind interfaces only = yes
interfaces = lo br0 192.168.1.254/255.255.255.0
use sendfile = no
wins support = yes
os level = 255
domain master = yes
local master = yes
preferred master = yes
map archive = no
map hidden = no
map read only = no
map system = no
store dos attributes = yes
dos filemode = yes
oplocks = yes
level2 oplocks = yes
kernel oplocks = no
wide links = no
socket options = IPTOS_LOWDELAY TCP_NODELAY SO_RCVBUF=131072 SO_SNDBUF=131072
[PCBACKUP]
comment = HDD-USB's PCBACKUP in WD My Passport 07A8
path = /tmp/mnt/HDD-USB/PCBACKUP
dos filetimes = yes
fake directory create times = yes
valid users = admin
invalid users =
read list = admin
write list = admin
[entware]
comment = PEN-L8's entware in Generic Flash Disk
path = /tmp/mnt/PEN-L8/entware
dos filetimes = yes
fake directory create times = yes
valid users = admin
invalid users = admin
read list =
write list =
[adblock]
comment = PEN-L8's adblock in Generic Flash Disk
path = /tmp/mnt/PEN-L8/adblock
dos filetimes = yes
fake directory create times = yes
valid users = admin
invalid users = admin
read list =
write list =
smb encrypt = disabled
use spnego = no
client use spnego = no
disable spoolss = yes
strict allocate = no
strict locking = no
use sendfile = no
oplocks = yes
level2 oplocks = yes
kernel oplocks = yes

The share I've mounted and trying to copy an ISO into is "[PCBACKUP]" above. The speed is 6MB/s max.

Please advise, thanks guys.

Phk
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top