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 12:24:19 MST 2014


On Mon, Mar 3, 2014 at 11:20 AM, Volker Lendecke
<Volker.Lendecke at sernet.de> wrote:
> 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.

OK, this makes sense. We might have a large number of users all
opening files ...

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


More information about the samba-technical mailing list