Re: [Samba] Can Constant Failed Connection Attempts Crash a Server?

2010-12-15 Thread Andy Liebman

Hi,

Freezing up means a kernel bug not a Samba problem. Can you ping the
servers when they have frozen up ?


Yes, but no ssh or KVM.

Something is going on here.  What more can we do to investigate it?

You need to get real data. Get servers that experience
the problem regularly to send log data about memory/disk/vm
usage off-machine via the network, that way it doesn't
matter if they become unresponsive - you have the last
data they sent which should lead you in the right direction.

We're going to have another try at this. We think we may have data on 
one machine that we collected to a file before a crash. If not, we will 
set up a data collection job that will automatically start on each reboot.



One more interesting data point today.  The transcoding workstations 
trying to connect are trying to access UNC paths.  They are not trying 
to mount the Samba shares.  Found this posting on the web today:


http://vim.1045645.n5.nabble.com/UNC-paths-on-Windows-extremely-slow-to-open-td1143493.html



--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Can Constant Failed Connection Attempts Crash a Server?

2010-12-13 Thread Andy Liebman

On 11/24/2010 03:47 PM, Volker Lendecke wrote:

On Wed, Nov 24, 2010 at 03:03:33PM -0500, Andy Liebman wrote:

You suggested previously this might be a kernel bug, or that the
failed attempts might be using up some scarce resource (memory? open
files? what did you have in mind?) Assuming we can reproduce this
issue, what do you suggest would be the best way to start debugging
it?  I don't think running Samba with more logging or debugging is
going to help.  Suppose we can continually run vmstat and write the
results to a log file.  Anything else you can think of?

That is one. Another one is to run top in batch mode and
send stdout to a file. From there you might monitor swap
space and see if used swap increases. If it does, see what
process grows.

If you have a constantly growing smbd, send it the

smbcontrolsmbd-pid  pool-usage

message and send us the output.

Volker

Hello Volker,

We have not been able to reproduce this problem in house, but we 
continue to have several servers in the field that are freezing up 
whenever we get these hundreds of thousands of unsuccessful connection 
attempts.  Sometimes it can take weeks to crash.  Sometimes it's days.  
We tried getting traces but servers keep getting rebooted without 
getting  data.


As we have continued to research the problem, we have found several 
other postings from the Samba list that mention similar issues.  I don't 
see that any of them were ever resolved.


http://lists.samba.org/archive/samba/2009-March/147197.html
http://lists.samba.org/archive/samba/2009-October/150998.html
http://lists.samba.org/archive/samba/2009-October/151583.html

There's even one about Samba on OS X
http://groups.google.com/group/macenterprise/browse_thread/thread/d525472792058b71?pli=1

The second link clearly mentions degraded performance as the 
unsuccessful connection attempts come in.  Somebody named John replied 
that the Samba version was too old -- 3.0.7.  But then the reporter came 
back and said he upgraded to 3.3.x and still had the problem.


There is a Microsoft KB article on truncated names, but it seems like 
it's probably unrelated:

http://support.microsoft.com/kb/896725

This came from Andrew Bartlett back in 2005
http://lists.samba.org/archive/samba/2005-October/112881.html

Something is going on here.  What more can we do to investigate it? If 
it's a Microsoft Windows installation going haywire on the network, how 
do we tame it?


Regards,
Andy Liebman


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Can Constant Failed Connection Attempts Crash a Server?

2010-11-24 Thread Andy Liebman

On 11/09/2010 04:43 AM, Volker Lendecke wrote:

On Mon, Nov 08, 2010 at 09:23:06AM -0500, Andy Liebman wrote:

And now I have this case.

I would appreciate the opinion of the Samba.org folks.  Does it make
sense that constant bombardment of a Samba server with failed
connection attempts could cause the whole server to crash?

No, definitely not. We could certainly talk about increasing
the debug level of that message from 0 to 1, so that it does
not appear in syslog.

Volker


I have another case today of constant failed connection attempts 
crashing a Samba server.  It's the same thing as the previous time -- a 
workstation continually trying to access a share using a share name 
that's missing the last character. As it happens, without the last 
character, the share name being requested ends with an underscore 
character  (_).  Don't know if that is relevant.


We are writing a simple Windows program to reproduce the failed 
connections and to see if we can bring down our own Samba servers.   :)


You suggested previously this might be a kernel bug, or that the failed 
attempts might be using up some scarce resource (memory? open files? 
what did you have in mind?) Assuming we can reproduce this issue, what 
do you suggest would be the best way to start debugging it?  I don't 
think running Samba with more logging or debugging is going to help.  
Suppose we can continually run vmstat and write the results to a log 
file.  Anything else you can think of?


FYI, I ran into another developer this week who had the same experience 
I had a few years back when the Google desktop indexer came out.  If 
Google indexer was trying to index a Samba share and it was logging in 
with the wrong credentials, it would try to log in thousands of times 
per minute and bring down the Samba servers after a short period of 
time.  Getting rid of the Google indexer made the crashes go away.


Andy
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Can Constant Failed Connection Attempts Crash a Server?

2010-11-09 Thread Andy Liebman

 On 11/09/2010 04:43 AM, Volker Lendecke wrote:

On Mon, Nov 08, 2010 at 09:23:06AM -0500, Andy Liebman wrote:

And now I have this case.

I would appreciate the opinion of the Samba.org folks.  Does it make
sense that constant bombardment of a Samba server with failed
connection attempts could cause the whole server to crash?

No, definitely not. We could certainly talk about increasing
the debug level of that message from 0 to 1, so that it does
not appear in syslog.

Volker
We are trying an experiment -- we have created Samba shares that match 
what the encoding computer is trying to connect to.   That will 
eliminate the error messages from the logs, of course.  We'll see what 
happens.


Unfortunately, we can't change the behavior of the encoding computer.  
We don't control the software and it seems to have some weird bug. It is 
connecting to the proper Samba shares, but then it's ALSO always trying 
to connect to Shares with the same names minus one character. Thus the 
failed connection attempts.  So, we'll just see if we can make it (and 
the Samba server) happy.   I will report back on results.


Andy
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba 3.5.6: can't follow symlinks on shares

2010-11-08 Thread Andy Liebman

 Hi Konstantin,

On 11/08/2010 01:21 AM, Konstantin Boyandin wrote:

08.11.2010 11:11, John H Terpstra writes:

On 11/07/2010 10:53 PM, Konstantin Boyandin wrote:

Samba version: 3.5.6, OS CentOS 5.5 64-bit.

The problem: I have a share with symlinks leading outside the share.
After mounting the shared resource (cifs), I can't proceed through
symlinks (permission denied).

Setting options

follow symlinks = yes
wide links = yes

for the share doesn't change Samba behaviour. Could someone 
enlighten me

on how to handle this?


Do not use symlinks, rather use bind mounts.


The idea is to make the navigation through symlinks uniform, both in 
ssh shell and via Samba share, without breaking anything that works on 
the shared directories and relies on symlinks existence..


Correct me if I am wrong, you propose changing all the symlinks to 
'mount -o bind' mounts?


Is there documented way to traverse symlinks on share?


I sounds like maybe you need to your [General] section the following line:

   unix extensions = no


That will make Samba resolve the symlinks on the server side.

Andy Liebman
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba 3.5.6: can't follow symlinks on shares

2010-11-08 Thread Andy Liebman

 On 11/08/2010 06:40 AM, Konstantin Boyandin wrote:


I sounds like maybe you need to your [General] section the following 
line:


unix extensions = no

That will make Samba resolve the symlinks on the server side.


In my case the section was named [global].
Thank you very much, that did the trick!



Sorry, my bad.  Yes you are correct.  It's [global] NOT [general].

Andy

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] Can Constant Failed Connection Attempts Crash a Server?

2010-11-08 Thread Andy Liebman

 Hi,

I am responsible for 1000+ Samba servers. One particular server keeps 
crashing every few days.  The server freezes up hard. I have swapped 100 
percent of the hardware (in other words, I replaced Server A with a 
completely new Server B) but the crashing is still occurring.


The server is running Samba 3.4.2 on 64-bit Linux with a custom 
2.6.32.11 kernel and 6 GB RAM.


I am fairly convinced the problem is being caused by a computer 
workstation on the network that is constantly trying to connect to a 
Samba share that does not exist.  Typically, I am seeing between 100,000 
and 200,000 failed attempts to connect to a share EVERY DAY.


For example, in the logs shown below, a video encoding station 
encoder-pc1 is trying to connect to a Samba share called 
tx-masters_.  However, the share is actually called tx-masters_1.


Nov  7 18:00:55 loaner-1 smbd[2851]: [2010/11/07 18:00:55,  0] 
smbd/service.c:1188(make_connection)
Nov  7 18:00:55 loaner-1 smbd[2851]:   encoder-pc1 
(:::192.168.10.101) couldn't find service tx-masters_
Nov  7 18:00:55 loaner-1 smbd[2851]: [2010/11/07 18:00:55,  0] 
smbd/service.c:1188(make_connection)
Nov  7 18:00:55 loaner-1 smbd[2851]:   encoder-pc1 
(:::192.168.10.101) couldn't find service tx-masters_
Nov  7 18:00:55 loaner-1 smbd[2851]: [2010/11/07 18:00:55,  0] 
smbd/service.c:1188(make_connection)
Nov  7 18:00:55 loaner-1 smbd[2851]:   encoder-pc1 
(:::192.168.10.101) couldn't find service tx-masters_
Nov  7 18:00:55 loaner-1 smbd[2851]: [2010/11/07 18:00:55,  0] 
smbd/service.c:1188(make_connection)
Nov  7 18:00:55 loaner-1 smbd[2851]:   encoder-pc1 
(:::192.168.10.101) couldn't find service tx-masters_
Nov  7 18:00:55 loaner-1 smbd[2851]: [2010/11/07 18:00:55,  0] 
smbd/service.c:1188(make_connection)
Nov  7 18:00:55 loaner-1 smbd[2851]:   encoder-pc1 
(:::192.168.10.101) couldn't find service tx-masters_
Nov  7 18:00:55 loaner-1 smbd[2851]: [2010/11/07 18:00:55,  0] 
smbd/service.c:1188(make_connection)
Nov  7 18:00:55 loaner-1 smbd[2851]:   encoder-pc1 
(:::192.168.10.101) couldn't find service tx-masters


I will see messages like this up to 200,000 times every day.  Just 
before the ABOVE crash, there were 100 failed attempts in one second.  
These messages are almost always the last thing in /var/log/messages 
before a freeze up (then again,  because these messages occupy about 
99.9 percent of the logs anyway, it may not be significant that we see 
them just before the crash).


I saw something similar about 4 years ago when Google came out with a 
Desktop Search tool for Windows.  A computer with the brand new Google 
search tool was constantly bombarding one of our servers trying to 
connect to a Samba share without supplying the proper login 
credentials.  In that case, each time there was a login attempt, there 
was a denied response from smbd.  After hours of operation, the server 
would always freeze up. The problem went away immediately after 
uninstalling the Google Desktop search tool. I never proved that the 
failed login attempts were causing the server to crash, but the evidence 
was fairly convincing.


And now I have this case.

I would appreciate the opinion of the Samba.org folks.  Does it make 
sense that constant bombardment of a Samba server with failed connection 
attempts could cause the whole server to crash?


Regards,
Andy


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] Values set in Include files and SMB.CONF

2010-10-06 Thread Andy Liebman

 Hi,

I use include files to define samba shares for individual users, so 
that each user has his/her own smb.username.conf file. Makes maintenance 
straightforward when you have hundreds of users. :)


Now I want to use include files for another purpose.  My many servers 
all have a standard smb.conf file, but I want to be able to customize 
the global settings on some servers by creating a file called 
smb.custom.conf and referring to this file in the global section of my 
main smb.conf.  The smb.custom.conf file will either be empty, or have 
custom values listed for some parameters. My question is, if I have one 
set of values in the global setting of my smb.conf file (for example, 
use sendfile = yes or max xmit = 32768), and then I put different 
values for those same parameters in an include file, will the values 
from the include file be the ones that get applied?


When I run testparm, indeed I see the values from the include file and 
NOT from smb.conf.  I just want to make sure there isn't some hidden 
trap in what I am doing.  Good advice welcome.


Andy Liebman
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] Setting Samba Write Cache Size Can Cause File Corruption

2010-09-28 Thread Andy Liebman

 Hi,

Back in June we had a thread going on this list about a problem we were 
seeing in which Disk I/Os on a Linux server periodically dropped out for 
a fraction of a second under very high Samba load  (high load = 100s of 
MB/sec for both Read and Write).


If you are interested in the details of the old thread, search the Samba 
list for Possible Issue with Samba Blocking I/O and CPU


Anyway, we came to the conclusion that using the Samba variable write 
cache size = 262144 could significantly reduce the incidence of these 
I/O drop outs.  If we understand correctly,  this setting influences the 
minimum amount of data that Samba will send to the filesystem in a given 
write event.  We suspect setting this value (versus not setting it) can 
provide a mechanism to help keep Samba writes aligned to the stripe size 
and stripe width of a hardware RAID array and help reduce or eliminate 
so-called partial stripe writes.


After months of successful testing and real-world use,  we believe we 
found a situation in which setting the write cache size causes a 
serious glitch.  Searching Google with the terms  Samba 'write cache 
size' file corruption  yields a few prior cases of reported corruption, 
one with a patch to Samba in October of 2002.  A couple of subsequent 
reports seem to have remained unresolved.


In our situation, when write cache size is set to 262144 and when a 
certain non-linear video editing application imports still images and 
saves them as a single video frame to a Samba share, under some 
circumstances the file can get corrupted. At least that's what the 
editing application says about the file. Most of the time, importing 
works out just fine.  For all codecs tested -- ranging from 25 Mbit/sec 
DV25 to 100 Mbit/sec DVC Pro HD to uncompressed SD and HD  
(respectively, about 28 and 160 MB/sec) -- imported still frame images 
are fine when the video standard is NTSC.  But for PAL video (where each 
frame is slightly larger in size, but the total MB/sec is slightly lower 
due to 25 versus 29.97 frames per second) we found a couple of medium 
data rate codecs where the imported still frames always get corrupted.  
It is 100 percent reproducible.


The problem doesn't seem to be the actual SIZE of the files.  In other 
words, it's not like you pass some size threshold and then see the 
problem, or even that there are particular file sizes that cause 
problems.  You can import a still image as a DV25 PAL frame and get a 
641KB file and you can import the same still image as a DV50 NTSC frame 
and also get a  641KB file and the PAL file is always corrupted but the 
NTSC file is always fine. (I know it is weird that the files are the 
same size -- NTSC DV50 has double the data rate per sec and 20 percent 
more frames per second than PAL DV25, so a single sample frame from DV50 
NTSC should be approximately 2*(PAL DV25)*(25/30) or 1.66*(PAL DV25).  
But they are the same. What can I say?).


I can tell you that setting write cache size to 131072 (half the size) 
makes the corruption go away, and so does turning off the write cache 
size setting altogether.  However, we are now wondering why the write 
cache size can have this effect on file corruption and whether setting 
it to 131072 will cause a corruption problem under some other 
circumstance we just haven't hit yet.


Any ideas?  By the way, we have seen and documented this problem with 
both Samba 3.4.2 and Samba 3.5.3. We also noticed that write cache 
size was listed as deprecated in 3.4.2 and that in 3.5.3 it is no 
longer listed as deprecated.  Somebody besides us must have thought 
keeping write cache size was still a good idea??


Andy Liebman

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Setting Samba Write Cache Size Can Cause File Corruption

2010-09-28 Thread Andy Liebman

 Hi

Well it's because this code must have a bug :-). Volker is
right, you should check it first with the v3-6-test git tree
code, as he has done some changes there that might have
already fixed it (if so we will back-port to 3.5.next of
course). If not, we'll need voluminous traces to track
down the exact set of writes that cause the problem.
Using the vfs_full_audit might initially help.

We just compiled it.  As I said, very easy to reproduce. So, we'll let 
you know what we find tomorrow with the new code.   We have already 
looked at wireshark traces and it won't be any problem to get you level 
10 logs (if the problem still persists).  Fortunately, it's just 1 frame 
of video, so the logs won't be THAT unmanageable.


Thanks!

Andy

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Can only see files one level deep

2010-06-18 Thread Andy Liebman

On 06/18/2010 11:35 AM, DNK wrote:

I solved it! (For me). Pulled from here.

http://www.macwindows.com/snowleopard-filesharing.html#050310a


The veto files line for my share in /etc/samba/smb.conf includes the file 
.DS_Store. For Mac clients accessing the share using SMB instead of AFP, the 
.DS_Store file needs to be accessible and writable, otherwise the Finder will 
hang trying to create it. Hope this helps!

