Jump to content

Installing Samba after compiling from source code: ancient NAS machine.

I have an ancient machine I use as a NAS, with some various old hard drives in it and a Pentium 4 CPU. It's got a 100-mbit NIC onboard, so network file transfers are of course significantly slower than file transfers to the rest of my old network (I have three other machines I use as NAS, each of which has a Gigabit NIC.). I also had a bunch of old ethernet NICs sitting around, salvaged from other old computers. So, very recently it occurred to me that maybe I could speed up file transfers in some situations by adding some of those NICs to the ancient server.

 

Currently, the server has two 100-Mbit NICs in it: one is integrated into the motherboard, and the other is in a PCI slot. The server runs Ubuntu 16.04.3, and I've been using the Samba version from the Ubuntu repositories. At first, I tried to set up NIC teaming but that didn't go so well (and, since I manage the server remotely, screwing up the network configuration means having to go attach a keyboard, mouse, and monitor) but I found out that Windows 10 (and Server 2012) are capable of a technology called SMB Multichannel which will make use of multiple NICs by splitting communications across multiple connections. Samba supports this feature now, but the version in Ubuntu repositories is older than the first versions where this feature was implemented.

 

By the way, I took a look at FreeNAS but it is nowadays only for 64-bit processor systems and requires much more performance and memory than this machine has. No dice.

 

So, I went and grabbed the latest stable Samba source, compiled it, cd'ed to the extracted location, and ran:

sudo ./configure

over and over and over again until I resolved every obstacle I ran into by installing whatever package it complained about,

sudo make

and then finally

sudo make install

 

But I have no idea how to do the final thing: installing the freshly compiled Samba as a (systemd?) service so that it will run at all times, and I can use it normally. Basically, I need help figuring out how to do the same thing the package manager would do automatically.

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, rsethc said:

I have an ancient machine I use as a NAS, with some various old hard drives in it and a Pentium 4 CPU. It's got a 100-mbit NIC onboard, so network file transfers are of course significantly slower than file transfers to the rest of my old network (I have three other machines I use as NAS, each of which has a Gigabit NIC.). I also had a bunch of old ethernet NICs sitting around, salvaged from other old computers. So, very recently it occurred to me that maybe I could speed up file transfers in some situations by adding some of those NICs to the ancient server.

 

Currently, the server has two 100-Mbit NICs in it: one is integrated into the motherboard, and the other is in a PCI slot. The server runs Ubuntu 16.04.3, and I've been using the Samba version from the Ubuntu repositories. At first, I tried to set up NIC teaming but that didn't go so well (and, since I manage the server remotely, screwing up the network configuration means having to go attach a keyboard, mouse, and monitor) but I found out that Windows 10 (and Server 2012) are capable of a technology called SMB Multichannel which will make use of multiple NICs by splitting communications across multiple connections. Samba supports this feature now, but the version in Ubuntu repositories is older than the first versions where this feature was implemented.

 

By the way, I took a look at FreeNAS but it is nowadays only for 64-bit processor systems and requires much more performance and memory than this machine has. No dice.

 

So, I went and grabbed the latest stable Samba source, compiled it, cd'ed to the extracted location, and ran:

sudo ./configure

over and over and over again until I resolved every obstacle I ran into by installing whatever package it complained about,

sudo make

and then finally

sudo make install

 

But I have no idea how to do the final thing: installing the freshly compiled Samba as a (systemd?) service so that it will run at all times, and I can use it normally. Basically, I need help figuring out how to do the same thing the package manager would do automatically.

Intresting... I've never had any issues with getting multichannel working in samba from the Ubuntu main repos. But anyway, try using 

sudo update-rc.d samba defaults

 

My native language is C++

Link to comment
Share on other sites

Link to post
Share on other sites

I'll leave the compiled-from-source stuff alone for now. I tried that command (sudo update-rc.d samba defaults) and did not see any output (not sure what it does anyway), opened up Synaptic and reinstalled the samba packages. The version of all of them appears to be "2:4.3.11+dfsg+0ubuntu0.16.04.12".

Link to comment
Share on other sites

Link to post
Share on other sites

Samba 4.3.11 is as near to latest as makes no difference, so that should be good. 

 

One thing I want to add, though, is that SMB is pretty CPU heavy as a protocol overall, so your limiting factor might not be just the 10/100 NICs but rather the P4 CPU. You'd have to see for yourself. That said, I ran FreeNAS on an Athlon LE 1600 with 2GB of DDR2 and got ~80MB/s over gigabit.YMMV.

PC Specs - AMD Ryzen 7 5800X3D MSI B550M Mortar - 32GB Corsair Vengeance RGB DDR4-3600 @ CL16 - ASRock RX7800XT 660p 1TBGB & Crucial P5 1TB Fractal Define Mini C CM V750v2 - Windows 11 Pro

 

Link to comment
Share on other sites

Link to post
Share on other sites

Multi channel support is disabled by default in SAMBA, go in to the samba configuration and enable it. Also make sure you setup the two NICs is separate subnets, seems to be much more reliable that way unlike Windows which doesn't really care.

Link to comment
Share on other sites

Link to post
Share on other sites

Now I have a much larger concern. After reinstalling Samba from the repositories like a normal person, I am unable to mount one of my disks... what the heck could this mean?

 

 

weird disk mounting error.png

Link to comment
Share on other sites

Link to post
Share on other sites

By the way here are the mounting options (they used to work fine before this, but I thought I might as well post them).

disk mount options.png

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×