[Samba] Repacking database from v1 to v2 / Samba failed to prime database, error code 22

Andrew Bartlett abartlet at samba.org
Mon Oct 3 19:55:28 UTC 2022

On Mon, 2022-10-03 at 15:23 +0100, Rowland Penny via samba wrote:
> On 03/10/2022 13:26, Arnaud FLORENT via samba wrote:
> > Hi,
> > 
> > i have an issue direct with in place upgrade from samba 4.3 to
> > 4.13 
> > running single AD DC on ubuntu based installation
> I think you may live to regret doing that :-(
> > samba failed to start after upgrade with this log
> We have a bug that may be relevant:
> https://bugzilla.samba.org/show_bug.cgi?id=15189

This is actually the reverse, this is hope :-)

If the server is still working on Samba 4.3 after the failed upgrade
attempt, this is a way forward to upgrade over DRS instead.

Arnaud, I would be very interested if you could attempt to instead
upgrade using a replication based approach, and if that fails, to try
the patch at:

It would be very valuable to me to get real-world feedback.

To test in a 'no changes' approach, you can attempt replication without
changing the domain by running 'samba-tool drs clone-dc-database --
server $SERVER --targetdir=$SOMEWHERE_SECURE -Uadministrator'

We can also look into why the in-place upgrade fails.  

Running 'samba-tool dbcheck --reindex' using the modern version should
allow the error to be seen in a more controlled circumstance, and allow
raising the debug level etc.

It is a large version jump, but we actually do keep old databases
around in our selftest to test this, but it is hard to trigger the
variability of the real-world. 

I do wish you all the best getting to a modern Samba version.

Andrew Bartlett

Andrew Bartlett (he/him)       https://samba.org/~abartlet/
Samba Team Member (since 2001) https://samba.org
Samba Team Lead, Catalyst IT   https://catalyst.net.nz/services/samba

Samba Development and Support, Catalyst IT - Expert Open Source

More information about the samba mailing list