I commented out the following line in my smb.conf:

#veto files = /.DS_Store/._.*/DesktopFolderDB/Network Trash 
Folder/resource.frk/TheFindByContentFolder/TheVolumeSettingsFolder/

   


You might also want to consider telling OS X to NOT create .DS_Store 
files on network volumes in the first place.  .DS_Store files store 
information about how you want things to display in Finder when you are 
looking at that directory -- icons versus text, icon size, colored 
highlighting on files and folders, etc.


Unless there is some specific reason why you WANT that functionality, it 
is best to configure OS X to not create .DS_Store files on network 
volumes.  Allowing OS X to create these  files can lead to all sorts of 
problems if multiple users need to access a particular Samba share.  One 
OS X computer will tend to try to own the .DS_Store file, causing 
other workstations to give you the beach ball or other kernel panics 
when they cannot modify the same file.


To disable .DS_Store file creation:

   *  open Terminal in OS X (from /Applications/Utilities)
   *  run the following command, all on one line:


$ defaults write com.apple.desktopservices DSDontWriteNetworkStores 
true


You may have to run it as sudo, i.e.,

$ sudo defaults write com.apple.desktopservices 
DSDontWriteNetworkStores true


-- Andy Liebman
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Possible Issue with Samba Blocking I/O and CPU

2010-06-11 Thread Andy Liebman



According to Jeremy, using write cache size = 262144, you end up with a 256
_megabyte_ cache for _each_ smbd process.  Apparently the setting value is in
kilobytes, not bytes.  With 10 active users that equals ~2.5GB of system
(virtual) memory allocated to smbd read/write cache.  This would definitely
explain why you're masking any underlying kernel I/O problem.  As Jeremy said,
with this configuration, you're now rarely touching the disks.

   

Hi Stan,

This contradicts what it says in man smb.conf.   Can we clarify what 
is correct?



 write cache size (S)


   If this integer parameter is set to non-zero value, Samba will
   create an in-memory cache for each oplocked file (it does /not/ do
   this for non-oplocked files). All writes that the client does not
   request to be flushed directly to disk will be stored in this cache
   if possible. The cache is flushed onto disk when a write comes in
   whose offset would not fit into the cache or when the file is closed
   by the client. Reads for the file are also served from this cache if
   the data is stored within it.

   This cache allows Samba to batch client writes into a more efficient
   write size for RAID disks (i.e. writes may be tuned to be the RAID
   stripe size) and can improve performance on systems where the disk
   subsystem is a bottleneck but there is free memory for userspace
   programs.

   The integer parameter specifies the size of this cache (per oplocked
   file) in bytes.

   Default: //|write cache size|/ = |0| /

   Example: //|write cache size|/ = |262144 # for a 256k cache size per
   file| /


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] Possible Issue with Samba Blocking I/O and CPU

2010-06-10 Thread Andy Liebman

Hi,

I am experiencing a puzzling problem that may or may not be related to 
recent versions of Samba.  I'm posting on this list, however, because it 
seems that setting write cache = 262144 (256K) in smb.conf resolves 
the issue and so I have reason to believe the problem might somehow be 
related to Samba.


The problem I am seeing is this.  I have a Linux Samba server. When 
simultaneously reading and writing from multiple client workstations -- 
let's say I'm writing a total of 80 MB/sec from 4 Windows clients and 
reading 220 MB/sec from 12 other Windows clients -- every half hour or 
so, all I/O seems to grind to a halt for 1 or 2 seconds. You can see 
this graphically using a program such as gkrellm.  You just see a 
dropout of all reading and writing from/to the disks. SMB traffic 
continues to come in from the network, but SMB traffic stops going out 
TO the network.  This same pattern has been observed on multiple 
servers, so the problem isn't caused by some bad RAID card or other 
piece of defective hardware.


Looking at data from /proc  (this is easy using a program like 
collectl), at the moment of the dropout, you can see that idle time 
goes to 0 on any CPU core running smbd processes, and wait goes very 
high.  On the core handling the interrupts for the RAID card driver, 
idle time goes to 100 percent.  This is running the 2.6.32.11 Linux 
kernel with Samba 3.5.3 (the latest as of today) or Samba 3.4.2 (the 
version that comes with my distro).


Curiously, the 1-to-2 second drops don't occur with the exact same 
hardware and workload when running the 2.6.20 Linux kernel with Samba  
3.0.23d.  Since 2.6.20, there have been huge changes made in the vm 
layer of the Linux kernel (specifically related to pdflush and the per 
device bdi mechanism).  There have also been many changes to the 
deadline i/o scheduler.  For several weeks, my colleagues and I have 
been thinking that changes to one of those code areas might account for 
the difference.  However, after much study and experimentation in 
tweaking those subsystems, we could not make this occasional drop out 
behavior go away.


By the way, this dropout behavior does not occur with a pure write or 
pure read workflow. Only when there is a mixture of read and write. 
Our theory is that we might occasionally be getting a bunch of 
small-sized blocks of data to write,  causing our RAID-5 configured RAID 
card to do a large number of partial stripe writes, which would result 
in reading useless data from the drives in order to calculate parity for 
a number of stripes, and interfering with reading data that has actually 
been requested by clients.


Two days ago -- grasping a bit for straws -- we tried messing around 
with some smb.conf settings.  It turns out that setting write cache = 
262144 made this specific problem go away.  We have repeated our tests 
for over 8 hours since making this change and we have not seen a single 
dropout like before. Presumably, with this setting, Samba will only 
write out in 256K blocks (which happens to be the stripe size on our RAIDS)


My question is, does anyone have a clue why setting write cache like 
this would have such an effect?  Is setting write cache just covering 
up some other problem? Is there any downside to using write cache?  
And why didn't we have this issue with the 2.6.20 kernel + Samba 3.0.23d?


FYI, my setup is as follows:

Supermicro X7DWE motherboard
Intel Xeon 5482 3.2 Ghz Quad Core CPU
4 GB ECC Buffered RAM
3ware 9650 RAID card with 9.5.3 firmware (latest, includ fixes for prior 
issue of writes blocking reads)

16 x 7200 RPM SATA drives
Myricom 10 Gigabit NIC
HP 2910 Switch with 4 x 10 Gigabit Ports and 24 x 1 Gigabit Ports
Linux with 2.6.32.11 kernel
Samba 3.5.3

The RAID system itself can sustain writes of  650 MB/sec and reads  
700 MB/sec.  When accessing the storage from Windows workstations via 10 
Gigabit, there is no problem whatsoever in reading/writing  300 MB/sec 
from any given client.


Any good insights into the cause of what I'm seeing would be much 
appreciated. Thanks in advance.


Andy Liebman



--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Possible Issue with Samba Blocking I/O and CPU

2010-06-10 Thread Andy Liebman



With this setting of write cache, if the apps have a good locality
of data reference you'll almost never hit the disk, as everything
will be served out of that memory cache.

Sorry I can't be too helpful here, but this really doesn't look like
a Samba problem.

Jeremy.
   


Thanks Jeremy,

It's not really possible that I could almost never hit the disk. I am 
writing 80 MB/sec of new data to the storage, and I'm reading 220 MB/sec 
of data from the storage.  Doing this hours on end without any repeated 
data.  The size of this Samba cache is very small compared to all of 
that data.


Since sending my first email, I have another 2 hours of flawless 
performance.  This contrasts with days on end of these periodic 
dropouts before we set the write cache line.


I realize there might be a kernel issue.  But I want to understand why 
setting write cache might mitigate it, and where there is any serious 
downside to specifying a write cache?


Andy
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Possible Issue with Samba Blocking I/O and CPU

2010-06-10 Thread Andy Liebman



Since sending my first email, I have another 2 hours of flawless
performance.  This contrasts with days on end of these periodic
dropouts before we set the write cache line.
 

It's a kernel issue - by setting write cache you are changing the
smbd read/write patterns to the disk. How much you change them depends on the
locality of reference of the client apps, as I mention above.

   


I want to correct myself here.  The smb.conf setting was write cache 
size and NOT write cache.  Hopefully you understood what I meant.

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Asynchronous I/O

2010-06-08 Thread Andy Liebman

Thanks, Jeremy!

Andy

