[Samba] 32 bits limit?

mathias dufresne infractory at gmail.com
Mon Jun 8 05:48:00 MDT 2015

Hi all,

I tried tdbdump / tdbrestore and it saved some space but not solved the
main issue which is 4GB is not large enough for a large organization.
I had a look on LMDB which sounds really good, unfortunately the module is
not finished, not enough at least to use it on a large AD in production
(large as 120k users + 150k computers + thousands of groups which are not
yet defined). As you know the larger is the company the colder they are
regarding not fully stable products.

This leads my to one question: is it possible to split the LDB database?
What I meant is if I create an OU named "persons" to host all users, is it
possible move this OU and its contents into another LDB file?

Best regards,


2015-06-01 22:38 GMT+02:00 mathias dufresne <infractory at gmail.com>:

> Thank you all for these detailed answers. This size happened on DC where
> the import were done. Database with Samba 4 was always significantly bigger
> on this host than on the replicated ones. According to that I'll try the
> dump trick which would also teach me some things : )
> I'll came back after tests...
> For LMDB the start seems to be there:
> https://jhrozek.fedorapeople.org/sambaxp
> I'll read and try if I can (ie if I'm not too thick :p)
> Cheers,
> mathias
> 2015-06-01 22:06 GMT+02:00 Matthieu Patou <mat at samba.org>:
>> On 06/01/2015 05:09 AM, mathias dufresne wrote:
>>> Hi all,
>>> Still playing with a big database (120k users, 150k computers) I tried to
>>> split my users into a lot of OUs. This increased the database size and I
>>> was not able to finish to add users into the DB because database file has
>>> reached 4GB size which seems to be the limit.
>>> First: am I right to say file
>>> /var/lib/samba/private/sam.ldb.d/DC=example,DC=com.ldb has a maximum size
>>> of 4GB?
>> You are right.
>>> Secondly: if I'm right about the size limit, why this size limit?
>> TDB is still using 32bits structures, we had a project called NTDB that
>> was copping with this issue and other issues we had in TDB as we found
>> other way to solve the TDB issues (but the size) we have dropped the work
>> on NTDB as there was some issues on how to manage the migration.
>> In order to compact your database you might want to dump it to a file:
>> tdbdump <file.ldb> > dump_sam.ldb and then restore it to a *new* ldb and
>> see if it improves the size.
>> You should also check if you have any deleted object by doing a ldbsearch
>> with isDeleted=*, and purge all the deleted objects (but the deleted object
>> container).
>> --
>> Matthieu Patou
>> 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

More information about the samba-technical mailing list