简体   繁体   English

设备上没有剩余空间 - Ubuntu 问题

[英]No space left on device- Ubuntu Issues

I am getting this error " OSError: [Errno 28] No space left on device " when I am writing files in a directory.当我在目录中写入文件时,我收到此错误“ OSError: [Errno 28] No space left on device ”。 I am downloading images programmatically from different sources and creating directories according to day wise.我正在以编程方式从不同来源下载图像,并根据日常情况创建目录。 Its working well on windows though.不过,它在 Windows 上运行良好。

While checking inodes I got this在检查inode 时,我得到了这个

在此处输入图片说明

I tried different solution like deleting the deleting the junk file and tmp folder but still no success.我尝试了不同的解决方案,例如删除垃圾文件和 tmp 文件夹,但仍然没有成功。

What could be the issue?可能是什么问题?

inodes don't directly correlate with disk usage. inode 与磁盘使用率没有直接关系。 Better use df -h to actually see, if your drive is full.如果您的驱动器已满,最好使用df -h来实际查看。

But as you get the error: Yep, it's full.但是当您收到错误时:是的,它已满。 Up to the brim.直到边缘。

You probably have some data some where that uses all that precious storage.您可能有一些使用所有宝贵存储空间的数据。 Check your home directory with du -hs * | sort -h使用du -hs * | sort -h检查您的主目录du -hs * | sort -h . du -hs * | sort -h This can take a moment, but it will show you the size of all files and directories in the current workdir (and sort it too).这可能需要一些时间,但它会显示当前工作目录中所有文件和目录的大小(并对其进行排序)。

Also directories to check would be /opt , /var and /tmp .还要检查的目录是/opt/var/tmp Don't randomly delete stuff in /var though, if you don't know what you are doing.如果您不知道自己在做什么,请不要随意删除/var内容。

I've listed /tmp here too, because you don't have listed it as a mount of the type tmpfs .我也在这里列出了/tmp ,因为您没有将它列为tmpfs类型的挂载。 You should fix that probably.你应该解决这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM