ENOSPC returned when trying to expand a TDB file because it runs into the next VM segment and has a large dead record

Richard Sharpe realrichardsharpe at gmail.com
Mon Mar 3 11:35:10 MST 2014


Hi folks,

We are running into tdb problems where tdb_expand_file is getting
ENOSPC when trying to expand the file. The error is actually happening
during the pwrite.

When we look at the file, however, we find that it does not occupy
much space on disk:

[some-node]# du -s /usr/local/var/locks/locking.tdb
429251  /usr/local/var/locks/locking.tdb
[some-node]# ls -al /usr/local/var/locks/locking.tdb
-rw-r--r--  1 root  wheel  2193346560 Mar  3 12:29
/usr/local/var/locks/locking.tdb

and we find a huge dead record:

Size of file/data: 2193346560/1391
Number of records: 5
Smallest/average/largest keys: 24/24/24
Smallest/average/largest data: 236/254/265
Smallest/average/largest padding: 72/78/93
Number of dead records: 1217
Smallest/average/largest dead records: 324/1802189/2192818152
Number of free records: 42
Smallest/average/largest free records: 16/218/412
Number of hash chains: 10007
Smallest/average/largest hash chains: 0/0/2
Number of uncoalesced records: 37
Smallest/average/largest uncoalesced runs: 2/7/14
Percentage keys/data/padding/free/dead/rechdrs&tailers/hashes: 0/0/0/0/100/0/0

Any suggestions on how to handle this? Why has that dead record not
been released?

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)


More information about the samba-technical mailing list