Currently aio on Linux is horribly broken due to a conservative
glibc, which limits asynchronous requests to one outstanding one
per file descriptor (which pretty much makes all io synchronous
on Linux, whether you set aio sizes or not :-( ). I think this
is a bug which needs fixing but haven't yet had time to do the
work to prove this to glibc maintanence. This will be increasingly
important for SMB2, as the Windows redirector now properly
pipelines io (which the SMB1 redirector doesn't).

Currently the only way to get real aio on Linux is to use
Volker's vfs_aio_fork module, which uses processes to get
true async io working. Volker is also doing a lot of work
making aio work correctly on Linux (he has a git branch
you can track for this). Should be working properly in
3.6.x and above (that's the plan :-).

   


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] Asynchronous I/O

2010-06-07 Thread Andy Liebman

Hello,

Is there any straightforward way to see whether Samba is using 
asynchronous i/o?  In other words, if you specify in smb.conf to use 
aio for all transfers larger than 1 KB (pretty much everything), how can 
you tell that aio is actually being used?   Are there any counters in 
Linux or in some samba logs that you can see incrementing over time?


Thanks in advance.

-- Andy
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] OS X Clients Can't Create Sub-Directories

2010-02-02 Thread Andy Liebman


Kimball Larsen wrote:
I'm running samba on a local linux server, with a bunch of shares.  Over the last several years, this has worked perfectly in our heterogenous network of OS X and Windows.  All my windows clients still work perfectly - my users can mount the samba shares and create, rename, move etc files and folders. 

However, recently (starting yesterday) my OS X clients are unable to rename any sub directories on any of my shares. 

So, if I have a structure like this: 


Share Root
FooFolder
Bar Folder

My OS X users are able to create and rename directories in the share root, but 
are unable to rename folders they create in sub directories.

So, if my OS X user navigates to FooFolder and tries to create a new folder there, a new folder is 
created called untitled folder, but I'm unable to rename it.  Every time I do, the finder 
says You don't have permission to rename the item untitled folder.

But, again, I can create and rename folders in the root of the share without issue. 


Here are the relevant bits from my smb.conf (Neighborhood is the name of the 
share):

[global]
log file = /var/log/samba/log.%m
load printers = no 
guest account = nobody

passwd chat = *Enter\snew\sUNIX\spassword:* %n\n 
*Retype\snew\sUNIX\spassword:* %n\n *password\supdated\ssuccessfully* .
socket options = TCP_NODELAY
obey pam restrictions = yes
encrypt passwords = true
passwd program = /usr/bin/passwd %u
passdb backend = tdbsam
dns proxy = no
delete readonly = yes
server string = %h server
invalid users = root
workgroup = lappygroup
security = share
syslog = 0
panic action = /usr/share/samba/panic-action %d
max log size = 1000
unix extensions = no


[Neighborhood]
  comment = Who are the people in your neighborhood...
  path = /mnt/brick/Neighborhood
  public = yes
  writable = yes
  create mask = 0777
  directory mask = 0777
  force user = nobody
  force group = nogroup


And here are the permissions on the root of the share:
r...@jake:/mnt/brick# ls -la | grep Neighborhood
drwxrwxrwx 46 nobody nogroup 2360 2010-02-02 15:31 Neighborhood

And the Advertising directory where I want to create a sub directory.
r...@jake:/mnt/brick/Neighborhood# ls -la | grep Advertising
drwxrwxrwx  4 nobody nogroup   144 2010-02-02 15:49 Advertising

And the resulting untitled folder that is created by the OS X client. 
r...@jake:/mnt/brick/Neighborhood/Advertising# ls -la

total 11
drwxrwxrwx  4 nobody nogroup  144 2010-02-02 15:49 .
drwxrwxrwx 46 nobody nogroup 2360 2010-02-02 15:31 ..
-rwxrwxrwx  1 nobody nogroup 6148 2009-05-04 10:03 .DS_Store
drwxrwxrwx  3 nobody nogroup 1064 2008-12-17 15:38 Lead Tracking
drwxrwxrwx  2 nobody nogroup   48 2010-02-02 15:49 untitled folder


What should I be checking?

Thanks!

-- Kimball 




  


Hello Kimball,

What version of Samba Server are you running?

What version of OS X are you running?  There have been huge changes in 
the use (and setting) of extended attributes with Snow Leopard.  These 
can cause all sorts of issues that were not there before.  Have your Mac 
clients just updated to Snow Leopard?


I see that there is a .DS_Store file in the directory.  The permissions 
on those files can prevent User B from accessing a share that User A 
accessed (or at least the directories in that share that were accessed 
by User A).  In a shared environment accessed by multiple OS X servers, 
it's usually best to disable the creation of .DS_Store files on network 
volumes, as the wrong permissions on these files can prevent users from 
doing things they expect to be able to do.


There are many postings on the net about how to disable the creation of 
the .DS_Store files,  for example:


http://www.macosxhints.com/article.php?story=20051130083652119

Regards,
Andy

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Deletion of directory symlink via Samba deletes files in original subdirectory on Unix

2009-12-02 Thread Andy Liebman

Hello


Any ideas?  I am going to compile the latest and greatest Samba and
put it on a test machine to see if it resolves the problem.

Thanks --

Kathy
  
I don't have a solution to your problem, although I discovered a similar 
problem in Samba's behavior with symlinks to FILES.  Getting good Level 
10 logs was key to figuring out what the problem was -- and fixing it.  
That got fixed in 3.0.14 or 3.0.15 I believe.


I myself make extensive use of symlinks to DIRECTORIES in my 
applications.  If you're thinking about a workaround, here's a question:


What are the permissions on the directories that the symlinks point to? 
If a user could directly see one of those directories, would he/she be 
able to delete it?


Andy
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Deletion of directory symlink via Samba deletes files in original subdirectory on Unix

2009-11-24 Thread Andy Liebman

Jeremy Allison wrote:

On Tue, Nov 24, 2009 at 04:24:13PM -0800, Kathy wrote:
  

Hello --

We have a Solaris 10 ZFS server running Samba with follow
symlinks=yes set.  We're noticing that if you delete (via Samba) a
file that is a symbolic link pointing to a subdirectory somewhere,
with files in that subdir, it will not only delete the symbolic link
file, but also delete the files in the target subdirectory.  On Unix,
if you delete a symbolic link, it will leave the original target
subdir (and its files) untouched.  This behavior only seems to happen
if the symlink is pointing to a populated subdirectory.  If you have a
symlink that points to a file and delete the symlink via Samba, the
original file remains intact.  Does anyone know of a way to get around
this particular behavior?  We would like it to behave as in Unix.
Only the symlink gets deleted and not the subdir/files it was pointing
at.



What version of Samba ?

Jeremy
  
This sounds a bit like the problem we (EditShare) discovered and that  
you patched a few years ago-- in the 3.0.14 days I think.  Remember... 
We discovered a sort of delayed reaction.  If you deleted a symlink to a 
file that some other user had open, when both users finally closed the 
file the FILE would get deleted rather than the SYMLINK. 


Could it be related?

Andy Liebman
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] SMBD CPU climbs sky high when writing DPX files

2009-11-05 Thread Andy Liebman

Hi Volker,



The problem is the following: When creating a file we have
to prove that the file does not exist in a different
upper/lower case combination. Under Unix, the only way to
prove this is to list the whole directory and do a case
insensitive comparison on each existing file.

  


Thank you SO much. Your suggestion totally solved the problem. It makes 
sense when you think about it.


Results:  When capturing standard definition DPX files, CPU utilization 
is now down at 7 percent (out of 400 percent) and holds steady forever 
basically.  I was able to capture 150,000 frames (83 minutes) before I 
got bored and stopped my test. 

In addition, I'm now capturing HD-444 DPX files which run at about 260 
MB/sec and that's doing fine as well -- running at 37 percent total CPU 
(out of 400 percent).


Cheers,
Andy
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] SMBD CPU climbs sky high when writing DPX files

2009-11-04 Thread Andy Liebman

Hello,

I am experiencing a strange problem when writing (capturing) DPX video 
files to a Linux/Samba share. Basically, I'm seeing seeing a single smbd 
process go from 9 percent CPU utilization to 100 percent CPU utilization 
over the course of about 40 minutes.  When smbd reaches 100 percent, the 
capture stops (drops frames). I have tested this with three different 
filesystem formats (XFS, ext3 and ext4) with similar -- although 
slightly different -- results.


My test systems have been running the following:

