[Samba] Understanding the difference of lock/state/cache directory

Andrew Bartlett abartlet at samba.org
Mon Sep 30 13:55:37 MDT 2013


On Sun, 2013-09-29 at 01:07 +0200, Marc Muehlfeld wrote:
> Hello,
> 
> in Samba 3 I had all TDBs on one place configured through "lock 
> directory". Now I saw that Samba 4 split the location of the database 
> files into lock/state/cache directory.
> 
> 
> *Question 1*: The manpage says "state directory" is for persistent and 
> "cache directory" for non-persistent data. Ok. That's clear. But what is 
> stored in the "lock directory" and what is the reason why its content 
> isn't placed in one of the other two directories?

locks are for things that can (and should) go away at shutdown.  cache
is for things that are handy to have, but can be re-generated without
major cost (which makes it fiddly, as you then get to your next
question)

> *Question 2*: Why is the "winbindd_cache.tdb" stored in the state 
> directory? Isn't it just a cache file?

The issue is that if this is treated as cache, and destroyed, then
offline logins fail after a reboot on a system that chooses to purge
such cache files.  I think there may also be some other persistent data
in there as well (others I hope will clarify). 

At least that is how I understand the issue.  See also the FHS:
http://www.pathname.com/fhs/pub/fhs-2.3.html#PURPOSE33

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org




More information about the samba mailing list