Linux ubuntu“设备上没有剩余空间”但有大量空间

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18706398/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-07 00:47:30  来源:igfitidea点击:

ubuntu "No space left on device" but there is tons of space

linuxubuntu

提问by Or Gal

I am getting the "No space left on device" error for pretty much anything i try to do. Even using tab to autocomplete a command!

对于我尝试做的几乎任何事情,我都收到“设备上没有剩余空间”错误。甚至使用 tab 来自动完成命令!

but when i do df -h i get:

但是当我执行 df -hi 时得到:

ubuntu@ip-10-0-2-108:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1       99G  6.5G   88G   7% /
udev            3.7G  8.0K  3.7G   1% /dev
tmpfs           1.5G  184K  1.5G   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            3.7G     0  3.7G   0% /run/shm
none            100M     0  100M   0% /run/user
/dev/xvdb       414G  199M  393G   1% /mnt
overflow        1.0M  1.0M     0 100% /tmp

which to me looks like there is tons of space. df -i also looks similar:

对我来说,这看起来有很多空间。df -i 看起来也很相似:

ubuntu@ip-10-0-2-108:~$ df -i
Filesystem       Inodes IUsed    IFree IUse% Mounted on
/dev/xvda1      6553600 94227  6459373    2% /
udev             951353   393   950960    1% /dev
tmpfs            953649   274   953375    1% /run
none             953649     3   953646    1% /run/lock
none             953649     1   953648    1% /run/shm
none             953649     1   953648    1% /run/user
/dev/xvdb      27525120    11 27525109    1% /mnt
overflow         953649    12   953637    1% /tmp

I am on an Amazon EC2 ubuntu 12.04 instance.

我在 Amazon EC2 ubuntu 12.04 实例上。

Here are some examples of the error popping up:

以下是一些弹出错误的示例:

ubuntu@ip-10-0-2-108:~$ sudo crontab -e
/tmp/crontab.RvYjrR/crontab: No space left on device

ubuntu@ip-10-0-2-108:~$ ls /va (hit tab for autocomplete)

-bash: cannot create temp file for here-document: No space left on device
-bash: cannot create temp file for here-document: No space left on device

however the server seems to be running and everything seems to be working. what on earth is going on??

但是服务器似乎正在运行,并且一切似乎都在运行。这到底是怎么回事??

采纳答案by Jon Lin

It's possible that you've run out of memory or some space elsewhere and it prompted the system to mount an overflow filesystem, and for whatever reason, it's not going away.

您可能已经用完了内存或其他地方的一些空间,它提示系统挂载溢出的文件系统,无论出于何种原因,它都不会消失。

Try unmounting the overflow partition:

尝试卸载溢出分区:

umount /tmp

or

或者

umount overflow