Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to resolve `FATAL: could not write lock file "postmaster.pid": No space left on device` error? [closed]

I have installed postgres 8.4.9 database in my fedora core 14 and deployed an application. It was working fine until today before I tried to restart the system. Now I am unable to start the pgsql. When I am trying to start I am getting the following error

FATAL: could not write lock file "postmaster.pid": No space left on device

I googled but was not able to find the solution for this issue.

Could someone please help in solving this issue?

This is the output of df -kh command:

Filesystem            Size  Used Avail Use% Mounted on
/dev/vda              9.9G  9.5G     0 100% /
tmpfs                 2.0G   88K  2.0G   1% /dev/shm
like image 907
udi Avatar asked Feb 17 '23 18:02

udi


1 Answers

This is not really a programming question so it should be on superuser.

Short answer -

reboot the system.

If the system comes back up, try:

find / -mtime -3 -size +100000 -exec ls -ls {} \; | sort -n

The largest newest files will be at the bottom of the list. If you can see that the file is not part of an app- a data file for example- remove it. You need at least 5% free space on /.

Long term you must add more disk space, like double or triple what you have.

like image 116
jim mcnamara Avatar answered Feb 20 '23 14:02

jim mcnamara