# What is it with Samba3??

## ARC2300

Ever since I've switched from Samba 2.2.8 to Samba 3.x things have been screwing up left and right with my MP3 shares.

For example, when I rip a CD, I can't listen to MP3's.  XMMS locks as well as gRip.  Sometimes when transferring large files (such as DivX movies), the transfer just halts.  Sometimes it starts back up (after 5 minutes), and sometimes it doesn't.

The only way to fix it is to stop samba on the server, umount all the shares on the client computer, restart samba, then remount all the shares on the client.

It gets really, really damned annoying, considering I left up this same server for 100 days without a Samba restart when it was at the 2.2.8 version.  

Any ideas good people??  I'm about to say forget it and use Windows.  Yes, I'm getting that damned frustrated with it.

edit:  Really, really dumb question, but Samba3 uses the same format for shares as 2.2.8, right??

----------

## steveb

I have the exact same problem!

welcome to the club!

cheers

SteveB

----------

## ARC2300

 *steveb wrote:*   

> I have the exact same problem!
> 
> welcome to the club!
> 
> cheers
> ...

 

Good.  (Well, not really.)

I'm glad it's not just me, then.

I just looked over at the samba.org site, and after seeing 3 or 4 issues with Samba3 posted, I'm wonder something. . .

Why the HELL did they even release it??

----------

## steveb

 *ARC2300 wrote:*   

> Why the HELL did they even release it??

 Don't ask me!

cheers

SteveB

----------

## nobspangle

After upgrading from 2.2 to 3.0 did you convert your password backends and run testparm over your config file to make sure you didn't have any out of date directives.

The reasons for the update from 2.2 are mostly to do with the areas of domain control and membership, which most likely don't affect you but I can assure you they are very useful and work very well for me. I frequently transfer very large files to and from a production samba server at work, which at the same time is handling print requests and file sharing duties for over 200 users, so I'd suggest the problems lay in your configuration/system rather than the software.

----------

## steveb

i have samba installed on redhat:

```
# rpm -qa|grep -i samba

samba-3.0.7-1
```

testparm does not return any error:

```
# testparm

Load smb config files from /etc/samba/smb.conf

Processing section "[ipc$]"

Processing section "[homes]"

Processing section "[netlogon]"

Processing section "[profiles]"

Processing section "[printers]"

Processing section "[tmp]"

Processing section "[public]"

Processing section "[software]"

Processing section "[users]"

Processing section "[print$]"

Processing section "[boffice]"

Processing section "[HPLJ8150DN_PCL]"

Processing section "[HPLJ8150DN_PS]"

Processing section "[domappl]"

Processing section "[domdata]"

Processing section "[telcdinst]"

Processing section "[telcddata]"

Processing section "[gentoo.distfiles]"

Processing section "[cd1]"

Processing section "[cd2]"

Processing section "[cd3]"

Processing section "[cd4]"

Loaded services file OK.

WARNING: You have some share names that are longer than 12 characters.

These may not be accessible to some older clients.

(Eg. Windows9x, WindowsMe, and smbclient prior to Samba 3.0.)

Server role: ROLE_DOMAIN_PDC

Press enter to see a dump of your service definitions
```

the gentoo box has the latest samba:

```
# qpkg -I -nc -v samba

net-fs/samba-3.0.7-r1
```

