Marc Muehlfeld
2013-Sep-28 23:07 UTC
[Samba] Understanding the difference of lock/state/cache directory
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?
*Question 2*: Why is the "winbindd_cache.tdb" stored in the state
directory? Isn't it just a cache file?
Regards,
Marc
This is the content of the three directories after a fresh 4.0.9 member
server installation:
lock directory:
=================smbXsrv_tcon_global.tdb
smbXsrv_version_global.tdb
serverid.tdb
smb_krb5/krb5.conf.SAMDOM
dbwrap_watchers.tdb
notify_index.tdb
brlock.tdb
smbXsrv_open_global.tdb
gencache.tdb
smbXsrv_session_global.tdb
messages.tdb
printer_list.tdb
mutex.tdb
locking.tdb
notify.tdb
gencache_notrans.tdb
state directory:
==================group_mapping.tdb
share_info.tdb
account_policy.tdb
winbindd_cache.tdb
winbindd_idmap.tdb
registry.tdb
cache directory:
==================browse.dat
printing/{...printername1...}.tdb
printing/{...printername2...}.tdb
printing/{...printernameN...}.tdb
printing/printers.tdb
netsamlogon_cache.tdb
Andrew Bartlett
2013-Sep-30 19:55 UTC
[Samba] Understanding the difference of lock/state/cache directory
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