Skip to contentSkip to conversation

cifs 1.50 and dosemu 1.4 great combination

DISCUSSION kemas 4 participants 5 messages Oct 11, 2007 – Oct 15, 2007 2 messages not in the archive

lore
Share & tools
lore

kemas

author
#0 lore raw

hi all,

just wanted to share some story..

we use samba as file server, application mainly use dos clipper, foxpro base and some windows application.

we try to change the client to use linux so we can easily maintain the os remotely.
at first it was running quite well but slow, but later the client start complaining about how they loose their data and how they blame it because of using linux.

at that time we use
- centos 4.3
- cifs 1.34
- dosemu 1.2
- wine

try upgrading cifs from 1.34 to 1.40 doesn't resolve the problem, smbfs really not a solution for us because we need locking capabilies. ask for help from anyone (thanks akemi), become a headbanger because that problem still exist.

now we try to at one site to use
- centos 5
- upgraded to cifs 1.50
- dosemu 1.4
- wine

since then I get zero..zip complain from the user at that site regarding data losses, phew.

I just want to say a big thank you for such a great software,

thank you

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): 1192159242.2490.10.camel@localhost

#3 lore raw

kemas escreveu:

Quoted 7 lines
Quoted 3 lines

A clipper program runs on dosemu (I supose withe FreeDOS), dosemu runs on centos. But dosemu uses either an image (where lock work) or the linux fle system, I supose then that cifs is replacing samba and that lock work between doemu and cifs...

cifs does not replace samba, samba still the file server.

cifs is use as the filesystem to mount samba share, then dosemu would run our program on lredired drive. the lock here means file locking between multiuser apps that use the same file.

Could you give setup commands? This may interest more people, so I am bringing it back to the list...

I am not sure that I understand: You have a samba server, maybe even on the same machine; cifs then replaces samba-client, on every machine; then dosemu relays the file-locks correctly. Are you using freeDOS?

Sorry if I may seam a little dumb, but some time ago Bart said that lock did NOT work... and I googled about cifs and could not really understand the details.

Thanks,
Alain

#4 lore raw
Quoted 4 lines · Alain M.

Sorry if I may seam a little dumb, but some time ago Bart said that lock did NOT work... and I googled about cifs and could not really understand the details.

Locking "works", but not 100%. The problem is that DOS has 5 different locking modes (compat, deny read, deny write, deny all, and deny none), but POSIX only 3 (none, read, and write).

So somehow DOSEMU maps 5 to 3 and tries to be reasonable, but it is a heuristic. It may work, or it may not work for a particular application in a particular situation.

And there's a chain:
DOSEMU -1> Linux fs = cifs -2> samba or Windows server

-1> translates DOS locks to POSIX locks (lredir'ed drive).
-2> (may) do the reverse (mounted drive using the Linux kernel cifs module). smbfs used to do nothing at all with POSIX locks at -2> so it was broken. cifs now does it better (possibly as well as two DOSEMU's sharing files on an ext3 filesystem by now);
if the samba server implements POSIX extensions there isn't even a lock translation anymore for step 2.

Having DOSEMU talk directly to the samba server could be 100% reliable but a bit hard to setup (setup networking in DOSEMU, and install a DOS samba client in it).

Bart

#5 lore raw
In reply to Alain M.

Hi Alain!

Yes, the newest samba and the newest cifs-code together with kernel > (I think) 2.6.18 solves the samba locking problem. I just forgot to tell you.

At last my work and mails to Jeremy Allison were successful. Now even clipper locks are recognized and reported to the clients. Nevertheless samba is very slow. During my investigations about the samba locking problem I got the advice to turn my network concept around. Now all my clients log in on the server via ssh and start a dosemu or other session on the server. Network trafic is very much reduced and the work on the clients is quicker than ever. Working on Windows-servers/-clients can not keep up with that.

CU

Claudia Neumann

Am Freitag, 12. Oktober 2007 07:31 schrieb Alain M.:

Quoted 31 lines

kemas escreveu:

Quoted 11 lines
Quoted 4 lines

A clipper program runs on dosemu (I supose withe FreeDOS), dosemu runs on centos. But dosemu uses either an image (where lock work) or the linux fle system, I supose then that cifs is replacing samba and that lock work between doemu and cifs...

cifs does not replace samba, samba still the file server.

cifs is use as the filesystem to mount samba share, then dosemu would run our program on lredired drive.
the lock here means file locking between multiuser apps that use the same file.

Could you give setup commands? This may interest more people, so I am bringing it back to the list...

I am not sure that I understand: You have a samba server, maybe even on the same machine; cifs then replaces samba-client, on every machine; then dosemu relays the file-locks correctly. Are you using freeDOS?

Sorry if I may seam a little dumb, but some time ago Bart said that lock did NOT work... and I googled about cifs and could not really understand the details.

Thanks,
Alain

-
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

author
#6 lore raw
In reply to Alain M.

Hi Alain,
sorry for long reply, I was on national holiday for 2days.

Quoted 6 lines
Quoted 5 lines

cifs does not replace samba, samba still the file server.

cifs is use as the filesystem to mount samba share, then dosemu would run our program on lredired drive.
the lock here means file locking between multiuser apps that use the same file.

Quoted 7 lines

Could you give setup commands? This may interest more people, so I am bringing it back to the list...

I am not sure that I understand: You have a samba server, maybe even on the same machine; cifs then replaces samba-client, on every machine; then dosemu relays the file-locks correctly. Are you using freeDOS?

Our setup is like this
- 1 server
-- LTSP 4.2
use for the diskless client, booting through PXE.
we have mixed environment ;=)
-- SAMBA
use to for dos clipper/foxpro application.
in smb.conf we set 'cifs extensions = no', so samba will behave more like windows server, written in the documentation.

- 3 client with harddisk
-- centos 5

     --- desktop IceWM
     --- upgrade to cups 1.3
     --- dosemu 1.4
     --- upgrade to cifs 1,5
     --- wine 0.9.36

- 10 LTSP client
-- same like server

the server have several shared directories
\\bigdady\administrations
\\bigdady\public
\\bigdady\someshare

CLIENT SETUP
------------

* mount server share

because our user is not linux friendly,
we make some shortcut for the client so when they entered dosemu they will get the server shared already connected.

we put in autoexec.bat something like this, both for the

unix connectsmb.sh
lredir f: /home/user/mount
f:

the content of connectsmb.sh, the conditional test for the same user does not mount multiple time if they already have the share mounted.

statusq=df -h 2> /dev/null|grep $HOME/mount|awk '{ print $5 }'
if [ -z $statusq ]; then
sudo mount -t cifs \\bigdady\administrations /home/user/mount -o username=myuser,password=mypassword,uid=myuser,gid=myusergid, nounix,direct
fi

* printing, for printing we use cups 1.3.

for LTSP client, we create .dosemurc that define their personalize printer.
printing parameter has change from dosemu 1.2 to 1.4
so in .dosemurc we put

	$_lpt1 = "lpr -l -P lq2180"
	$_printer_timeout = (2)

for the client with harddisk is more simple, we put in dosemu.conf global for all the user.

	$_lpt1 = "lpr -l -P lq2180_local"
	$_printer_timeout = (2)

* finishing

because the server is not 24 hour running (workhour only 08:00am to 10:00pm), it is important to make sure that all the ltsp client disconnect from using the server shared properly.
so instead telling the user to use exitemu to exit dosemu, we make some batchfile to unmount the shared and then exit from dosemu (lets just call it timeout.bat).
timeout.bat
c:
unix sudo umount /home/myuser/mount
exitemu
because mount will not work if user have open several dosemu
session, so it is safe to do it like this.

Quoted 4 lines

Sorry if I may seam a little dumb, but some time ago Bart said that lock did NOT work... and I googled about cifs and could not really understand the details.

yes, we also read it in dosemu 1.4 documentation, that the lock on lredir drive may or may not work, and $_file_full_locks = (on) may help. But in my case, if we turn $_file_full_locks = (on) it will break things, so we still let $_file_full_locks = (off).

thanks