Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Samba] tdb_rec_read bad magic

638 views
Skip to first unread message

Michał Półrolniczak

unread,
Jul 22, 2014, 7:36:27 AM7/22/14
to
using samba 4.1.4

syslog have alot of those in log:

[2014/07/22 13:24:12.22351, 0]
../lib/ldb-samba/ldb_wrap.c:71(ldb_wrap_debug)
ldb: ltdb:
tdb(/usr/local/samba/private/sam.ldb.d/DC=DOMAINDNSZONES,DC=MYDOMAIN,DC=LOCAL.ldb):
tdb_rec_read bad magic 0x0 at offset=516897176

Anything I can do to fix it?
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba

mourik jan heupink - merit

unread,
Jul 22, 2014, 10:05:14 AM7/22/14
to
Hi Michał,

We were having that too on our dc1. See a thread "samba4 replication
issues | sam.ldb inconsistency" that took place here, during the last
weeks. It was not a very nice experience.

However, we had two dc's, and our second dc was still healthy. I was
able to add a third DC (dc3).

I think I wrote on list what I did. Our dc1 never recovered.

I hope you have multiple dc's as well?

MJ

Michał Półrolniczak

unread,
Jul 22, 2014, 11:03:16 AM7/22/14
to
Sadly I dont have multi setup.

Is there a way to take some /private/ files and put it on new DC so i would have to reconfigure windows end stations?

mourik jan heupink - merit

unread,
Jul 22, 2014, 11:06:09 AM7/22/14
to
Hi Michał,

Sorry, I have no idea. I tried to repair my
DC=DOMAINDNSZONES,DC=MYDOMAIN,DC=LOCAL.ldb but for me that never worked.

I am also not sure how it became corrupted in the first place.

It grows terribly big, that's probably a mitigating factor. In the list,
there is a thread on how to reduce it's size. I have yet to follow those
instructions, so mine is also still very big.

I tried to repair my DC=DOMAINDNSZONES,DC=MYDOMAIN,DC=LOCAL.ldb using
tdbdump and tdbackup, but I never succeeded.

I'm sorry I cannot provide you with more assistance. Hopefully someone
else has some good tips for you.

MJ

Michał Półrolniczak

unread,
Jul 23, 2014, 2:39:03 AM7/23/14
to
Sadly those fix didn't helped me.
I will end up with creating new domain, but I would like to transfer old
users with old SIDs to new domain.
Probably ain't that easy.

Michał Półrolniczak

unread,
Jul 24, 2014, 11:53:36 AM7/24/14
to
I think I know what happed to corrupt dns.
Im thinking that sysadmin did copy samba/dns/private when samba was running.
And when something broken restore to that version.

I know that at Backup wiki there is a info about not doing backup of
running samba, but mayby adding "why" not to do that would open some eyes.

Thanks

Andrew Bartlett

unread,
Jul 29, 2014, 4:07:56 PM7/29/14
to
On Thu, 2014-07-24 at 17:53 +0200, Michał Półrolniczak wrote:
> I think I know what happed to corrupt dns.
> Im thinking that sysadmin did copy samba/dns/private when samba was running.
> And when something broken restore to that version.
>
> I know that at Backup wiki there is a info about not doing backup of
> running samba, but mayby adding "why" not to do that would open some eyes.

The only way to get some of your data out of such a corrupt database
would be to use the 'ldbdump' tool, which is a low-level tool that will
walk the database looking for possibly valid records.

I wrote this with the help of 'Rusty' when dealing with a corrupt
database at another site.

The other option would be to try and re-create these databases. Being
'just' DNS, you might be able to make that work, particularly if you
were to create a BIND9_FLATFILE based zone, and then use
samba_upgradedns to re-import it. Not trivial, and a fair bit of work,
but you should be able to save the rest of your database.

Andrew Bartlett

--
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Catalyst IT http://catalyst.net.nz/services/samba

0 new messages