[Samba] Repacking database from v1 to v2 format: how long does it take?

Andrew Bartlett abartlet at samba.org
Mon Sep 23 18:41:27 UTC 2019

On Mon, 2019-09-23 at 11:25 +0200, Francesco Malvezzi via samba wrote:
> hi all,
> I updated a small domain with 8k object to samba-4.11.0 and the
> database
> conversion from v1 to v2 didn't take a noticeable time.
> On the other hand, in a larger domain with 67k object, where the
> sudo ./bin/samba-tool dbcheck --cross-ncs --fix
> takes ~40 minutes, 2 hours and half were not enough to complete the
> conversion.
> Is it a couple of hours something expected if dbcheck takes so much
> time?
> Is it maybe my AD db to be pathologic?

Ouch!  We did not see such long runtimes during our testing, which is
why no major warnings were made.  Are you on TDB or LMDB?  Does the
host have enough RAM?

At your scale I would suggest say 10G, being 4GB for the main TDB, 4GB
for the transaction copy for the repack, and extra.

It was expected to be a couple of minutes at most, most likely much


Andrew Bartlett
Andrew Bartlett                       https://samba.org/~abartlet/
Authentication Developer, Samba Team  https://samba.org
Samba Developer, Catalyst IT          

More information about the samba mailing list