Обсуждение: BUG #12856: No space left on device, but there is space!

Поиск
Список
Период
Сортировка

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

От
agroszer@gmail.com
Дата:
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

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

От
Skylar Thompson
Дата:
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

--
-- Skylar Thompson (skylar2@u.washington.edu)
-- Genome Sciences Department, System Administrator
-- Foege Building S046, (206)-685-7354
-- University of Washington School of Medicine

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

От
John R Pierce
Дата:
On 3/12/2015 3:43 AM, agroszer@gmail.com wrote:
> Weird is that 'df' shows over 60G free space on the mount and the tests
> definitely won't use that much space.

how large is the total file system, and does it have 'reserved space'
?   if its a multi-terabyte file system, 60GB reserved wouldn't be out
of the question (thats 2% of 3TB)



--
john r pierce                                      37N 122W
somewhere on the middle of the left coast

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

От
Adam GROSZER
Дата:
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