Koozali.org: home of the SME Server

i-bays/file locking - Samba 2.0.7 vs 2.2.1a ?

Patrick Basile

i-bays/file locking - Samba 2.0.7 vs 2.2.1a ?
« on: October 10, 2001, 11:38:32 PM »
Hello everybody,

My Samba saga continues!  I'm still trying to figure out why my ACT! database (.dbf) slows to a crawl after I upgrade e-smith 4.1.2 to Samba 2.2.1a from the 2.0.7 default.  BTW-I have also tested SME5 with the default Samba 2.0.10 (?) and that also has the same speed problem.

Does anybody know what changes from 2.07 to 2.0.10/2.2.1a might be causing this problem?  Is there a change to the way that i-bays are being handled by Samba?  Changes to the file locking structure?

I know Darrell and some of the other developers are talking about 2.2.1a issues on the developer mailing list, and Charlie and the rest are busy programming/testing for the 2.2.1a blade.  Do you guys have any comments on this?  Have you seen any of this behavior?  Do I need to create a custom fragment or change the settings for the i-bays to handle file locking issues after upgrading to 2.2.1a?

I can give more details here or via email to anyone that needs it to help with this.  Any and ALL help on this would be appreciated, thanks.

Regards,
Patrick

Jaco Bongers

Re: i-bays/file locking - Samba 2.0.7 vs 2.2.1a ?
« Reply #1 on: October 11, 2001, 01:24:46 AM »
Patrick

I had the same problem. A DOS app that would not load as soon as it attemts to connect to a .dbf file. Even from Excel I could not open the file.

I did the following which works:
In the configuration for the shared directory in smb.conf, I added:
   locking = no

Example:
[dos_apps]
   comment = DOS Applications
   path = /home/e-smith/files/ibays/dos_apps/files
   read only = no
   writable = yes
   printable = no
   inherit permissions = yes
   create mode = 0660
   locking = no


But please note the warning in the Samba docs:
Be  careful  about  disabling  locking  either globally or in a specific service, as lack of locking may result in data corruption. You should never need to set this parameter.


This option works for me, BUT I have not tested it in a multi-user environment (will do so tomorrow).

So until I can find a better solution or a problem with this one, I will use this solution :)

Jaco Bongers

Laurence Griffiths

Re: i-bays/file locking - Samba 2.0.7 vs 2.2.1a ?
« Reply #2 on: October 11, 2001, 02:06:19 AM »
Patrick,

Have you tried SME V5 with the default version of Samba? I did and had the same problem.

Have you also tried using a Windows 98 client? I did and the problem went away.

This really seems to be a crazy one.

Jaco, I'll give your suggestion a try later today and see what happens. Obviously, it is only a stop-gap measure. :-)

Regards

Laurence Griffiths

Laurence Griffiths

Re: i-bays/file locking - Samba 2.0.7 vs 2.2.1a ?
« Reply #3 on: October 11, 2001, 04:24:17 AM »
Jaco,

I tried out your suggestion on an SME V5 server running Samba 2.2.1a using a Windows NT4 client. It worked where previously it hadn't. Thanks, although we must take care of shares in that ibay ourselves.... Well at least until Mitel provide a fix anyway.

Thanks

Laurence Griffiths

Laurence Griffiths

Re: i-bays/file locking - Samba 2.0.7 vs 2.2.1a ?
« Reply #4 on: October 11, 2001, 04:26:05 AM »
Sorry! That should have read "We must take care of locks in that ibay ourselves."

Patrick Basile

Re: i-bays/file locking - Samba 2.0.7 vs 2.2.1a ?
« Reply #5 on: October 11, 2001, 05:35:17 AM »
Laurence Griffiths wrote:
> Have you tried SME V5 with the default version of Samba? I
> did and had the same problem.

- Yes, I did try SME V5 with the default Samba (version 2.0.10 I think, instead of the 2.0.7 from ESSG 4.1.2).  I had problems running the database.

> Have you also tried using a Windows 98 client? I did and the
> problem went away.

- No, I haven't tried a 9x client.  I was using NT4 and Win2k clients in my testing.

> This really seems to be a crazy one.

- I agree.

> Jaco, I'll give your suggestion a try later today and see
> what happens. Obviously, it is only a stop-gap measure. :-)

- I'm going to try the 'locking = no' setting as well.  I'll let you know what happens.

Patrick Basile