2.6.31.4 kernel with Mandriva 2009.1 with Samba 3.3.2
2.6.28-11 Ubuntu 9.04 with Samba 3.3.2
2.6.27.38 kernel with Samba 3.0.23d
2.6.20.15 kernel with Samba 3.0.23d

For those of you who may not be familiar with the DPX format, unlike 
QuickTime or other streaming media formats, DPX is one file per 
frame. So, a 20 minute DPX movie in the US NTSC TV format would 
consist of 30 fps x 60 secs x 20 minutes = 36000 individual files all 
written into one directory.


I have a very capable networked storage system. The underlying hardware 
RAID is capable of reading and writing at least 700 MB/sec sustained. 
The storage system is running on a 3.2 Ghz Intel 5482 Quad Core CPU with 
4 or 6 GBs of RAM (depending on the system). I don't have any problem 
writing uncompressed high-definition QuickTime files to Samba shares at 
160 MB/sec over 10 Gigabit Ethernet.  However, trying to write standard 
definition DPX files over Samba -- only 40 MB/sec -- fails consistently 
after about 60,000 files have been written, plus or minus about 5000 files.


In the screenshots shown in the link below, you can this happening when 
I was writing to a 6 TB ext4 filesystem. This was a real shocker.


 http://sites.google.com/site/andrewl733info/ext4_and_samba_2


On the above system (which had 6 GB of RAM), it seems that most cpu 
activity was restricted to a single core of a Quad Core CPU.  SMBD cpu 
utilization climbed steadily throughout the capture.  CPU began at 7 
percent for one core and by the time I got to 66000 frames, I was at 100 
percent cpu for one core. I started taking screen shots a third of the 
way through. Then I went back and started again.


I also tested XFS as the filesystem.  In fact, that's my preferred 
filesystem.  I formatted the same 6 TB volume using the suggestions of 
experienced XFS developers (specifying lazy-count=1 for the log and 
properly specifying the sunit and swidth for the data portion) and I 
mounted it with the important flags -o,noatime,nobarrier,inode64.  
Here's a record of what happened under these circumstances.


 http://sites.google.com/site/andrewl733info/xfs_and_dpx-1

Depending on the kernel tested (and in some cases whether an irqbalance 
daemon was running), either most activity was concentrated on a single 
core, or it was spread out evenly among all 4 cores.  But in either 
case, smbd cpu utilization would climb steadily from under 10 percent at 
the beginning to 10 times that at the end. And when top showed that my 
single active smbd was at 100 percent, the capture would fail. (To 
clarify this last point, when cpu activity is spread evenly among all 
cores, top still shows the total activity for smbd. When it says 100 
percent, that would be about 25 percent on EACH core, or 100 percent out 
of 400 percent total.)


My questions are:

1)  why is smbd cpu utilization climbing so high in just 40 minutes?
2)  could the cause be related to creating, opening and closing so many 
files so quickly?  After all, we are creating, opening and closing 30 
files each second.
3)  is there anything I can do about it (besides give up)? Samba doesn't 
seem to be running out of memory. There is still 3-cores worth of CPU 
being unused at the time the capture fails.


I have collected Level 10 logs of the capture to the XFS volume.  Please 
feel free to look at them. I'm sorry if the format isn't totally 
convenient.  The actual log file turned out to be 1.6 GB.  I made a 
single bz2 file out of this -- 27 MB, but Google Sites only lets me 
upload in 11 MB pieces, so I split up the bz2 file into 3 pieces with 
the split program. I believe you will have to download all of them, 
and then put them back together with something like:


  cat sambalogpart_a* sambalog.bz2

   
http://sites.google.com/site/andrewl733info/files/sambalogpart_aa?attredirects=0d=1

   
http://sites.google.com/site/andrewl733info/files/sambalogpart_ab?attredirects=0d=1

   
http://sites.google.com/site/andrewl733info/files/sambalogpart_ac?attredirects=0d=1


Andy

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Re: samba on quad core vs dual core

2008-12-09 Thread Andy Liebman



Samba will use all the cores you can give it - so long as
you have at least more clients than cores.

Jeremy.
  
While I have found that to be true in my environment, I have also found 
that MOST smbd's end up on Core 0 MOST of the time.  This is true even 
if I am hammering a 10 Gigabit network adapter (i.e., sending out 700 
MB/sec via Samba distributed to 30 users), with total CPU utilization 
only about 70 percent of one core.


Maybe this is optimal behavior.  I tried to start a thread on this  list 
a while back about understanding what WOULD be optimal, and nobody had 
much to say.


I think it would be an interesting discussion. NFS seems to make use of 
multicores in a more even way. That doesn't mean the NFS behavior is 
better.


Andy
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Curious Question about Multiple CIFSD's

2008-11-04 Thread Andy Liebman
I know this isn't the right place to ask this question, but does anybody 
know if it's possible to force a Linux client machine to spawn multiple 
cifsd's when connecting to a SINGLE Samba Server? I seem to be running 
into some Linux cifs client limits with a single connection. One cifs 
client can talk to multiple Samba servers at around 100 MB/sec 
(aggregate) over a single GigE connection. But the client stumbles 
trying to do more than around 40-45 MB/sec to/from a single Samba Server.


If I connect some shares from Samba Server A via CIFS and other 
shares via NFS, I can get about double the aggregate throughput that I 
get if I connect all by CIFS. So, the bandwidth between the two machines 
has the potential to be much higher than what I get just by CIFS. And of 
course FTP and RSYNC without encryption shows almost line speed.


I am experimenting with some of the CIFS tunables (cifs_max_pending and 
CIFSMaxBufSize).  For various reasons, I have to mount with directio 
so wsize and rsize aren't really relevant.


But it seems the easy way out might be to somehow get multiple cifsd 
processes talking to the same server. Is it possible? What if I give 
more than one IP Address to the SAMBA Server? Can I connect some shares 
to one IP address and other shares to the other IP Address? Will that 
result in more than one cifsd?


Andy Liebman
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Best Resource for Windows ACL Mapping

2008-06-27 Thread Andy Liebman
Can anyone recommend a good how to for mapping Windows ACLs onto a 
Samba Share? I have a very specific Windows permission setting that I'm 
trying to create and I can't quite figure out how to do it.


In specific, I'm using an application that doesn't respond optimally to 
read only files unless the Security settings come up with just the 
following Advanced properties:


List Folder/Read Data  Yes
Read Attributes  Yes
Read Extended Attributes  Yes
Read Permissions  Yes

Everything else must be unchecked.

This is my observation from seeing how the application deals with Read 
Only files on a local NTFS filesystem. My assumption is that I must 
recreate the exact same permission on files stored on the Samba share.


Ideally, somebody has a chart that displays in one column desired 
Windows ACLS and in a second column what you have to do to create this 
with Samba?


Andy
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Best Resource for Windows ACL Mapping

2008-06-27 Thread Andy Liebman

eric wrote:

Hi,
Do you use acl FS ?

Derrick.


Yes.  ext3 mounted with acl support.


Andy Liebman a écrit :
Can anyone recommend a good how to for mapping Windows ACLs onto a 
Samba Share? I have a very specific Windows permission setting that 
I'm trying to create and I can't quite figure out how to do it.


In specific, I'm using an application that doesn't respond optimally 
to read only files unless the Security settings come up with just the 
following Advanced properties:


List Folder/Read Data  Yes
Read Attributes  Yes
Read Extended Attributes  Yes
Read Permissions  Yes

Everything else must be unchecked.

This is my observation from seeing how the application deals with 
Read Only files on a local NTFS filesystem. My assumption is that I 
must recreate the exact same permission on files stored on the Samba 
share.


Ideally, somebody has a chart that displays in one column desired 
Windows ACLS and in a second column what you have to do to create 
this with Samba?


Andy




--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Samba Shares Suddenly Look Empty with 3.0.28a

2008-06-23 Thread Andy Liebman

Jeremy Allison wrote:

On Fri, Jun 20, 2008 at 10:47:08AM -0400, Andy Liebman wrote:
  
Does this problem sound familiar to anybody.  On a busy Linux server 
that exports lots of Samba Shares for video editing, upgrading from 
Samba 3.0.23d to Samba 3.0.28a has caused a huge problem.


After several hours of use, ALL exported Samba Shares suddenly appear to 
have NO FILES to ALL CONNECTED OS X CLIENTS. Also, it is still possible 
to log into shares (so to some extent, Samba is still working). But when 
you log in, the shares look empty as well.


