Shared Directory parameter for some tdb files

Michael Adam obnox at samba.org
Thu Jan 8 13:09:38 GMT 2009


Steven Danneman wrote:
> > Sent: Wednesday, January 07, 2009 3:10 PM
> > 
> > The current directory configuration doesn't allow for this level of
> > granularity in deciding where statefull tdb files live.  Currently all
> > such files must live in the same directory LOCKDIR.
> > 
> > The attached patch adds a new directory configuration, STATESHAREDDIR,
> > which specifies a directory on shared storage for the first set of
> > files.  By default this directory is left blank, but when configured
> > either through --with-stateshareddir, or "state shared dir" smb.conf
> > parameter certain persistent files are then stored in that shared
> > directory.
> 
> It now occurs to me that the distinction which I'm really making is
> between persistent TDB files and temporary TDB files.  And via the FHS
> support, this distinction has already been made using the STATEDIR and
> CACHEDIR parameters.
> 
> For now you can disregard the previous patch and RFC as I investigate if
> the FHS implementation will fulfill my need.

The FHS mode presents many problems IMO. For the implementation,
see get_dyn_STATEDIR() and get_dyn_CACHEDIR() in dynconfig.c .

In non-fhs-mode these returns lp_lockdir(), while in
FHS-mode these are fixed to STATEDIR and CACHEDIR, respectively.

It also seems that the introduction of cachedir and statedir
has not been carried through completely: STATEDIR is used in
lib/util.c:state_path(), which is used in some places where
originally lock_path() had been used. But CACHEDIR is not used
at all.

One problem here is that these statedir and cachedir options
are only virtual config options, and not integrated into
loadparm like the other options. I would like to have a proper
splitting into three fully configurable options lockdir statedir
and cachedir (say), that should be used consistently throughout.

I think this needs proper fixing, but this needs to be done very
carefully in order not to break existing installations.

If you come up with thoughts about this matter, I will gladly
collaborate on this, since it is a real pain in the neck.  :-)

Cheers - Michael

-- 
Michael Adam <ma at sernet.de>  <obnox at samba.org>
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.SerNet.DE, mailto: Info @ SerNet.DE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 206 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20090108/0a333c57/attachment.bin


More information about the samba-technical mailing list