Any recent tests samba vs ksmbd?
Samba is so feature packed, nice luci page, and very performant. With a usb3.0 drive it easily maxes my gigabit LAN at 110-120 MB/s on my 7 year old WRT32X, so it's hard to find any issue with it I haven't bothered with Ksmbd.
Comparing CPU utilization would be worth doing actually, I'll look into doing this. Samba 4.17 and especially 4.18 versions improved security related performance regressions so much it's well optimized.
Someday I'll move my network to a 2.5Gbit setup, like a N5105 + i226-v box, or NanoPi R6S if official OpenWrt support gets added. It'll be fun to see what these performance limits are again.
Getting numerous syslog entries here using Samba Version 4.18.0.... copying files to the OpenWRT USB storage device!
Seems every file written has a syslog entry.
...daemon.err smbd: get_static_share_mode_data: get_static_share_mode_data_fn failed: NT_STATUS_NOT_FOUND ...daemon.err smbd: [2023/05/03 17:11:56.057215, 0] ../../source3/locking/share_mode_lock.c:888(get_static_share_mode_data)
There is a logging fix upstream in 4.18.2 but this package isn't updated as frequently. Overall Samba 4.18.0 in OpenWrt has been working fantastic for me for the past couple months I use it almost daily.
New to OpenWRT but I've used Gargoyle for multiple years which is based on OpenWRT. The new router I have isn't supported by Gargoyle yet and only exists in Snapshot for now (BPi-R3).
I'm trying to get Samba working through Luci and I can't see the mounted USB drive. As posted previously in this thread, clicking Path gives the error:
Unable to dispatch: /cgi-bin/luci/admin/system/mounts
How do you access the mounted drive in Luci? I can see that it is mounted in /mnt over SSH.
What I'd like to be able to do is setup the mounts for 2 USB HDDs that will automount and autoshare over Samba.
Also wondering if it is possible to have any USB stick automounted when hotplugged for access in Luci.
Assuming it's a USB 3.0 external drive (most common) you need to add packages for USB 3.0 and the file system its formatted for. Some examples:
kmod-usb3 kmod-usb-storage kmod-usb-storage-uas block-mount usbutils mount-utils luci-app-hd-idle kmod-fs-exfat (it might instead need ntfs-3g or ext4)
After that it'll be under System > Mount Points. Once mounted, it you can enter the /dev/sdaX in Services > Network Shares, give the share a name, enable it, etc.
Check the doc page too for some guidance: [https://openwrt.org/docs/guide-user/services/nas/cifs.server]
I have been working on this problem for a while. As an update:
I had installed all of the files you mentioned, and could see the drive and its contents over SSH. However, I didn't have the System > Mount Points or Services > Network Shares in Luci. I played around for a while and finally rebooted out of frustration. As soon as I rebooted, everything came back.
I can see the mount in Luci and I setup the samba share according to the instructions. I can see the share on my network, but I cannot get it to allow an anonymous share. I tried using the root password and I get a permission error.
I have also updated to the 2 June snapshot.
So, the final hurdle is getting the anonymous share access working and I have the router working the way I need it to work.
Check the link I pasted above under Installation section (I actually wrote that section some time back) for default settings. The key is to enable 'force root' and 'allow guests' if you just want a simple anonymous config but follow the settings. That's what I use it works perfectly with Samba 4.18 getting 100-120 MB/s read/write.
I don't know if it is the reboots or what but now it is working. I didn't change any of the settings from what I set on Friday following the link (which I had followed before asking for help). Thanks for the help.