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

1

6

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
Dotdotage answered 25/1, 2013 at 10:54 Comment(6)
weelll... is your filesystem full as the error states? ( df -k ). Mostly '/' should be interestingBixler
yes. this is the output : Filesystem Size Used Avail Use% Mounted on /dev/vda 9.9G 9.5G 0 100% / tmpfs 2.0G 88K 2.0G 1% /dev/shmDotdotage
Your disk has 0 bytes free, so you can't write to it. The difference between 9.9G and 9.5G is because of system reserved space.Deprave
This is not postgresul problem. You have no disk space available. Things will shortly become very hard for the OS. You need to remove files somewhere or add some other extra space. Then you will have to reboot and prey that nothing wat hurted too bad.Connect
The only solution is to free disk space (or add a new disk)Mockery
Thank u all for your vauable suggestion. I just free up some disk space. Now the problem is solved :)Dotdotage
W
10

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.

Wimple answered 25/1, 2013 at 13:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.