There are NO ERROR MESSAGES in the standard level 3 samba logs. There 
are no error messages in the syslog. smbd seems to be running fine. 
Restarting Samba, and reconnecting to the shares brings the files back.


The problem I am describing has been very reproducible. It's just a 
matter of waiting a few hours and occurs. Reverting back to Samba 
3.0.23d makes the problem go away.


Any ideas?



Can you get traffic captures from when the OSX clients
are failing to see the files. Sounds like something George
and James would be interested in looking at.

Jeremy.
  
Hi Jeremy.  What do you mean by traffic captures? Wireshark? Or Level 
10 logs? Or both?  Although this problem was reproducible, it cropped up 
in a production environment and so I can't really ask the user to 
intentionally disrupt work again.


Thus, i need to investigate another way to reproduce the issue. It 
seemed to be related to time.  However, it might have been related to 
amount of data transferred or something else that RISES WITH TIME.


I would also, of course, like to know if Windows clients are effected.

Andy
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Samba Shares Suddenly Look Empty with 3.0.28a

2008-06-20 Thread Andy Liebman
Does this problem sound familiar to anybody.  On a busy Linux server 
that exports lots of Samba Shares for video editing, upgrading from 
Samba 3.0.23d to Samba 3.0.28a has caused a huge problem.


After several hours of use, ALL exported Samba Shares suddenly appear to 
have NO FILES to ALL CONNECTED OS X CLIENTS. Also, it is still possible 
to log into shares (so to some extent, Samba is still working). But when 
you log in, the shares look empty as well.


There are NO ERROR MESSAGES in the standard level 3 samba logs. There 
are no error messages in the syslog. smbd seems to be running fine. 
Restarting Samba, and reconnecting to the shares brings the files back.


The problem I am describing has been very reproducible. It's just a 
matter of waiting a few hours and occurs. Reverting back to Samba 
3.0.23d makes the problem go away.


Any ideas?

Andy Liebman


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Windows bombarding Samba looking for share that does not exist

2007-11-08 Thread Andy Liebman
I have a strange problem and I'm hoping that somebody on the list 
recognizes what it is.


I am running Samba 3.0.23d on a Linux box with 2.6.20.15 kernel.
I am connecting from 5 or 6 Windows XP SP 2 boxes.

A share on the Linux box exists called Music (Note the UPPER CASE 
M). The share is accessible to all users who have smbpasswords on the 
Linux box.


Most Windows users are successfully connecting to the share and mapping 
it as a network drive. However, ONE Windows machine periodically hits 
the Linux server with thousands of requests to connect to service 
called music (note the lower case m) instead of Music.  There are 
thousands of error messages in the logs saying


Nov  8 02:45:13 fileserver smbd[8516]: [2007/11/08 02:45:13, 0] 
smbd/service.c:make_connection()
Nov  8 02:45:13 fileserver smbd[8516]:   johnpc (10.0.0.43) couldn't 
find service music


This occurs several times a day.

When other users try to connect to the share, the samba logs clearly 
show they are connecting to the service Music


Is there any way that Windows could have have been told at one point -- 
or thought it was told -- to connect to a share called music and that 
Windows is stubbornly continuing to try to connect? Even after rebooting 
the Windows box? Windows definitely never saw a shared called music by 
browsing because a share by that name has never existed on the Linux box.


Maybe another clue is that there are also some less frequent errors in 
the logs that say:


Nov  5 02:46:13 fileserver smbd[32209]:   make_connection: connection to 
Music denied due to security descriptor.
Nov  5 02:46:13 fileserver smbd[32209]: [2007/11/05 02:46:13, 0] 
smbd/service.c:make_connection_snum(782)


As I said, most users have no problem connecting to this share.

Hope this rings a bell for somebody out there...
Andy


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Samba and Dual Core Utilization

2007-10-31 Thread Andy Liebman
In the past week, working with Samba 3.0.23d and the Linux 2.6.20 
kernel, I have observed something interesting about Samba and the 
utilization of multiple CPU cores.


On a single Dual Core 3 Ghz Xeon machine, when I am hammering the Samba 
server with requests from many client machines, a variety of CPU 
utilization tools like Gkrellm and Qps show that CPU utilization is 
around 30+ percent on one core and only 1 to 2 percent on the other 
core. Qps shows that a single user's smbd process sometimes hops from 
one core to another (which would seem generally undesirable) but all 
smbd processes mostly spend their time on CPU 0.


When I put a second identical CPU on the same motherboard with the same 
kernel, the CPU utilization tools show that smbd processes are evenly 
spread out among all 4 cores. There is a little shifting of smbd 
processes from one core to another, but for most of the time the various 
smbd process each stay on particular cores. CPU utilizaton shows that 
each core is at around 8-12 percent.


Under both scenarios -- one or two physical CPUs -- I am using the same 
VERY BIG RAID subsystem and I am running the same test from the same 
group of workstations. I have replicated my results on multiple 
identical servers so I can't explain the results based on any defect in 
the hardware.


Does anybody have a good explanation as to why smbd seems to more fully 
utilize multiple cores when there are two physical dual core CPUs in the 
system versus when there is just one physical dual core CPU? In theory, 
if CPU utilization is only at 30-40 percent with a single physical CPU, 
is it better to stay on just one core? And would that mean that 
something suboptimal is happening when there are two physical CPUs?


BTW, my kernel is compiled with options optimized for Core 2/Dual Core 
Xeons and with SMP support for Dual Core (versus HT).


Good insights would be appreciated.

Andy
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Re: XFS and Group Quotas

2006-09-25 Thread andy liebman

[EMAIL PROTECTED] wrote:

Hello Andy,

I noticed your post on the samba list.

Did you ever resolve it ?

I have the same issue with 3.0.22 and XFS group quotas not working, did you 
ever find a resolution ?


-Michael Carmody


I did not resolve it. I am still using 3.0.13 precisely because of this 
issue.


As far as I know, you are the third person to report this problem. The 
Samba folks asked me for some Level 10 logs, which I admit I did NOT get 
around to  submitting. The other person who reported this last week 
promised to send in logs and appears to have sent them in already.


They have been added to my original Bug Report, Number 3747.

What distribution are you using? It would be good to say if this is a 
distribution-specific problem (maybe some distro builders are 
mis-configuring Samba before they build it?) or if it is a general issue 
with Samba.


I am using Mandriva 2006 and 2005. The other person who reported this 
was using some version of Ubuntu.


Andy

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Windows Application Overriding Samba Settings

2006-09-21 Thread andy liebman
I have just encountered a strange situation. A new version of a Windows 
application that I use was just released. Unlike previous versions of 
this application, when it writes data to my Samba share, it is setting 
permissions to be 777 on all files and folders. In contrast, previous 
versions of this application set permissions to be 2750 as I specify in 
the share definition in my smb.conf file.


In smb.conf, in the share definition I specify:

directory mask = 0750
create mask = 0750

My understanding is that this should LIMIT the maximum permissions that 
can be set for a file or folder created by Windows or a Windows 
application. The file or folder should never be group writable, or even 
accessible by others.


In addition, I have also played with specifying the following options:

force directory mode = 2040
force create mode = 2040

Until this new version of the Windows application came out, I never had 
any issues. ANY folder or file created by the application always had the 
same permissions:  2750 or 570 (respectively)


But NOW The Windows application seems to be completely getting around 
the limits that I imposed with Samba and Linux. All files and folders 
are getting set as: 0777


I even have the root directory of the share (in which files and folders 
are getting created) set to SGID -- yet Windows is managing to override 
this and is not preserving the SGID on new folders.


Does anybody have a clue what's going on here? How can Windows or a 
Windows Application override my Linux and Samba settings? And is there 
anything I can do about it?


FYI...

In this case I am running Samba 3.0.13.  The Windows version is XP SP2. 
Please don't suggest that I upgrade to Samba 3.0.2x (unless you know 
that it specifically solves this problem). That is not an option at the 
moment.


Thanks in advance for the help.

Andy Liebman

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] OSX file creation problems

2006-08-17 Thread andy liebman

[EMAIL PROTECTED] wrote:

I have done some digging and found out more.  The problem seems to be
that OS X is reporting the 5TB drive as 1TB and since there is over 1TB
on the drive, it shows as full.  Does anyone know of a work around for
this?

thanks,

Dan



On Thu, 2006-08-17 at 13:44 -0500, Daniel Davidson wrote:
I am running a REHL 4.3 server with samba RPMs: 


