# Cifs/Smb unusable from Linux Clients on MS Server 2008 R2

## Yamakuzure

Hello everybody!

We used to store general project data (and more) plus some webapps on a Windows 2003 Server. It had to be an M$ Server, as there are some Programs in use that are Windows only. We linux users used to mount windows shares we need via cifs, and everything worked well and fast.

As a matter of fact nothing is working here any more since they upgraded from MS Server 2003 to MS Server 2008 R2. It still has all the options to "support" unix clients, but if I want to "hang" the whole network I just need to mount a windows share with cifs (used to do that and it worked like a charm with Server 2003) and do an "ls -l" on it. It needs 20 seconds while the whole network seems to be down before I get a list. Sometimes it does not even return or show anything, just hangs.

It even doesn't matter whether I join my laptop to the domain beforehand (kinit + net ads join) or not. But NFS isn't the solution here, because we have some WebApps on the Server, too (via xamp), and I simply can't use them from neither Linux nor a Windows XP in a VMWare Workstation. I have to dual-boot into Vista to be able to do anything, and then it works like a charm (besides Vista of course).

Downloading via NFS/SMB/CIFS from the Server: 40 seconds for a 20k file.

Uploading to the Server in any way: Up to 12MB/s.

So the "new" Server 2008 R2 is a greedy cheapskate on data.  :Sad: 

Has anybody here ever had similar experiences with linux clients on a Windows Server 2008 R2 Server going snail like hell? It doesn't seem to be something Gentoo Specific, because other clients use Debian and aren't performing any better. But since I am using Gentoo as my only linux distri I thought I try here.

I have searched for weeks now, but the only thing I was able to find out was /var/log/messages:

```
Mar 15 09:28:26 sed-notebook kernel: CIFS VFS: No response for cmd 50 mid 66
```

With the value after "mid" constantly rising.

What I found on that:

http://blog.dhampir.no/content/cifs-vfs-no-response-for-cmd-n-mid says to to disable OpLock. But whether "cat /proc/fs/cifs/OplockEnabled" says 0 or 1 doesn't change anything. In fact the above "ls -l" on a cifs mount seems to hang completely more often when OpLock is 0. (But that's rather subjective.)

http://lists.samba.org/archive/linux-cifs-client/2007-April/001904.html says that cmd 50 is a SMBtrans2 call. No idea what to make out of that.

I'd be happy for any ideas!

----------

## Rexilion

If I were you, I would upgrade my cifs client up to the latest possible and see if it helps. Windows 2008 is rather quite 'new', so I guess things must have changed in an incompatible (read: microsoft style) way.

----------

## DawgG

sorry to disappoint you, but that's just the way m$ works. you'll have to wait for a new samba-version or maybe new cifs-kernelcode. apart from checking the windoze-serverlogs and doing some monitoring there and listening to the network with tcpdump or wireshark there is not more advice i can offer. maybe there are some halfway-feasible workarounds like using ftp or webdav, but that's far from the "real" thing, of course.

(i'll spare you the rant but personally i believe m$ will do anything to break or exclude free clients. i have had more than a few experiences where eg after a windoze "update" all windoze clients stopped being able to print on a cups/samba-printer for no apparent reason other than "update for windoze blabla...")

GOOD LUCK!

----------

## Yamakuzure

Some more info:

I have gentoo-sources-2.6.32-r7, samba-3.4.5 (tried with and without USE="samba4") and have fiddled with a ton of cifs options.

So generally speaking your answers are what I feared but somewhat expected.  :Sad: 

----------

## Rexilion

 *Yamakuzure wrote:*   

> Some more info:
> 
> I have gentoo-sources-2.6.32-r7, samba-3.4.5 (tried with and without USE="samba4") and have fiddled with a ton of cifs options.
> 
> So generally speaking your answers are what I feared but somewhat expected. 

 

You could (as a last resort) try the samba-4.0 alpha11 that is in portage. (Always worth a shot   :Rolling Eyes:  )

----------

## Yamakuzure

Maybe I try that.

Another detail that puzzles me is, that the Apache Webserver is not only very slow, all webapps are unusable from any Client that isn't Windows. The mysql database, however, works as fast as ever if I connect via mysql from my Gentoo Box. So it isn't a general networking issue in all aspects.

Apache is listening on Port 80, which is open and dedicated for apache. IIS is not installed.

----------

## Yamakuzure

...and to make matters worse the ceo nearly ripped my head off when I suggested that we should downgrade to Windows Server 2003 (as that one worked without a problem and without a single reboot in nearly 15 months) *sigh*

----------

## baaann

This link suggests the problem is negotiating the SMB version, the default for Windows Server 2008 being SMB2 and for Samba 3.5 SMB1.

The resolution would appear to be adding "max protocol = smb2" to the samba configuration, according to this link

----------

## Yamakuzure

I'll try that. But I am a bit unsure, because I configured the server to use SMB1 only. (But since when do Microsoft Products exactly what you configured?)

Edit: But even if it worked (it doesn't, tried already), it wouldn't explain the reluctancy of the apache webserver to serve any data!

----------