on the gentoo box i have a empty smb.conf (don't need samba there. only smbfs):

```
# testparm

Load smb config files from /etc/samba/smb.conf

Loaded services file OK.

Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

# Global parameters

[global]
```

and i still have troubles!

----------

## ARC2300

 *nobspangle wrote:*   

> After upgrading from 2.2 to 3.0 did you convert your password backends and run testparm over your config file to make sure you didn't have any out of date directives.
> 
> The reasons for the update from 2.2 are mostly to do with the areas of domain control and membership, which most likely don't affect you but I can assure you they are very useful and work very well for me. I frequently transfer very large files to and from a production samba server at work, which at the same time is handling print requests and file sharing duties for over 200 users, so I'd suggest the problems lay in your configuration/system rather than the software.

 

My password is always with smbpasswd and encrypted.

testparm also returns that everything is okay.

On my Linux computer, I don't have Samba running, simply because it's enabled in my kernel, and that has well worked in the past.

----------

## nobspangle

Do you suffer any of these problems with other file transfer services (ftp or http for example)

----------

## steveb

 *nobspangle wrote:*   

> Do you suffer any of these problems with other file transfer services (ftp or http for example)

 No. FTP,HTTP,NFS,etc works without any problem. Only Samba is making trouble. And only if you use a Linux client. From Windows no problems so far.

cheers

SteveB

----------

## ARC2300

 *steveb wrote:*   

>  *nobspangle wrote:*   Do you suffer any of these problems with other file transfer services (ftp or http for example) No. FTP,HTTP,NFS,etc works without any problem. Only Samba is making trouble. And only if you use a Linux client. From Windows no problems so far.
> 
> cheers
> 
> SteveB

 

Same thing here.

I did discover something that helps XMMS, though.  If you stop it, then select a new playlist or new songs, then the Samba/XMMS combo doesn't seem to go nuts.

I don't know if this is the same thing as the possible DoS I was reading on their site or not.  Probably not, but I suppose it's worth a shot.

But I'm starting to wonder something. . .only the client side causes the error here, right??  Since it's working from Windows, that would imply that the server is not what is causing problems, correct??  

I wonder if the smbfs code from the kernel is what is actually causing the problems??    :Idea:   Because if it were a problem with the server, it would screw up on all my computers.  Hrm. . .

----------

## nobspangle

have you tried using the smbclient to transfer large files? It does look like the common factor is the smbfs, have you tried using smbfs with a windows server to see if it gives the same results?

----------

## larand54

I don't know if this could be something..

I discovered that when emerging Samba-3.0.7 you'l get

'rpctorture didn't build' but the emerge continues.

It is part of rpcclient I think, which is important for samba to do some cooperations with windows. I don't know exactly what.

Some people reports some kind of 'looping' when transfering files.

I feel a bit woried about it.

One point is that you have to whatch the build in the later part if you will see it. Maybee there is a log somewhere that you can find it in.

There is a bug reported on it see..https://bugs.gentoo.org/show_bug.cgi?id=66032

----------

## ARC2300

 *nobspangle wrote:*   

> have you tried using the smbclient to transfer large files? It does look like the common factor is the smbfs, have you tried using smbfs with a windows server to see if it gives the same results?

 

No I have not, but I'll do that sometime and see if it helps.  I just know that transferring large files from my Windows boxes (2 laptops and a deskie) doesn't bother Samba.  I also know that I can pull large files on all 3 and it's okay with it too.

I also did not know that smbclient could transfer files.  I'll have a look at the man pages later to see how to do that.

And thanks for your help and ideas.  They are much appreciated.

----------

## aphenitry

 *ARC2300 wrote:*   

> 
> 
> No I have not, but I'll do that sometime and see if it helps.  I just know that transferring large files from my Windows boxes (2 laptops and a deskie) doesn't bother Samba.  I also know that I can pull large files on all 3 and it's okay with it too.
> 
> 

 

I have the same problem! It is SO annoying. Works fine accessing my samba share from a windows box, but using gentoo and smb3 it goes koko as soon as I get 2 transfers going (say, listening to music and copying some file at the same time).

So I'm searching for a v2 ebuild but i can't find that either. And I want to install shfs but the server doesn't support loadable modules. Why doesn't portage keep say the newest ebuild of the last major version?

YARRRRRRR!!!

----------

## aphenitry

 *ARC2300 wrote:*   

> 
> 
> Any ideas good people??  I'm about to say forget it and use Windows.  Yes, I'm getting that damned frustrated with it.
> 
> 

 

Ahahah, I hear ya   :Smile: 

----------

## dashnu

samba 3 has proved to be very buggy for me also.. I spent 16 hours of web surfing looking for help but only found posts with no responses. I download 2.x source and installed it and work fine..  3 is not ready for most machines.. I am pretty frustrated with it also..

----------

## ARC2300

 *nobspangle wrote:*   

> have you tried using the smbclient to transfer large files? It does look like the common factor is the smbfs, have you tried using smbfs with a windows server to see if it gives the same results?

 

Acctually, you know, it just hit me. . .it wouldn't give the same results (locking up).  You're not mixing old smbfs code with new code there, simply using the old kernel code to transfer.

And it would seem from the folks posting in this thread that it is Linux/Linux problems, not cross-platform.

Perhaps we have stumbled onto a bug in the kernel code??    :Question: 

[edit]I just looked at the kernel source smbiod.c file.

Maybe it's just me, but if it's new and not using old 2.2.8 era code, shouldn't the copyright be from a later date than 2000 and 2001??

----------

## echto

Add to the smb.conf in the global section

use sendfile = no

echto  :Smile: 

----------

## ARC2300

 *echto wrote:*   

> Add to the smb.conf in the global section
> 
> use sendfile = no
> 
> echto 

 

Already done, makes no difference.

----------

## mglauche

steveb, or anyone else who has this problem:

1) file a bug on bugs.gentoo.org (so i'll be noticed of the problem  :Wink: 

2) as someone before posted, try the sendfile=no (it fixes some obscure problems, but most time OS related !)

