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

2013-09-30 Thread Andrew Bartlett
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 Bartletthttp://samba.org/~abartlet/
Authentication Developer, Samba Team   http://samba.org


-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


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

2013-09-30 Thread Marc Muehlfeld

Hello Andrew,

Am 30.09.2013 21:55, schrieb Andrew Bartlett:

*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



Thanks for that good explanation. This clarifies my questions.


Regards,
Marc
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


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

2013-09-28 Thread Marc Muehlfeld

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
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba