Re: BUG #12856: No space left on device, but there is space! - Mailing list pgsql-bugs

From Adam GROSZER
Subject Re: BUG #12856: No space left on device, but there is space!
Date
Msg-id 5502A062.5080808@gmail.com
Whole thread Raw
In response to Re: BUG #12856: No space left on device, but there is space!  (Skylar Thompson <skylar2@u.washington.edu>)
List 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@gmail.com wrote:
>> The following bug has been logged on the website:
>>
>> Bug reference:      12856
>> Logged by:          Adam Groszer
>> Email address:      agroszer@gmail.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@postgresql.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

pgsql-bugs by date:

Previous
From: maxim.boguk@postgresql-consulting.com
Date:
Subject: BUG #12862: Bug in intarray extension operators (using generic selectivity estimators instead of array oriented)
Next
From: jan.mate@inf-it.com
Date:
Subject: BUG #12872: Inconsistent processing of interval values