3.0.10-1.4e.9

When an os X client connects to our samba server it can copy files from
the server an overwrite other files that already exist.  However when it
comes time to create a file, it fails, where this process works
correctly from a windows system.  In addition, I can go to where the
volume is mounted on the os X (10.3.7) machine and copy files there.  


This isn't a problem for me, but it is for my users, has anyone else
experienced this?

thanks,

Dan






Upgrade to Tiger (minimum 10.4.3) or set quotas on the shares so that OS 
X sees the shares as under 2 TB. Pre-Tiger OS X versions can't deal with 
shares seen as being over 2 TB -- they simply can't write to them. Say 
no space available.


Andy Liebman
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] SMBD using nearly 100 percent CPU

2006-07-07 Thread andy liebman
Over the past few months, I have seen many postings here about runaway 
smbd processes with Samba versions 3.0.20 and above. Personally, it 
never happened to me until today. Also, I have stuck with Samba 3.0.13 
on most of my machines because of THIS reported issue and a couple of 
other issues that I have experienced.


However, I have a machine running RIGHT NOW where smbd has gone out of 
control. This machine is running 3.0.20b. If it would help, and if 
somebody could tell me exactly -- and I mean exactly -- what to do on my 
machine to capture information that might help explain what is going on, 
I would be happy to collect the information.


But, it has to be in the next couple of hours. It is 8:30 am Friday in 
Boston, MA USA. I have to reboot the machine to use it in about 3 hours.


Note that rpc.statd also seems to be out of control. Don't know if it is 
related.


Andy Liebman

Here's what TOP looks like:

Tasks: 170 total,   2 running, 168 sleeping,   0 stopped,   0 zombie
Cpu(s): 12.6% us, 34.1% sy,  0.0% ni, 20.3% id,  0.0% wa,  0.0% hi, 33.1% si
Mem:   2075844k total,  2019784k used,56060k free, 7668k buffers
Swap:  1012052k total, 2556k used,  1009496k free,  1820308k cached

  PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  COMMAND
 4743 root  25   0  8664 2164 1416 R 99.7  0.1 621:48.83 smbd
 2569 root  15   0  1692  688  584 S 58.8  0.0 323:00.52 rpc.statd
 4928 andrew15   0 13604  11m 1592 S  0.7  0.6   0:10.55 Xvnc
11509 andrew16   0 27520  12m   9m S  0.3  0.6   0:01.64 konsole
1 root  16   0  1560  536  472 S  0.0  0.0   0:00.70 init
2 root  RT   0 000 S  0.0  0.0   0:00.00 migration/0
3 root  34  19 000 S  0.0  0.0   0:00.00 ksoftirqd/0
4 root  RT   0 000 S  0.0  0.0   0:00.00 migration/1
5 root  34  19 000 S  0.0  0.0   0:00.00 ksoftirqd/1
6 root  10  -5 000 S  0.0  0.0   0:00.09 events/0
7 root  10  -5 000 S  0.0  0.0   0:05.15 events/1
8 root  11  -5 000 S  0.0  0.0   0:00.01 khelper
9 root  10  -5 000 S  0.0  0.0   0:00.00 kthread
   12 root  20  -5 000 S  0.0  0.0   0:00.00 kacpid
  124 root  10  -5 000 S  0.0  0.0   0:00.05 kblockd/0
  125 root  10  -5 000 S  0.0  0.0   0:00.05 kblockd/1
  167 root  15   0 000 S  0.0  0.0   3:42.50 pdflush
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Samba Quotas For XP Client (Homes Shared)

2006-05-20 Thread andy liebman

[EMAIL PROTECTED] wrote:

Hiya! I'm using samba as PDC for validating windows xp clients. I have quotas 
activated for the /home on my linux but the shared unit on windows xp is giving 
me the full partition size. What i've to do to make it show just the user quota 
size???

I think i've compiled samba --with-quotas option.

Thanks guys!


What version of Samba are you using? And what type of filesystem do you 
have -- ext3, xfs, reiser, etc?


With XFS, at least Group Quotas seem to be broken in Samba 3.0.22. I 
have reported this as a bug and here on the list. Haven't gotten a reply 
from anybody.


Andy Liebman
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Samba3 and OS X 10.4.6

2006-05-13 Thread andy liebman

[EMAIL PROTECTED] wrote:

I have sort of an odd problem that I'm hoping someone can shed a light on.

I brought up a brand new Fedora Core 4 box using the default 
installation of Samba. The only change I made to smb.conf was to turn on 
encrypting passwords, and then did an smbpasswd -a for my user account 
and set a password.


Using Windows XP, or OS X 10.3.9, I can connect to smb://server and be 
asked to authenticate, and then get a list of shares.


With 10.4.6 (I tried several machines) when trying to connect to 
smb://server rather than giving me a list of shares or trying to get me 
to authenticate, the progress bar on the connect to server dialog 
shimmers basically forever.


Using 10.4.6 I can connect to specific shares using smb://server/share 
without any problem. It only sits there when I do not specify a share.


Using the same 10.4.6 machine, I can connect to a machine running 
Win2003 server just fine using smb://server.


So basically this problem only exists when I use Tiger to connect to a 
Samba server.


Has anyone heard about this? Any ideas?


Fedora Core 4 comes with Samba 3.0.14 (or 14a) if I am not mistaken. 
There was a change in that particular Samba version that created show 
stopper issues connecting and authenticating from OS X Tiger versions. 
The issues were resolved with Samba 3.0.20. I suggest that you upgrade 
to Samba 3.0.22 or go backwards to 3.0.13 if you can find an rpm.


Personally, I still find 3.0.13 to be the most stable and trouble-free 
of all of the Samba versions I have used with OS X.


Hope that helps.
Andy Liebman


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] XFS Group Quotas Revisited

2006-05-01 Thread andy liebman
I wrote into the list a few days ago about XFS Group Quotas not working 
in Samba 3.0.21c and 3.0.22.  I have confirmed that if I uninstall 
3.0.22 and reinstall 3.0.13, when I change an XFS group quota on Linux 
and mount a share that belongs to that group, if I look at the 
Properties for that share in Windows, Windows tells me that the size 
of the share is equal to the GROUP QUOTA that was set -- i.e., 200 GB. 
That is the desired behavior.


If I switch back to 3.0.22, Windows tells me in the Properties for the 
share that the size of the share is equal to the size of the PHYSICAL 
VOLUME (in this case, 4.4 TB).


What can I do to help you track down the source of this problem? Is 
there a workaround?  It doesn't seem as though this is the same problem 
that was reported earlier about LVM and XFS and Quotas.


Regards,
Andy Liebman
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Possible issue with XFS Quotas and 3.0.22

2006-04-28 Thread andy liebman

Hi,

We use XFS, Samba and Quotas. Until now, we haven't had any issues with 
Samba versions up to 3.0.13. But we are testing Samba 3.0.22 and 
noticing that when we set group quotas on XFS volumes, the quotas are 
NOT getting reflected on Windows XP workstations when you look at the 
Properties of a Samba share. With 3.0.13 and below, the group quotas 
come through fine. In both cases, we are using 2.6.14 kernels. Any 
ideas? Any tests we can run to help sort this out?


Regards,
Andy Liebman
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Possible issue with XFS Quotas and 3.0.22

2006-04-28 Thread andy liebman

[EMAIL PROTECTED] wrote:

Check the list for a thread titled.

[Samba] quota on xfs on lvm doesn't work(?)

It has something to do with the way the shares get mounted.  I have 
had a similar problem and worked around it with a custom quota command 
that samba uses to get the information.


Cheers,
Eric

Thanks. I had seen this thread, but because it seemed to apply ONLY to 
LVM and XFS, I didn't pay too much attention -- because I'm not using 
LVM. In my case, I want Samba to pass on Group Quota information. The 
user requesting the quota information is a member of the group, by the 
way.


Andy



Hi,

We use XFS, Samba and Quotas. Until now, we haven't had any issues
with
Samba versions up to 3.0.13. But we are testing Samba 3.0.22 and
noticing that when we set group quotas on XFS volumes, the quotas are
NOT getting reflected on Windows XP workstations when you look at the
Properties of a Samba share. With 3.0.13 and below, the group quotas
come through fine. In both cases, we are using 2.6.14 kernels. Any
ideas? Any tests we can run to help sort this out?

Regards,
Andy Liebman
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba




--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Big performance difference between smbclient put/get

2006-04-13 Thread andy liebman

