postgresql 如何解决`致命:无法写入锁定文件“postmaster.pid”:设备上没有剩余空间`错误?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14520332/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to resolve `FATAL: could not write lock file "postmaster.pid": No space left on device` error?
提问by udi
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
我已经在我的 fedora core 14 中安装了 postgres 8.4.9 数据库并部署了一个应用程序。直到今天我尝试重新启动系统之前它都运行良好。现在我无法启动 pgsql。当我尝试开始时,出现以下错误
FATAL: could not write lock file "postmaster.pid": No space left on device
致命:无法写入锁定文件“postmaster.pid”:设备上没有剩余空间
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:
这是 df -kh 命令的输出:
Filesystem Size Used Avail Use% Mounted on
/dev/vda 9.9G 9.5G 0 100% /
tmpfs 2.0G 88K 2.0G 1% /dev/shm
回答by jim mcnamara
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 /.
最大的最新文件将位于列表底部。如果您可以看到该文件不是应用程序的一部分 - 例如数据文件 - 将其删除。/ 上至少需要 5% 的可用空间。
Long term you must add more disk space, like double or triple what you have.
从长远来看,您必须添加更多磁盘空间,例如您拥有的磁盘空间的两倍或三倍。