Operating System - HP-UX
1834935 Members
2345 Online
110071 Solutions
New Discussion

Re: Samba locking database errors

 
SOLVED
Go to solution
Ian Foster_2
Frequent Advisor

Samba locking database errors

We are in the process of commissioning a new HP server (on HP-UX 11i) and have installed Samba which we have configured and used extensively before without major problems (though not this version - 2.2.8.a). Samba ran OK initially, but now we are getting failures with messages of 'smbd[pid] Cannot initialize locking database' and 'no locks available' logged to the syslog and no new connections can be established (can not even browse - get message 'Network name could not be found'). This can only be cleared by restarting the daemons.

I have checked our smb.conf file with the testparm utility and this looks ok, and checked the parameters (including the defaults) against the smb.conf man page at samba.org in an attempt to identify any bad config. I have also verified the obvious - that the lock directory exists and the permissions are correct (if they didn't I guess it would fall over straight away).

I have attached a dump of our global definitions for inspection.

Has anybody any ideas what may be causing this ? I have checked the Samba web pages without success.

Is there a bad locking option here - or some other samba / kernel threshold we are hitting ?
If I can't resolve this the filestore is going to NT !

Any help very gratefully recieved.
5 REPLIES 5
RAC_1
Honored Contributor
Solution

Re: Samba locking database errors

Post the following.

kmtune -lq nflocks

This no. of file locks kernel parameter.

If it is too low, you will have to increase it.
There is no substitute to HARDWORK
Ian Foster_2
Frequent Advisor

Re: Samba locking database errors

# kmtune -lq nflocks
Parameter: nflocks
Current: 200
Planned: 200
Default: 200
Hmmm - not too high. I guess if there are other file locks on the system in addition to those instigated by Samba this will come to a grinding halt pretty quickly ? ?

Is there a way to check the current number of system wide file locks ?

I must admit I trusted that the kernel had been tuned to at least match the system we are decommissioning.
RAC_1
Honored Contributor

Re: Samba locking database errors

You will have to tune this.

Increase it to 15000. I think this dynamic parameter, so you wont require a reboot.

There is no substitute to HARDWORK
Geoff Wild
Honored Contributor

Re: Samba locking database errors

I've had issue with keepalive before - try setting to 0 instead of default 300.

keepalive (G)
The value of the parameter (an integer) represents the number of seconds between keepalive packets. If this parameter is zero, no keepalive packets will be sent. Keepalive packets, if sent, allow the server to tell whether a client is still present and responding.

Keepalives should, in general, not be needed if the socket being used has the SO_KEEPALIVE attribute set on it (see socket options). Basically you should only use this option if you strike difficulties.

As others have said, I would increase nflocks....mine is at 1200 - but I also run Oracle....

Also, did you compile Samba yourself or did you use the HP Depot?

I'm using 2.28a without any issues at all.



Rgds...Geoff


Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Ian Foster_2
Frequent Advisor

Re: Samba locking database errors

Thanks for the responses guys.

I am 95% confident the problem is down to nflocks. We are running an Oracle DB on this system too, believe it or not !

I'm just waiting for an outage to change the parameter.

It is not dynamically configurable according to the output from kmtune.

Thanks again.