3) post your TCP_OPTIONS, check you have nothing weird in it.

4) doublecheck if your network setup is ok: during the "stalls", run a tcpdump -i interface -n on the server, to see if there are timeouts, errors, etc ..

5) look in the /var/log/samba3/* logfiles, if there are any obvious errors. If not, try to increase the debug level 

As a last resort, you can pm me  :Wink: 

regards,

    Michael (samba maintainer)

----------

## ARC2300

 *mglauche wrote:*   

> steveb, or anyone else who has this problem:
> 
> 1) file a bug on bugs.gentoo.org (so i'll be noticed of the problem 
> 
> 2) as someone before posted, try the sendfile=no (it fixes some obscure problems, but most time OS related !)
> ...

 

Oh, thanks.

I wasn't aware that we had our own Samba dev/maintainer.

----------

## mglauche

 *ARC2300 wrote:*   

> 
> 
> Oh, thanks.
> 
> I wasn't aware that we had our own Samba dev/maintainer.

 

we even have 2 ..  :Wink: 

but samba is also a complex beast ...

----------

## aphenitry

 *echto wrote:*   

> Add to the smb.conf in the global section
> 
> use sendfile = no
> 
> echto 

 

Great! "use sendfile = no" made smb cooperate.

*Hugs his sambaserver*  :Smile: 

----------

## ARC2300

Okay. . .So I did the checking of the logs when the debug level was at 2. . .

I noticed that in the middle of opening up some MP3s (when XMMS locked), Samba seemed to log me off then authenticate again.

That, and it was opening and closing the same file numerous times.  Is this supposed to happen?

----------

## steveb

 *mglauche wrote:*   

> 3) post your TCP_OPTIONS, check you have nothing weird in it.

 TCP_OPTIONS? I don't have such an config in my smb.conf file. Did you mean the socket options?

cheers

SteveB

----------

## aphenitry

Okay, I'm back to kicking my sambaserver again - this didn't fix the problem apparently, it just made it a bit more stable (but the same problem continues)

Here's my socket-options:

socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

I don't care this much about using smb3 (unless there is an easy fix, ofcourse) - all I want to do is transfer files which I could do fine before. Could somebody point me to a smb2 ebuild? I can only dig up ebuilds for the v3 branch.

----------

## bombcar

Just want to make sure that everyone knows that the smbfs part of the Linux kernel is not part of Samba, and is kinda not supported very well. You may wish to use NFS between Linux boxes.

----------

## aphenitry

 *bombcar wrote:*   

> Just want to make sure that everyone knows that the smbfs part of the Linux kernel is not part of Samba, and is kinda not supported very well. You may wish to use NFS between Linux boxes.

 Yeah I know - but I haven't had this problem before.

Thinking about switching to shfs - any experiences with it? I'll snoop around a bit before testing it myself, as it requires a reboot of the server.

----------

## ARC2300

 *aphenitry wrote:*   

>  *bombcar wrote:*   Just want to make sure that everyone knows that the smbfs part of the Linux kernel is not part of Samba, and is kinda not supported very well. You may wish to use NFS between Linux boxes. Yeah I know - but I haven't had this problem before.
> 
> Thinking about switching to shfs - any experiences with it? I'll snoop around a bit before testing it myself, as it requires a reboot of the server.

 

Don't know about shfs, but I just switched to NFSv3 and let me tell you. . .

Wow.  Twice the transfer speed of Samba.  Samba was around 6MB/s fluctuating, whereas NFS is 12.2MB/s steady.

Didn't realize what I've been missing.    :Very Happy: 

I actually topped out my LAN transfer speed.  I know because a guy I was getting a dcc from said his upload just died for a while then resumed (he was sending me the file).

----------

## whaase

 *echto wrote:*   

> Add to the smb.conf in the global section
> 
> use sendfile = no
> 
> echto 

 

Worked for me! Thanks.

Walter

----------

## quanttrom

yeah

awsome

use sendfile = no

worked for me too

thanks a lot

----------

