Re: BUG #12856: No space left on device, but there is space!

From: Adam GROSZER <agroszer(at)gmail(dot)com>
To: Skylar Thompson <skylar2(at)u(dot)washington(dot)edu>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #12856: No space left on device, but there is space!
Date: 2015-03-13 08:31:30
Message-ID: 5502A062.5080808@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

Thanks for the pointers, sorry for the noise.

Turns out I have btrfs and it's not a good idea to run a DB with COW
enabled.

FTR:

before:

$ sudo btrfs filesystem df /cuccos
Data, single: total=163.61GiB, used=97.18GiB
System, DUP: total=8.00MiB, used=24.00KiB
System, single: total=4.00MiB, used=0.00
Metadata, DUP: total=2.00GiB, used=1.48GiB
Metadata, single: total=8.00MiB, used=0.00

issued:

$ sudo btrfs fi balance /cuccos

after:

$ sudo btrfs fi df /cuccos
Data, single: total=98.00GiB, used=97.11GiB
System, DUP: total=32.00MiB, used=20.00KiB
Metadata, DUP: total=2.30GiB, used=1.46GiB

It's a good idea to turn of COW for the folder where the DBs get stored,
see:

https://wiki.archlinux.org/index.php/Btrfs#Copy-On-Write_.28CoW.29

On 03/12/2015 03:32 PM, Skylar Thompson wrote:
> Hi Adam,
>
> You might check whether you've exhausted the inodes on that filesystem with
> "df -i". That will also return ENOSPC.
>
> On Thu, Mar 12, 2015 at 10:43:09AM +0000, agroszer(at)gmail(dot)com wrote:
>> The following bug has been logged on the website:
>>
>> Bug reference: 12856
>> Logged by: Adam Groszer
>> Email address: agroszer(at)gmail(dot)com
>> PostgreSQL version: 9.4.1
>> Operating system: ubuntu 14.04
>> Description:
>>
>> After our tests create a lot of DBs, around 50-100, I get this exception:
>>
>> psycopg2.OperationalError: could not create file "base/24468164/24468205":
>> No space left on device
>>
>> Weird is that 'df' shows over 60G free space on the mount and the tests
>> definitely won't use that much space.
>>
>> After removing most of the DBs everything is back to normal, till DBs start
>> to pile up again.
>>
>> What to check to help debugging this?
>>
>> thanks,
>> Adam
>>
>>
>> --
>> Sent via pgsql-bugs mailing list (pgsql-bugs(at)postgresql(dot)org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-bugs
>

--
Best regards,
Adam GROSZER
--
Quote of the day:
Character is much easier kept than recovered.
- Thomas Paine

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message maxim.boguk 2015-03-13 14:54:56 BUG #12862: Bug in intarray extension operators (using generic selectivity estimators instead of array oriented)
Previous Message Michael Paquier 2015-03-12 23:32:28 Re: pg_upgrade failure on Windows Server