[EMAIL PROTECTED] wrote:

Hi list,

I'm using Samba 3.0.21 on a FC4 box.

When copying files using smbclient I get huge speed differences between 
put and get commands.


smb: \ put backup.tar
putting file backup.tar as \backup.tar (543.0 kb/s) (average 543.0 kb/s)
smb: \ get backup.tar
getting file \backup.tar of size 31549440 as backup.tar (7681.4 kb/s) 
(average 7681.4 kb/s)

smb: \ put backup.tar
putting file backup.tar as \backup.tar (512.5 kb/s) (average 527.3 kb/s)
smb: \


Get = 7681.4 kb/s
Put = 530 kb/s

Any reason why?



Any idea how your socket buffers are set in smb.conf? That can make a 
huge difference in my experience. so_rcvbuf and so_sndbuf

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Mishandling read only files in 3.0.20b vs 3.0.21c

2006-03-21 Thread andy liebman
I noticed a few days ago running Samba 3.0.20b on Linux that if I had a 
 file called myfile that was owned by userA:groupX, writable by 
userA but read only for groupX


0744 userA:groupX   myfile

and that file was in a directory /directory2/myfile which was writable 
by the group groupX


0775 userA:groupX  directory2

and directory2 was in directory1 which was also writable by groupX 
/directory1/directory2/myfile


0755 userA:groupX  directory1

if as userB, member of groupX I connected to a Samba share that 
contained the above directory structure, and the smb.conf file gave 
groupX permission to write to the share, as userB I was unable to move 
myfile out of directory1 and put it in directory2, or vice versa.


Upon trying to move the file, Windows XP SP2 told me that the file was 
Read Only and asked if I really wanted to move it. Then Windows gave me 
an Access Denied error.


Running Samba 3.0.13 previously on the same Linux box, with exactly the 
same smb.conf file, moving myfile back and forth between directories was 
not an issue. Also, when I upgraded to Samba 3.0.21c, the issue went away.


My question is, are you (Samba folks) experimenting with something 
here?. I have some Windows and Macintosh applications that will warn you 
when you open a read only file on a local disk. That can be useful, so 
that you don't waste time modifying a file that you won't be able to 
save. With Samba 3.0.13, and Samba 3.0.21c, if the file is located in a 
Samba share, you don't get the warning until you try to save the file.


With Samba 3.0.20b it was useful to get the warnings. However, it was 
BAD that Samba 3.0.20b didn't follow Linux rules where the permissions 
of the directory containing the file should determine if the file can be 
moved or deleted or overwritten.


Any comments or insights into where you are heading with this?

Andy Liebman
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Questions about file system support in Samba

2006-02-05 Thread andy liebman

[EMAIL PROTECTED] wrote:

I tried to access these shares from Windows XP Pro SP2 and got identical
results.  Ext3 filesystems smaller than 2 GB work fine.  Anything bigger
than 2 GB and xfs filesystems of any size fails. 


I guess I'm going to have to resort to reading code, posting on bugzilla as
a bug and maybe switching to a Windows based server.  I really need to get
this system up and doing its intended job.

I'd really like to hear from someone that they are actually exporting ext3
filesystems larger than 2 GB and xfs filesystems and it's working.  If
they're doing so with the Fedora core 4 release, that would definitely point
to something strange here.  


Smitty
Hibbard T. Smith, JR
[EMAIL PROTECTED]
 



Samba works fine with xfs. I have xfs volumes up to 12 TB on a Mandriva 
system and export Samba shares on that volume without issue.


Andy
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Is it possible to build smb directly over ethernet?

2006-01-14 Thread andy liebman

[EMAIL PROTECTED] wrote:

On Sat, Jan 14, 2006 at 07:09:05PM +0330, jik jikman wrote:

Hi all,

Is it possible to design a smb-like protocol to work directly over ethernet.

I mean if we can omit tcp/ip overhead, we can achive a very high troughput
substitute for small networks with less cpu utilization.

I am searching for ways to bridge the gap between NAS and SAN systems, e.g.
between SMB/CIFS and FC with volume sharing softwares like IBM sanergy.

This will lead to good performance with less costs compared to FC SANs and
even ISCSI SANs.


It used to exist - it was called NetBEUI :-). It has many disadvantages... :-).

Jeremy.


Interesting topic. I have recently been investigating whether there is a 
lower-overhead protocol that we might be able to use for OUR NAS 
products -- and still use SMB/CIFS and AFP.


I have come across several TCP/IP alternatives that are supposed to be 
smarter about handling dropped packets -- NOT throttling down to almost 
zero transfer rate and working back up again the way TCP/IP does (I'm 
not a TCP/IP expert, but that's what I'm told the protocol does). 
They're also supposed to be smarter about adjusting Window sizes and 
handling ACKS and that kind of stuff. These alternatives claim things 
like 10x faster than FTP over long distances.


Jeremy, I wrote to you about one of those recently. That one seemed to 
be optimized for FILE TRANSFER and not realtime use of files over a 
network -- where the order in which data arrives is presumably more 
crucial.


I also see that there once WAS a Samba patch to support NetBEUI. In 
fact, Jeremy, you seemed pleased about it and suggested it would be 
included in Samba 3 as a configuration option --with-netbeui.



http://lists.samba.org/archive/samba-technical/2000-July/008748.html


Would NetBEUI be a faster local LAN alternative if it could be 
ressurected again.


Is there any other alternative on the horizon that could get transfer 
rates closer to line speeds when dropped or misordered packets are a 
very unlikely issue -- like on an isolated LAN connecting just a few 
machines over 10 Gigabit Ethernet??


Andy Liebman

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] 2TB Limit for Windows Shares?

2006-01-11 Thread andy liebman

Thanks for the input, please see below.

[EMAIL PROTECTED] wrote:

hi,

i´m sorry, but i cannot ack to this report.
we have for example one server with 3,12TB (each share shows this space, 
no quotas set)and win xp (pro) clients are fine with this (btw: MAC OSX 
had problems with shares 2TB - smb.conf has a parameter for virtually 
limiting the disk size)


My Windows XP clients show almost unlimited space as well. BUT, we have 
found we cannot actually put more than 2TB of data in the space.


So, Windows shows the space being available, but stops writing once 
there are 2TB there. Have you actually put MORE than 2 TBs of data into 
that space that says there are 3.12 TB?


Andy



greez

andy liebman wrote:
I have noticed recently that Windows XP seems to stop writing into 
Linux/Samba shares once there is 2 TB of data in the share. Windows 
Explorer is happy to report that a share has 4.8 or 8 or 10 TB of 
space available, but Windows seems to cease writing into the share 
once there are 2 TB in it.


Is this a known limitation of a) Windows or b) Samba or c) both? It 
certainly isn't a limitation of the filesystem I'm using.


Andy Liebman




--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] 2TB Limit for Windows Shares?

2006-01-11 Thread andy liebman

[EMAIL PROTECTED] wrote:

On Wed, 2006-01-11 at 18:49 -0500, andy liebman wrote:

Thanks for the input, please see below.

[EMAIL PROTECTED] wrote:

hi,

i´m sorry, but i cannot ack to this report.
we have for example one server with 3,12TB (each share shows this space, 
no quotas set)and win xp (pro) clients are fine with this (btw: MAC OSX 
had problems with shares 2TB - smb.conf has a parameter for virtually 
limiting the disk size)
My Windows XP clients show almost unlimited space as well. BUT, we have 
found we cannot actually put more than 2TB of data in the space.


In a single file?
or with multiple files and dirs?

What's the error you get back ?

Simo.


In multiple files and directories. I haven't had this experience myself 
(because I haven't filled up 2 TB of files in one share). But this is 
what some of my users tell me. I'm not sure there's any specific error. 
Maybe just disk full. I plan to test this myself later in the week 
(just duplicating the same 500 GB of information 5x). I asked on the 
list because I wasn't sure if this was a known issue.


Andy
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] 2TB Limit for Windows Shares?

2006-01-08 Thread andy liebman
I have noticed recently that Windows XP seems to stop writing into 
Linux/Samba shares once there is 2 TB of data in the share. Windows 
Explorer is happy to report that a share has 4.8 or 8 or 10 TB of space 
available, but Windows seems to cease writing into the share once there 
are 2 TB in it.


Is this a known limitation of a) Windows or b) Samba or c) both? It 
certainly isn't a limitation of the filesystem I'm using.


Andy Liebman
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba