Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ksmbd first impressions (wow!).
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
jesnow
l33t
l33t


Joined: 26 Apr 2006
Posts: 856

PostPosted: Mon Dec 20, 2021 5:42 am    Post subject: ksmbd first impressions (wow!). Reply with quote

Hi everybody:

In the context of another issue (https://forums.gentoo.org/viewtopic-t-1146349-highlight-.html) I took the plunge and installed the new kernel samba server alongside the traditional user space one. I was successful in so far as nothing bad happened, and it seems like the new kernel samba sort of works. Not quite a promised, but we can definitely work with it.

The idea is that incorporating the samba server in the kernel will allow it to run much faster. The parts of samba that have to be user space stay that way (like smbclient) but the functional bits get a big performance increase in theory. I didn't get so far as testing that, but was able to get some shares to mount and use files off them.

I used this guide:

https://wiki.samba.org/index.php/Linux_Kernel_Server

I emerged the most recent gentoo-sources-5.15.10

Code:
jesnow@merckx ~/garb $ equery list gentoo-sources
 * Searching for gentoo-sources ...
[I--] [??] sys-kernel/gentoo-sources-5.4.38:5.4.38
[I--] [??] sys-kernel/gentoo-sources-5.10.27:5.10.27
[IP-] [  ] sys-kernel/gentoo-sources-5.10.76-r1:5.10.76-r1
[IP-] [  ] sys-kernel/gentoo-sources-5.15.10:5.15.10
jesnow@merckx ~/garb $


I enabled the new ksmbd bits as described in the guide, and I built and installed the kernel. It works absolutely as before with my old configuration. I was a little worried about this, but the new kernel bits did not conflict with the userland samba.

Then I emerged the userland tools for ksmbd
Code:
jesnow@merckx ~/garb $ grep ksmbd /etc/portage/package.accept_keywords
net-fs/ksmbd-tools **
jesnow@merckx ~/garb $ equery list ksmbd-tools -p
 * Searching for ksmbd-tools ...
[IP-] [  ] net-fs/ksmbd-tools-3.4.3_pre20212111-r3:0
jesnow@merckx ~/garb $


Strangely, it wouldn't work with the ~amd64 keyword, but did with the ** keyword. But then it did work. I think there may be an anomaly in the ebuild.

Then it was a matter of /etc/init.d/samba stop, unmounting my samba shares and
/etc/init.d/ksmbd start.

That didn't actually work (mount -a failed) because I hadn't added my samba users to ksmbd's user database, which is different from samba's. Like: Hey is there some way we can have a common signin database? I was able to ln -s the two smb.conf files together. That's supposed to work right?

OK, then I added myself as a ksmbd user and created a password. But that didn't work -- my user was still unknown to ksmbd. Ksmbd thus was not a drop-in replacement for smbd, at least not on the first try. BUT minor success, I was able to browse my read-only media server and play files off it using ksmbd. So the protocol seems to be working, just something went wrong in the authentication.

Changing back was also not so hard. I found it best to restart the entire network /etc/init.d/net.enp2s0 restart and then mount -a. But then I could get back to the status quo ante no problem.

Next step is to try to see how to get ksmbd to recognize my user's home directory and mount it. Then I can test its performance, which I expect to be better than the userland server. That was the whole point after all. I'll have to dig into the log files to see what went wrong I think the error was NT_INVALID_USER. $ smbslient -L //server/ doesn't list my user directory, but doeslist other shares specified in smb.conf

That's enough exploration for the evening. If anybody has any experience with this please reply.

Cheers,
Jon.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum