Help - Search - Members - Calendar
Full Version: Samba Question
Linuxhelp > Support > Technical Support

I was just reading some info abou Samba, and found this oplocks feature, I've read what it does, and what could posibly happen if things go wrong with oplocks = yes
From a webpage
If you want to be really careful and can live with reduced performance, you can turn off oplocks altogether, preventing the oplock break problem from ever occurring:

oplocks = no

The question would be, since we are using DOS based acounting applications [cause we are not ready [technicaly and people] for SQL], what would be the best : oplocks = yes or oplocks = no ?

Any advise in this?

Robert B
From the Using Samba (Version 1) book by O'Reilly:

In terms of locks, we highly recommend using the defaults provided by Samba: standard DOS/Windows deny-mode locks for compatibility and oplocks for the extra performance that local caching allows. If your operating system can take advantage of oplocks, it should provide significant performance improvements. Unless you have a specific reason for changing any of these options, it's best to leave them as they are.

The newer version of that book (Using Samba (Version 2)doesn't say that ... and instead says:
A more concrete example of oplock failure occurs when database files are very large. If a client is allowed to oplock this kind of file, there can be a huge delay while the client copies the entire file from the server to cache it, even though it might need to update only one record. The situation goes from bad to worse when another client tries to open the oplocked file. The first client might need to write the entire file back to the server before the second client's file open request can succeed. This results in another huge delay (for both clients), which in practice often results in a failed open due to a timeout on the second client, perhaps along with a message warning of possible database corruption!

I would say that for large files (like database files), you might be better off using the:

veto oplock files = /*.dbm/

option ... (replace the /*.dbm/ with your applicable file type). This might not work though, depending on how the clinet software locks the database file ... if each clinet locks the file while running, you may have to leave oplock enabled.

I don't use samba shares in this type of environment though (We use an Oracle database and ERP software from Manugistics on an HP-UX 11 server with 6 RISC processors ... and my job is to be the Unix/Linux Administrator / OracleDBA / Windows Administrator... {the clinet software for the ERP product runs in Citrix Client in Windows 2003 server} ... so I use Linux in that environment as a webserver and a sniffer ... and as my main workstation). At home I use Linux as my main workstation and my firewall (and I have a test machine {with 12 OSes} and a Myth-TV personal video recorder).

Well I only take care of Linux and Windows computers, we got only one Novell File Server in our enviroment, wich I gotta get rid of, since it's not licensed,...and if I can do the same file sharing with Linux, why use Novell?

The current file server is Novell, wich indeed get's slow when the dosprogams opens up it's search database [opens 3 or 4 40-50MB files] so I guess Novell gotta have something like that oplocks or something.

Oh and by the way, till I won't forget this, as you know Novell comes with a great utility for windows, Novell Client, now the real problem for me is, because when I'll move from Novell File Server to Linux File Server [with Samba 3.0.2a, or later if one will be available till then].

So the problem is, Novell client got a nice little utility like capture printer port, and that DOS program uses LPT1,2,3,4 to print to various printers. How could I possibly do this with Linux and a Windows 2000 or 2003 Terminal server?

All the clients are RH9 latest kernel/ updates, using remote desktop to connect to win2000 or 2003 terminal server , the terminal server is directly connected to the Novell file server with a 1000Mbit/s connection. [by the way 1000Mbit/s needed for 25-30 clients or is a 100Mbit/s enough?, the avarage communication beetween the terminal server and the dos program per/client start : 180kbyte/s while working 80-180kbyte/s.]

But that printing thingie is the one problem that I'm really-really scared of.... sad.gif

And one more thing I've been playning around with Windows 2000 Server, and nomater what I do, It just won't print to LPT5 and above [while it's there in the virtual printer ports] only LPT1,2,3,4 are available any ideas?

Robert B
Citrix is basically a better windows terminal server ....

I don't use terminal server, but I can tell you how I do this in a windows network ....

I set a variable called DOSPRINT for each computer (or in your case, for each user) that is the name of the network printer that is closest to that machine (for example DOSPRINT=printserverprinter1).

I use batch files (or cmd files) to start all my dos programs ... and two lines in those files are:

net use LPT1: /DELETE
net use LPT1: %DOSPRINT%

which sets up each user's printer.

If an individual user is going to be mostly at one terminal and need to print to one printer, you should be able to setup the variable DOSPRINT while logged into that user on the Windows termnal server (Right click on My Computer, select properties, select the advanced tab and enter under User Environment Variables....

Then if you use the lines I gave you, that user's LPT1 (when they log in) will always be set to the printer you define in their Environment Variables.
If you have specific dos programs that have to print to a specific printer (reguardless of the user that logs in), then the batch file to start that program can have it's own :


command...(which will only effect that program)

thanx for the reply...

emm...this may sound stupid, but Citrix is compatible with DOS aplications right?, as I see it's not from Microsoft [ if that is the place], how hard is it to configure a Citrix server?

oh and by the way

net use LPT1: /DELETE [this line deletes any printer previously assigned to that port right?]
net use LPT1: %DOSPRINT% [ how do I enter the shared printer path here ? one like this /rh9client1/hp1050 ]?

Robert B

ps.: can you tell me how much does a Citrix server costs for 50 clients ? need not be precise <1000$ or >1000$
and what kind of computer does a Citrix server requiere?
it would be like this:

backslashes don't show up correctly on the board ... but it is

set DOSPRINT=//servername/printer_share_name

... but using the other slash (the one above the enter key) instead of /

so basicaly

net use LPT1: /DELETE
net use LPT1: \rh9client1hp1050
net use LPT2: /DELETE
net use LPT2: \rh9client2EpsonLj
net use LPT3: /DELETE
net use LPT3: \rh9client3Fujitsu
net use LPT4: /DELETE
net use LPT4: \rh9client4DL3400

I guess putting it into a batch file that sets these thingies , and then automaticaly start the DOS program should work
right...for each client...

Robert B
Citrix is very expensive .... I have 2 servers and 30 concurrent users.

The total citrix software cost was $9062.00.

The windows 2003 server (on 2 servers) with 30 concurrent access was $3185.00

Windows 2003 Server Terminal Server access licenses - $3261.00

The hardware cost (for 2 Dell PowerEdge 2650 Xeon 3.06 servers each with 3 15Krpm 36gb drives and 2gb ram) was $10800.00 ($5400.00 each)

$5000 for software maintenence / upgrades.

Total cost was $31,306.00
It is very good
I think I will be able to convince my boss, to take this stuff in little steps,...but it seems to me for a beggining will stick with Windows2003 server ....

Robert B
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.