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

Volker Lendecke Volker.Lendecke at SerNet.DE
Mon Mar 3 12:20:16 MST 2014

On Mon, Mar 03, 2014 at 11:13:47AM -0800, Richard Sharpe wrote:
> Hmmm, the problem might be that we issued an ftruncate first, which
> expanded the file size to the approx 2GB, and then we tried filling it
> in.
> I wonder why we tried to expand it that much.

Number of free records: 42
Smallest/average/largest free records: 16/218/412

My guess would be that this accumulated not in just one
attempt. We need more than 412 bytes (not unreasonable at
all in locking.tdb), so we try to expand the file. We do the
ftruncate and try to allocate but fail. Then we do it
another time, not noticing that we have dead space that last
time we failed to allocate. If this happens with high
frequency I could imagine this to create such a large file.

Just a guess though, I would have to artificially try to
reproduce this.


SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de

More information about the samba-technical mailing list