[Samba] samba-tool domain backup offline stalls
James B. Byrne
byrnejb at harte-lyne.ca
Fri Jul 24 16:15:37 UTC 2020
On Thu, July 23, 2020 17:02, Andrew Bartlett wrote:
>
>>
>> root 36800 0.8 0.0 12556 2788 1 SJ 16:49 0:00.01
>> /usr/local/bin/tdbbackup -s .copy.tdb
>> /var/db/samba4/private/secrets.ldb
>
> And, using whatever FreeBSD replaces lslocks with, is blocking that?
I am not aware of what information lslocks provides. However, the following
may be useful:
File "/usr/local/lib/python3.7/site-packages/samba/netcmd/domain_backup.py",
line 924, in offline_tdb_copy
tdb.open(path)
A transaction is still active in ldb context [0x800a9c6a0] on
/var/db/samba4/private/secrets.ldb
[root at smb4-2 ~ (master)]# lsof -p 57982
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
tdbbackup 57982 root cwd VDIR 1879478894,3590381084 63 14
/zroot/iocage/jails/smb4-2/root -- root
. . .
tdbbackup 57982 root 3u VREG 1879478894,3590381084 1286144 256159
/zroot/iocage/jails/smb4-2/root -- var/db/samba4/private/secrets.ldb
tdbbackup 57982 root 4u VREG 1879478894,3590381084 40172 200076
/zroot/iocage/jails/smb4-2/root (zroot/iocage/jails/smb4-2/root)
The u after the file number (3u) indicates that the file is locked for update.
fstat provides this
[root at smb4-2 ~ (master)]# fstat -p 57982
USER CMD PID FD MOUNT INUM MODE SZ|DV R/W
root tdbbackup 57982 text / 205969 -rwxr-xr-x 19472 r
root tdbbackup 57982 ctty [restricted] 755 crw--w---- pts/5 rw
root tdbbackup 57982 wd / 14 drwxr-xr-x 63 r
root tdbbackup 57982 root / 4 drwxr-xr-x 22 r
root tdbbackup 57982 jail / 4 drwxr-xr-x 22 r
root tdbbackup 57982 0 [restricted] 755 crw--w---- pts/5 rw
root tdbbackup 57982 1 [restricted] 755 crw--w---- pts/5 rw
root tdbbackup 57982 2 [restricted] 755 crw--w---- pts/5 rw
root tdbbackup 57982 3 / 256159 -rw------- 1286144 rw
root tdbbackup 57982 4 / 200076 -rw------- 40172 rw
>
> Does this still fail with Samba stopped?
>
Yes. Online and offline backups both fail. Offline gives no indication of
what it is waiting on and neither does tdbbackup. Online fails trying to
attach to nbt ports.
Under separate cover I have sent you the output from dtruss run with both the
locked and unlocked runs of tdbbackup. The unlocked run completes. The locked
run hangs.
--
*** e-Mail is NOT a SECURE channel ***
Do NOT transmit sensitive data via e-Mail
Unencrypted messages have no legal claim to privacy
Do NOT open attachments nor follow links sent by e-Mail
James B. Byrne mailto:ByrneJB at Harte-Lyne.ca
Harte & Lyne Limited http://www.harte-lyne.ca
9 Brockley Drive vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada L8E 3C3
More information about the samba
mailing list