惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
News and Events Feed by Topic
WordPress大学
WordPress大学
Vercel News
Vercel News
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
小众软件
小众软件
L
LangChain Blog
雷峰网
雷峰网
D
DataBreaches.Net
博客园 - 三生石上(FineUI控件)
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Tor Project blog
NISL@THU
NISL@THU
Scott Helme
Scott Helme
量子位
S
Security Affairs
T
Threat Research - Cisco Blogs
博客园_首页
云风的 BLOG
云风的 BLOG
D
Docker
AWS News Blog
AWS News Blog
腾讯CDC
博客园 - 聂微东
The GitHub Blog
The GitHub Blog
U
Unit 42
Recent Announcements
Recent Announcements
Apple Machine Learning Research
Apple Machine Learning Research
G
Google Developers Blog
T
The Exploit Database - CXSecurity.com
MongoDB | Blog
MongoDB | Blog
Stack Overflow Blog
Stack Overflow Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
L
LINUX DO - 热门话题
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
The Last Watchdog
The Last Watchdog
C
Cybersecurity and Infrastructure Security Agency CISA
IT之家
IT之家
W
WeLiveSecurity
P
Privacy & Cybersecurity Law Blog
F
Full Disclosure
L
Lohrmann on Cybersecurity
The Hacker News
The Hacker News
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Y
Y Combinator Blog
S
Security @ Cisco Blogs
C
Cyber Attacks, Cyber Crime and Cyber Security
C
Check Point Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
N
News and Events Feed by Topic
PCI Perspectives
PCI Perspectives
I
InfoQ

博客园 - Don

在Chrome中调试Android微信浏览器中的网页,不出现供选择页面的怎么办?(chrome://inspect/#devices) 使用Crontab集合sh脚本自动删除过期的Confluence Docker容器中的备份文件 Docker PHP中安装gd扩展并生成图形验证码 SSH登录后提示LC_ALL: cannot change locale (en_US.UTF8) 的解决办法 解决git操作一直要求输入用户名和密码的问题 CentOS如何增加虚拟内存 RabbitMQ集群脑裂故障处理 zookeeper日志定时清理 Alibaba Centos ECS 安全更新记录 AWS EC2配置CloudWatch 记录AWS Linux2 的yum安全更新步骤 记录Docker系统盘空间占用过大的解决方法 AWS EC2 EBS数据盘挂载与相关日常维护操作 AWS Amazon Linux2 安装Docker和Docker Compose [转]提升 Docker Desktop For macOS 磁盘使用率 AndroidGetAPKInfo --- 检查包名(packageName)、版本(versionName\versionCode)、应用签名(Signature)等信息 - Don OpenSSL命令—pkcs12 Linux下User与Group的常用操作命令解析 Docker搭建openvpn - Don
解决命令行提示“cannot create temp file for here-document: No space left on device”但磁盘使用率并未满的问题
Don · 2023-09-05 · via 博客园 - Don

问题如题,出现“cannot create temp file for here-document: No space left on device”,且部分应用出现故障,比如重启后Docker容器无法启动

先使用 df -h

检查磁盘使用率,显示使用率50%还不到

继续排查,使用 lsof | grep deleted  或 lsof -w | grep deleted 检查是否存在未释放的已删大文件,未发现

继续使用 df -i ,发现inodes使用率99%,到此问题找到。

依次使用如下命令,定位目录:

for i in /var/*; do echo $i; find $i |wc -l; done
for i in /var/tmp/*; do echo $i; find $i |wc -l; done
for i in /var/spool/*; do echo $i; find $i |wc -l; done
for i in /var/spool/postfix/*; do echo $i; find $i |wc -l; done

发现问题出在Crontab中设置了2个1分钟级别的定时任务,请过长期运行,执行完毕后都会使用系统邮件功能进行通知,最终导致inodes数量不够用。

解决方法:

直接删除/var/spool/postfix/maildrop中的所有文件。由于数量较多,删除时间会比较久,耐心等待即可。这里需注意,postfix服务是不能关闭的,crontab的运行需要依赖该服务,但是可以通过以下命令停止postfix的系统邮件。

echo "unset MAILCHECK">> /etc/profile
source /etc/profile
chmod 0 /usr/sbin/sendmail
mv /usr/sbin/sendmail /usr/sbin/sendmail.bak
ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail
cat /dev/null > /var/spool/mail/root