Hello! I need help (but who doesn's huh? :-) ) I meant to run one program - Money2000 (no, it is _not_ program from Microsoft) together with samba on linux, but i have problems with oplocks. This program is installed locally on win9x/NT and shares its databases. We tried to place databases on novell, on NT server and on win95 acting as server and everything worked fine. But when we tried to run this program with databases on samba server under linux, the problems began. It was possible to start several instances of program on the same computer, but when we started program on another computer, the program returned something like "On another computer is running operation that needs exclusive access to databases. Stop this operation and try to run program once again". That error message should appear only if somebody is trying to re-index or backup databases. The only way we were able to run the program on more than one machine was to set "fake oplocks = yes" which isn't very happy in network environment. So the problem seems to be with oplocks. Is there some difference between samba's and win9x/NT's oplocks? Does anybody know the solution of this problem? We tried a lot of changes in configuration, but ... nothing. Thanks Tomas Kuba e-mail: tkuba@seznam.cz Czech Republic
This might sound stupid, but, if you have an NT server, is it possible to have your FreeBSD/Samba server do the logons? By that I mean, due to Windows boxes constantly needing to be rebooted, can you add users to your Unix box and if need be add them to the NT box? If you can, how do you disable logons in NT? Thereby forcing the user to logon to the FreeBSD/Samba server? Can you still use user manager for domains? Thank you for your help. Lanny
On 7 Jul 99, "Steve Snyder" <swsnyder@home.com> had questions about Advice on accessing CD changer disks via Samba: [snip]> 0. I'd prefer not to call the shares CDROM0, CDROM1, etc. Is > there any way to automatically make a volume label a share name?You must be a C dude, huh? I've got a couple NEC changer drives I've used with linux and windoze, but I've never shared one with samba (I've got plenty of spare 2x drives lying around if anyone wants one...). The above drives don't work in linux the way they do in windoze; you can forget the whole "multiple drive letters for one drive" thing. The windoze changer driver only works that way, whereas the NEC driver lets you see it as one drive if you want. Then you switch slots with a little system tray widget. This is exactly how these drives work with linux. It defaults to the first slot, then you use the eject command (see man eject) to switch slots. Eject will not work if the drive is mounted, so your script will have to do something like this: umount /mnt/cdrom eject -c 1 (pause while the mechanism grinds away) mount /mnt/cdrom to switch to the second slot. Things should generally work better if you have a SCSI drive as opposed to IDE, as the SCSI drives implement a more consistent command set (or so says the xmcd author). Just my $.02 again, Steve ************************************************************* Steve Arnold http://www.rain.org/~sarnold Linux: It's not just for nerds anymore...
On 7 Jul 99, somebody had questions about Installation of Samba on SVR3 unix:> There are several ways of doing this: > > 1) untar samba on a system supporting long filenames (even PC), renaming > modules there then copying to the SVR3 system (hard way). Remember to > rename all references to the shortened modules (makefile, includes, ...). > 2) untar on a system that supports long filenames and mount on SVR3. > Should be able to compile without renaming modules. (I have not tried > this)If you can uncompress the package without untarring it, at that point it's just text. Then you can process it yourself with awk or perl (depending on your philosphy/experience). I think one of my work buddys wrote a tar/tape package for DOS that re-named files/dirs to DOS 8.3 names (way back in the dark ages). The original poster should mail me directly if I should inquire about it (this guy never throws away useful code). Steve ************************************************************* Steve Arnold http://www.rain.org/~sarnold Things go better with Linux and King Crimson.
Thanks for the reply Eugene> There are several ways of doing this: > > 1) untar samba on a system supporting long filenames (even PC), renaming > modules there then copying to the SVR3 system (hard way). Remember to > rename all references to the shortened modules (makefile, includes, ...).This was the conclusion I was coming to. I'm going to put a script together which will do this, if I can get it working I'll post it to the list.> There are patches you may need to make related to samba running with the 14 > char limit. I too am running Samba 1.9.16p9 on Motorola SVR3.Which patches are these? -- Pete ---------------------------------------------------------------- morph@morhp.dircon.co.uk Linux Registered User # 100652 A member of the MaVerick open source project http://www.maverick-dbms.org/ ---------------------------------------------------------------- Make like a shepherd and get the flock out of here.
Tomas Kuba <tkuba@seznam.cz> wrote: | It was | possible to start several instances of program on the same computer, but | when we started program on another computer, the program returned something | like "On another computer is running operation that needs exclusive access | to databases. Stop this operation and try to run program once again". That | error message should appear only if somebody is trying to re-index or | backup databases. Sounds like it's realized there is an oplock being held, and that therefor anothe rmachine may have the file cached... | The only way we were able to run the program on more than one machine was | to set "fake oplocks = yes" which isn't very happy in network environment. have you tries with oplocks turned off? That's the "normal" way one runs database-like PC apps. --dave -- David Collier-Brown, | Always do right. This will gratify some people 185 Ellerslie Ave., | and astonish the rest. -- Mark Twain Willowdale, Ontario | http://java.science.yorku.ca/~davecb Work: (905) 477-0437 Home: (416) 223-8968 Email: davecb@canada.sun.com
On Thu, 8 Jul 1999 09:01:31 +1000, David Collier-Brown wrote:> have you tries with oplocks turned off? That's the "normal" way > one runs database-like PC apps.That seems logical for me since caching is switched off if several clients access one, e.g. database, file. The funny thing is that since a database client software update we got oplock breaks. Switching oplocks off fixed the problem. I guess the WIN95/98 clients aren't behaving well. And finally, if one machine crashes you lose the cached data leaving you with an inconsistant database. The real question is: What are the best settings for multiuser database applications concerning speed (index searching). I tried different things like changes in the socket options, didn't change anything. After I updated to fast ethernet the database access speed didn't really change. The database (45Mbyte) seems to fit in the memory of Linux (2.0.35 with Samba 1.9.18.p8, 198Mbyte RAM). No disk access is needed (and seen) but still index searching is pretty slow, while single dataset access is good. Copying large files from the server is really fast (3.5 Mbyte/s no switch, just a hub!). So server and network speed should be ok. Maybe there is no reason to have read prediction=on since the clients just look for small datasets. So Samba shouldn't read too large chunks. Or are there other changes to be done? Maybe a client with a Celeron 300A is just to slow. :-) Or TCP/IP is limiting that? Just to make my point clear: If a single user accesses the database with oplocks=true, index search is really fast. But that is not the scenario I'm looking for. Any ideas? Thanks in advance, - Johann Johann Zuschlag jozuschlag@online.de
Johann Zuschlag wrote: | That seems logical for me since caching is switched off if several clients access | one, e.g. database, file. The funny thing is that since a database client | software update we got oplock breaks. Switching oplocks off fixed the problem. I | guess the WIN95/98 clients aren't behaving well. And finally, if one machine | crashes you lose the cached data leaving you with an inconsistent database. I often worry about cache consistency when one is doing any kind of update-in place (as opposed to "write the whole file after rechecking it hasn't changed on disk"). MS client code doing this makes me more worried than usual (;-)) | The real question is: What are the best settings for multiuser database | applications concerning speed (index searching). I tried different things like | changes in the socket options, didn't change anything. After I updated to fast | ethernet the database access speed didn't really change. The database (45Mbyte) | seems to fit in the memory of Linux (2.0.35 with Samba 1.9.18.p8, 198Mbyte RAM). | No disk access is needed (and seen) but still index searching is pretty slow, | while single dataset access is good. ... | Just to make my point clear: If a single user accesses the database with | oplocks=true, index search is really fast. But that is not the scenario I'm | looking for. Index searches, or any other full-table-scans, will want options aimed at maximizing data transfer speed and cutting latency... However, in my considered opinion, doing full-table scans by copying the data to a client and scanning there this is exactly what you **don't** want to do. I claim (and most database vendors agree) that searching on the database server is several orders of magnitude faster than shipping the data to the client. The only time you want to do that is when the dataset will be looked at over and over, and the looking process is cpu-intensive. Or there is only one client! Is the program a "real" database, that can do the searches locally, or is it strictly something that has to be run over nfs or smb? Be aware that some vendors sell inexpensive versions of their database that work ok for one or two users over nfs/smb, but don't scale. This then allows them to sell you a back-room machine to run the real version of the program, which works with remote clients but does all the hard stuff on the database server. Access is an example of this style of program[1]. The marketing approach used is "here, have a free sample of crack cocaine" (;-)) --dave [1. Warning: look at my return address before assuming anything I say about Access is without bias] -- David Collier-Brown, | Always do right. This will gratify some people 185 Ellerslie Ave., | and astonish the rest. -- Mark Twain Willowdale, Ontario | http://java.science.yorku.ca/~davecb Work: (905) 477-0437 Home: (416) 223-8968 Email: davecb@canada.sun.com
On Fri, 09 Jul 1999 09:42:00 -0400, David Collier-Brown wrote:> Is the program a "real" database, that can do the searches locally, > or is it strictly something that has to be run over nfs or smb?Well, it's just a database residing on a file server. So it will only use smb. It's no intelligent database server like an SQL-server. But still, searching (with and without index) should be faster. With caching it runs really fast, but that is not save und would only work with one client.>Be aware that some vendors sell inexpensive versions of their >database that work ok for one or two users over nfs/smb, but >don't scale. This then allows them to sell you a back-room machinesnip It doesn't matter whether there are 2 or 6 users, no speed difference. There is also an SQL Version of this database, but it runs only with MS-SQL server. I don't think it will run with a free SQL under Linux. regards - Johann Johann Zuschlag jozuschlag@online.de
> I was wondering if you had solved your data corruption > problem in samba? I seem to have a similar problem and have > not found a solution in the samba mailing list or archives.Hello Rick, for several days there occured no more fault (exactly since last friday morning). But I am still not save because the app manufacturer is not willing to provide a torture test that uses his DB and his libs. And we could not force the failure in a predictable way. So it is *impossible* to me to say: We solved it - yes. The only thing I can say is - the corruption did not occur again - until now. I am the consultant there and suggested to do at least daily backups. The settings I changed in /etc/smb.conf (we are using SMB 2.0.6 kernel 2.2.16): strict locking = yes oplocks = False oplock break wait time = 20 oplock contention limit = 4 This is placed in general section of smb. I wanted to be safe that smb is configured this way. I don't want to make experiments on a live system. I did some tests from a single workstation copying about 100 MB to smb server and found no influence in performance. That params seem really to hit the locking. So it will switch on *conservative* settings (again - I still guess if I am wrong). There is a file speed.txt in /usr/doc/packages/samba that explains some but not all. And I must admit that I am not that perfect when it comes to reading C sources implementing SMB. Ok maybe I should try it - but the time factor - you know... ;-) I was some disappointed that nobody of the specialists here in the list could help me out. I assumed that there would be at least one who could explain me if I am right in my assumptions what these params do. I hope the things above may give hints and do help. Maybe one of the mentioned above finds now it is worth to tell us if I am right? Maybe you could e-mail me your experiences? Robert Robert Schott roottec.com ----------------------------------------------- security is an illusion (Bombolo)
Hello Robert,>But I am still not save because the app manufacturer is not willing to >provide a torture test that uses his DB and his libs. And we could not force >the failure in a predictable way. So it is *impossible* to me to say: >We solved it - yes.>The only thing I can say is - the corruption did not occur again - until >now. >I am the consultant there and suggested to do at least daily backups.>The settings I changed in /etc/smb.conf (we are using SMB 2.0.6 kernel >2.2.16):> strict locking = yes > oplocks = False > oplock break wait time = 20 > oplock contention limit = 4The only important one is 'oplocks = False'. That stops the client from caching the database. Otherwise all writes to a database are kept in client cache until another client requests an oplock break which is not a good idea. In that case any changes to the to database would be lost in case one client crashes or a client misbehaves or due to network problems. Conclusion: Allways set oplocks = false if you have concurrent writes to a database/file. Or, if it is only one database file you could try 'veto oplock files'. 'strict locking' should be left to no (default). Forget the other two.>I was some disappointed that nobody of the specialists here in the list >could >help me out. I assumed that there would be at least one who could explain me >if I am right in my assumptions what these params do.Yes, you are right. :-) Regards, Johann
We are continually getting the following messages in the logfile, which consistently results in corrupted files. Mainly MSOffice 2000 files as well as FileMaker Pro DB corruption. error message: [2002/05/30 14:30:10, 0] smbd/oplock.c:oplock_break(761) oplock_break: receive_smb timed out after 30 seconds. oplock_break failed for file user/dnitzahn/Expense reports/More May travel 3.xls (dev = 7441, inode = 18166407, file_id = 64). [2002/05/30 14:30:10, 0] smbd/oplock.c:oplock_break(833) oplock_break: client failure in oplock break in file user/dnitzahn/Expense reports/More May travel 3.xls reply_lockingX: Error : oplock break from client for fnum = 13268 and no oplock granted on this file (user/dnitzahn/Expense reports/More May travel 3.xls).e:
Hi All, I am using Samba Version 2.2.3a on Red Hat Linux 2.4.18 and am having trouble in the settings. Quite a lot of clients have been saying that their PCs hang, whenever they access our server which acts as file and print server. The logs show messages of oplock break A portion of log file is : [2003/03/25 09:44:58, 0] smbd/oplock.c:oplock_break(758) oplock_break: receive_smb error (Success) oplock_break failed for file CLSS_CentrServe/ProjectPlans The configuration for oplocks in the /etc/samba/smb.conf file is as follows: kernel oplocks = Yes oplock break wait time = 0 veto oplock files fake oplocks = No oplocks = Yes level2 oplocks = No oplock contention limit = 2 We are thinking of shifting to latest version of samba, but will that help or will we have to make further changes. Please help if anyone has gone through the problem. Thanks in advance Alok Bhatt
On Tue, 2003-03-25 at 01:11, Alok Bhatt wrote:> We are thinking of shifting to latest version of samba, but will that help > or will we have to make further changes. Please help if anyone has gone > through the problem. >yes that will help - there were oplock bugs fixed recently. your other choice (not a very good one) is to disable oplocks completely. brad -- Bradley W. Langhorst <brad@langhorst.com>
Hello everybody! I'm (again) after that 30 second lockup some of us are experiencing. Today, when I deleted the file pspbrwse.jbf, I experienced the problem, and I immediately went to the logs. Here's what I got: [2003/05/06 11:06:50, 0] smbd/oplock.c:oplock_break(796) oplock_break: receive_smb timed out after 30 seconds. oplock_break failed for file htdocs/pictures/pspbrwse.jbf (dev = 901, inode = 11009, file_id = 2654). [2003/05/06 11:06:50, 0] smbd/oplock.c:oplock_break(868) oplock_break: client failure in oplock break in file htdocs/pictures/pspbrwse.jbf [2003/05/06 11:06:51, 0] smbd/reply.c:reply_lockingX(4626) reply_lockingX: Error : oplock break from client for fnum = 11670 and no oplock granted on this file (htdocs/pictures/pspbrwse.jbf). Ok, by the looks of it (anyone whith better knowledge of the SMB protocol and Samba internals, please correct me if I'm wrong), I would say the client requested an oplock on pspbrowse.jbf, then when it deleted it, the server issued an oplock break request wich was unanswered by the client... so after 30 seconds of receiving no answer, the server timed out the operation. So, there appears to be a bug in the client (not responding to the oplock break request). I must mention that the client is a Windows XP SP1. During those 30 seconds, the server didn't seem to respond to any request made by the client (that's why the client locked up). Other clients worked fine during those 30 seconds. Well, I have described what I think is the issue as best as I could... Apparently, It has nothing to do with WebDAV (I have already disabled it, and it didn't fix anything). Any suggestions? Regards, Gaston Dassieu Blanchet boogerman@interar.com.ar
Then, come to think of it, this oplock thing is dangerous (except for read-only files). Even with good clients (bug free), this could still fail in case of a network error or something. I guess I will just disable oplocks (or else this will trouble my sleep). I still wonder why M$ designed this mechanism if it was to bring such problems. Furthermore, is there any way to implement failproof oplocks (not over SMB, but in general)? Regards, Gaston Dassieu Blanchet boogerman@interar.com.ar ----- Original Message ----- From: "John H Terpstra" <jht@samba.org> To: "Boogerman" <boogerman@interar.com.ar> Sent: Tuesday, May 06, 2003 11:05 PM Subject: Re: [Samba] Oplock problem> On Tue, 6 May 2003, Boogerman wrote: > > > John > > > > Yes, I had already read the Locking chapter of the HOWTO-Collection(I've> > been crawling trought the list archives seeking for a solution to myproblem> > when I found a link to it). > > > > I found it very instructive. It describes very well what the types of > > oplocks are and what they are used for. It's a real good work. > > > > I only have one question. At a certain point, you mention a "risk ofdata> > corruption". Can you explain me where this risk comes from? Is there aflaw> > in the oplock request/break mechanism? > > Clients can fail to see oplock break requests, the server then times out > the lock, another client writes to the file, then the original client > write to it also. Bang! Bad data! > > - John T. > > > > > Regards, > > > > Gaston Dassieu Blanchet > > boogerman@interar.com.ar > > > > ----- Original Message ----- > > From: "John H Terpstra" <jht@samba.org> > > To: "Boogerman" <boogerman@interar.com.ar> > > Cc: <samba@lists.samba.org> > > Sent: Tuesday, May 06, 2003 2:13 PM > > Subject: Re: [Samba] Oplock problem > > > > > > > Gaston, > > > > > > There is a new chapter in the Samba-HOWTO-Collection.pdf (a work in > > > progress) on locking. I'd appreciate your feedback on it and any > > > suggestions you might make. Here is the URL for the in development > > > version: > > > http://samba.org/~jht/NT4migration/Samba-HOWTO-Collection.pdf > > > > > > - John T. > > > > > > On Tue, 6 May 2003, Boogerman wrote: > > > > > > > Hello everybody! I'm (again) after that 30 second lockup some of usare> > > > experiencing. Today, when I deleted the file pspbrwse.jbf, Iexperienced> > the > > > > problem, and I immediately went to the logs. Here's what I got: > > > > > > > > [2003/05/06 11:06:50, 0] smbd/oplock.c:oplock_break(796) > > > > oplock_break: receive_smb timed out after 30 seconds. > > > > oplock_break failed for file htdocs/pictures/pspbrwse.jbf (dev 901, > > > > inode = 11009, file_id = 2654). > > > > [2003/05/06 11:06:50, 0] smbd/oplock.c:oplock_break(868) > > > > oplock_break: client failure in oplock break in file > > > > htdocs/pictures/pspbrwse.jbf > > > > [2003/05/06 11:06:51, 0] smbd/reply.c:reply_lockingX(4626) > > > > reply_lockingX: Error : oplock break from client for fnum = 11670and> > no > > > > oplock granted on this file (htdocs/pictures/pspbrwse.jbf). > > > > > > > > Ok, by the looks of it (anyone whith better knowledge of the SMB > > protocol > > > > and Samba internals, please correct me if I'm wrong), I would saythe> > client > > > > requested an oplock on pspbrowse.jbf, then when it deleted it, the > > server > > > > issued an oplock break request wich was unanswered by the client...so> > after > > > > 30 seconds of receiving no answer, the server timed out theoperation.> > So, > > > > there appears to be a bug in the client (not responding to theoplock> > break > > > > request). I must mention that the client is a Windows XP SP1. > > > > > > > > During those 30 seconds, the server didn't seem to respond to any > > request > > > > made by the client (that's why the client locked up). Other clients > > worked > > > > fine during those 30 seconds. > > > > > > > > Well, I have described what I think is the issue as best as Icould...> > > > Apparently, It has nothing to do with WebDAV (I have alreadydisabled> > it, > > > > and it didn't fix anything). > > > > > > > > Any suggestions? > > > > > > > > Regards, > > > > > > > > Gaston Dassieu Blanchet > > > > boogerman@interar.com.ar > > > > > > > > > > > > > > > > > > -- > > > John H Terpstra > > > Email: jht@samba.org > > > -- > > > To unsubscribe from this list go to the following URL and read the > > > instructions: http://lists.samba.org/mailman/listinfo/samba > > > > > > > > > > > > > > > -- > John H Terpstra > Email: jht@samba.org > >