smb.conf changes? (Re: i-bays/file locking - Samba 2.0.7 vs
« Reply #6 on: October 11, 2001, 07:54:52 AM »
Jaco/Laurence,

How are you adding the 'locking=no' change to the smb.conf file for your i-bay?  Do you have a custom template fragment which modifies the i-bay?

I made the change in the smb.conf file, and then stopped and restarted the Samba services - and my addition was overwritten.  Tips/help/ideas?

Thanks,
Patrick

Laurence Griffiths

Re: smb.conf changes? (Re: i-bays/file locking - Samba 2.0.7
« Reply #7 on: October 11, 2001, 10:17:49 AM »
Patrick,

I made the changes to the "smb.conf" file in the standard Windows manner. - Having made the change, I REBOOTED (Shock! Horror!) the server. I know that as soon as I make any modifications through the Server Manager, my changes to "smb.conf" will be overwritten, but this is just a stop-gap measure anyway.

I'll have to try to make a template fragment and see what happens.

Cheers

Laurence Griffiths

Laurence Griffiths

Re: smb.conf changes? (Re: i-bays/file locking - Samba 2.0.7
« Reply #8 on: October 11, 2001, 11:48:04 AM »
Patrick,

I modified the file "90ibays" in "/etc/e-smith/templates-custom/etc/smb.conf/" and added the line :-
$result .= "   locking = no\n";
directly after the line :-
$result .= "   printable = no\n";

I then expanded the template and rebooted (Yes again!) the server again. Database initialisation speed is now OK again.

There is one downside to this. - "locking = no" now applies to ALL ibays on this server. I had better be careful.

Cheers

Laurence Griffiths

Jaco Bongers

Re: smb.conf changes? (Re: i-bays/file locking - Samba 2.0.7
« Reply #9 on: October 12, 2001, 12:22:53 AM »
Laurence

What I would recommend:

Create a special ibay with a template fragment (say 91myibay) which defines one ibay configured just for apps with .dbf files. That way you can have all the other ibays configured the default way.

The down side is that this special ibay will no longer be configurable from the server manager. But since this is a special case (an exception if you wish) a special template in the custom-templates directory may be the best option.

Jaco BongersLaurence Griffiths wrote:
>
> Patrick,
>
> I modified the file "90ibays" in
> "/etc/e-smith/templates-custom/etc/smb.conf/" and added the
> line :-
> $result .= "   locking = no\n";
> directly after the line :-
> $result .= "   printable = no\n";
>
> I then expanded the template and rebooted (Yes again!) the
> server again. Database initialisation speed is now OK again.
>
> There is one downside to this. - "locking = no" now applies
> to ALL ibays on this server. I had better be careful.
>
> Cheers
>
> Laurence Griffiths

Jaco Bongers

Re: smb.conf changes? (Re: i-bays/file locking - Samba 2.0.7
« Reply #10 on: October 12, 2001, 12:23:17 AM »
Laurence

What I would recommend:

Create a special ibay with a template fragment (say 91myibay) which defines one ibay configured just for apps with .dbf files. That way you can have all the other ibays configured the default way.

The down side is that this special ibay will no longer be configurable from the server manager. But since this is a special case (an exception if you wish) a special template in the custom-templates directory may be the best option.

Jaco Bongers

Laurence Griffiths wrote:
>
> Patrick,
>
> I modified the file "90ibays" in
> "/etc/e-smith/templates-custom/etc/smb.conf/" and added the
> line :-
> $result .= "   locking = no\n";
> directly after the line :-
> $result .= "   printable = no\n";
>
> I then expanded the template and rebooted (Yes again!) the
> server again. Database initialisation speed is now OK again.
>
> There is one downside to this. - "locking = no" now applies
> to ALL ibays on this server. I had better be careful.
>
> Cheers
>
> Laurence Griffiths

Patrick Basile

Re: smb.conf changes? (Re: i-bays/file locking - Samba 2.0.7
« Reply #11 on: October 12, 2001, 01:41:03 AM »
Jaco\Laurence,

Thanks so much for your input and 'fix' for this issue.  I will go ahead and try to create the custom template fragment for the i-bay, but could you be more specific about how I would do that?

Would I take the current 90ibays file and modify that, and then save it as - for example 91efcbay?  Do I need everything that's in the 90ibays file to be in the other file?

Looks like you two have got me close to a fix here...I hope this works.  Thanks again.

Patrick

Laurence Griffiths

Re: smb.conf changes? (Re: i-bays/file locking - Samba 2.0.7
« Reply #12 on: October 12, 2001, 04:11:50 AM »
Patrick,

Judging from Jaco's email address, he is in South Africa which is 2 hours ahead of GMT. - So he is probably snug in bed right now. :-) It is 9:15am here on the east coast of Australia. Jaco obviously knows a lot more about this than I do but, as he will probably not be answering for the next 6 to 8 hours, I'll tell you how I would put Jaco's suggestion into place....

Firstly, read the e-smith instructions for customising the system at http://www.e-smith.org/custom/.

Then copy the file "smb.conf" from "/etc" to "/etc/e-smith/templates-custom/etc/smb.conf/" and rename it to "91efcbay". Edit it and remove everything BUT the bit from [ibayname]  to the next ibay name. Then expand the template and restart the service.

I don't know whether this will work, but it is where I would start.

And to Jaco,

Thanks for all your help. It is greatly appreciated.

Good luck

Laurence Griffiths

Patrick Basile

Re: smb.conf changes? (Re: i-bays/file locking - Samba 2.0.7
« Reply #13 on: October 12, 2001, 09:46:13 PM »
Laurence,

I used your suggestion, and it does indeed create the 'efc' i-bay from the custom template '91efcbay'.  However, when I looked in the smb.conf file (after restarting Samba) there were two efc i-bays - one created 'on the fly' by the efc i-bay I had created in the web manager, and the custom efc i-bay created by 91efcbay.

I figured I'd try to access the ACT! database to see if the 'fix' worked, but I still had speed issues.  So I decided that the web manager efc i-bay maybe needed to be taken out, so I removed it from the web manager.  Now I only have the one efc entry in the smb.conf file created by 91efcbay; BUT, when I try to access it from my Win2k client - I get the following error:  "\bcsrv3\efc is not accessible, The network name cannot be found"  I can see my other i-bays though.  I guess this has to do with the permissions for my 91efcbay setup.  Any ideas how I can get that 'shared'?

Thanks for your help!

Patrick

Laurence Griffiths

Re: smb.conf changes? (Re: i-bays/file locking - Samba 2.0.7
« Reply #14 on: October 13, 2001, 02:05:37 AM »
Ouch! How did you remove the ibay from the web manager? If you did it in the normal way in the server-manager, you will have deleted all directories and files related to that ibay. - That is why you can no longer access it.

Recreate the ibay in the server-manager and copy your database files back on. Then, if nobody can suggest anything better, I suggest that you revert to making a one-line change to the custom template as I did.

Patrick Basile

Re: smb.conf changes? (Re: i-bays/file locking - Samba 2.0.7
« Reply #15 on: October 13, 2001, 02:19:05 AM »
Laurence Griffiths wrote:
>
> Ouch! How did you remove the ibay from the web manager? If
> you did it in the normal way in the server-manager, you will
> have deleted all directories and files related to that ibay.
> - That is why you can no longer access it.

I removed the i-bay in the 'normal' way in the web manager interface, so yeah...I guess I did delete all the content, but this is a test box so it's not a big deal.  What's weird is that when I browse in Network Neighborhood to the server, the 'efc' share (that I created with 91efcbay) shows up, but then I get the access issue when I click on it to 'view' the contents.  Even though there are no files there I shouldn't get that message, it should just show no files - so this appears to be a permissions issue.

> Recreate the ibay in the server-manager and copy your
> database files back on. Then, if nobody can suggest anything
> better, I suggest that you revert to making a one-line change
> to the custom template as I did.

I will do what you suggest, and recreate the i-bay in the web manager.  Could you be more specific (or refresh my memory) on your "one line change to the custom template"...I thought the custom template was what I did earlier?

Thanks for your help.

Patrick

Laurence Griffiths

Re: smb.conf changes? (Re: i-bays/file locking - Samba 2.0.7
« Reply #16 on: October 13, 2001, 03:04:27 AM »
Patrick,

It is just a couple of postings up at :-
http://forums.contribs.org/index.php?topic=11704.msg44012#msg44012

Cheers and good luck

Laurence Griffiths

Jaco Bongers

Re: smb.conf changes? (Re: i-bays/file locking - Samba 2.0.7
« Reply #17 on: October 14, 2001, 05:26:28 PM »
Patrick

You should see the shared name in network neighborhood since Samba has you efc share properly mapped.

The problem is that Samba attempts to connect to the directory /home/e-smith/files/ibays/efc/files which no longer exists.

The easiest solution would be:
1. Use your custom template 91efcbay
2. Manually create the directory /home/e-smith/files/ibays/efc/files and set the correct permissions on the directory.

Do not create the ibay using server-manager as you will then get 2 network shares to the same directory.

Let me know if you still have a problem

Jaco


Patrick Basile wrote:
>
> I removed the i-bay in the 'normal' way in the web manager
> interface, so yeah...I guess I did delete all the content,
> but this is a test box so it's not a big deal.  What's weird
> is that when I browse in Network Neighborhood to the server,
> the 'efc' share (that I created with 91efcbay) shows up, but
> then I get the access issue when I click on it to 'view' the
> contents.  Even though there are no files there I shouldn't
> get that message, it should just show no files - so this
> appears to be a permissions issue.

Patrick Basile

Re: smb.conf changes? (Re: i-bays/file locking - Samba 2.0.7
« Reply #18 on: October 15, 2001, 06:14:30 PM »
Hi Jaco,

Thanks for your help.

Jaco Bongers wrote:
> The easiest solution would be:
> 1. Use your custom template 91efcbay
> 2. Manually create the directory
> /home/e-smith/files/ibays/efc/files and set the correct
> permissions on the directory.

- Could you help with the 'set the correct permissions'?  Example commands to do this?  I can create the directory, but I'm a newbie - so setting the permissions when I don't have a GUI is foreign to me. (lol, sorry)

>
> Do not create the ibay using server-manager as you will then
> get 2 network shares to the same directory.

 - That's what I thought, thanks.

Regards,
Patrick