No space left on device的原因

 看到这个错误,第一个反应是磁盘空间满了;但 df 一看,每个分区的空间都还富余的很。从 munin 的监控图表上看 Filesystem usage 也很平稳,但下面的 Inode usage 就有问题了,其中一个分区的 usage 已经到了100%。赶紧跑到服务器上 df -i 检查,果然是 Inode 耗尽。原来这个分区是用来扔各种日志和临时文件的,其中有某个程序产生的临时文件又小又多,又没有进行定时回滚,造成在磁盘空间耗尽之前文件系统的 Inode 就被用光了。

  Linux/Unix like OS 的文件系统中每个目录树中的节点并不是像 Windows 那样直接包含文件的具体信息,而只包含了文件名和 Inode number 。通过 Inode number 所找到对应于文件名的 Inode 节点中才真正记录了文件的大小/物理地址/所有者/访问权限/时间戳/被硬链接的次数等实际的 metadata 。因此你可以在 Linux 系统中通过硬链接( hard link ) 的方式给某个文件创建无数个位于不同目录下的文件名,而实际的文件数据只需要一份拷贝。

  但也正因为这种文件系统的结构,当你在 Linux 中进行 IO 操作的时候,需要的资源除了磁盘空间以外,还要有剩余的 Inode 才行。缺省情况下, Linux 在系统安装过程中按照1个 Inode 对应 2k 磁盘空间来计算每个分区的最大 Inode 数。一旦文件系统创建之后,每个分区可用 Inode 数就无法进行动态调整。

  正常来说,一般不太会出现某个分区的 Inode 耗尽而磁盘空间尚余的情况,除非像我碰到的这样垃圾小文件疯长而又没进行有效的清理。但如果确实需要的话,可以在创建文件系统(比如用 mke2fs )的时候根据实际需要来调整这个参数(比如分区如果用于存放超大视频文件的话 Inode 的数量可以少一些;如果打算存放的文件是大量小于 2k 的迷你文件的话就要考虑多创建一些 Inode)。

  附:Inode Definition by The Linux Information Project

  其它人碰到的 No space left on device 原因:

  超出系统中同时运行的最大 message queue 个数限制 : 在 root 下用 sysctl kernel.msgmni 检查该参数,sysctl -w kernel.msgmni=XXX 重新设定即可。

  cvs 异常断开的连接在 /tmp 目录下留下大量的临时文件导致 /tmp 目录满

输入目标进程PID: 19934 sh: can't create /proc/sys/kernel/yama/ptrace_scope: No such file or directory 警告:无法设置ptrace_scope,可能需要手动设置 已附加线程: tid=19941 已附加线程: tid=19942 已附加线程: tid=19943 已附加线程: tid=19944 已附加线程: tid=19945 已附加线程: tid=19946 已附加线程: tid=19947 已附加线程: tid=19948 已附加线程: tid=19949 已附加线程: tid=19954 已附加线程: tid=19955 已附加线程: tid=19959 已附加线程: tid=19962 已附加线程: tid=19963 已附加线程: tid=19968 已附加线程: tid=19977 已附加线程: tid=19981 已附加线程: tid=19982 已附加线程: tid=19983 已附加线程: tid=20010 已附加线程: tid=20012 已附加线程: tid=20013 已附加线程: tid=20027 已附加线程: tid=20038 已附加线程: tid=20039 已附加线程: tid=20040 已附加线程: tid=20041 已附加线程: tid=20046 已附加线程: tid=20063 已附加线程: tid=20065 已附加线程: tid=20066 已附加线程: tid=20072 已附加线程: tid=20075 已附加线程: tid=20076 已附加线程: tid=20077 已附加线程: tid=20078 已附加线程: tid=20080 已附加线程: tid=20091 已附加线程: tid=20094 已附加线程: tid=20096 已附加线程: tid=20097 已附加线程: tid=20117 已附加线程: tid=20135 已附加线程: tid=20143 已附加线程: tid=20146 已附加线程: tid=20147 已附加线程: tid=20164 已附加线程: tid=20165 已附加线程: tid=20166 已附加线程: tid=20167 已附加线程: tid=20174 已附加线程: tid=20180 已附加线程: tid=20219 已附加线程: tid=20227 已附加线程: tid=20228 已附加线程: tid=20229 已附加线程: tid=20232 已附加线程: tid=20233 已附加线程: tid=20234 已附加线程: tid=20241 已附加线程: tid=20242 已附加线程: tid=20247 已附加线程: tid=20248 输入断点地址(十六进制): 0x7651822168 选择断点类型(0:执行,1:读,2:写,3:读写): 0 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device PTRACE_SETREGSET设置失败: No space left on device 线程19934断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程19941断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程19942断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程19943断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程19944断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程19945断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程19946断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程19947断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程19948断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程19949断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程19954断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程19955断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程19959断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程19962断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程19963断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程19968断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程19977断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程19981断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程19982断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程19983断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20010断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20012断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20013断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20027断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20038断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20039断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20040断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20041断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20046断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20063断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20065断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20066断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20072断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20075断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20076断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20077断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20078断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20080断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20091断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20094断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20096断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20097断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20117断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20135断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20143断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20146断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20147断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20164断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20165断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20166断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20167断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20174断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20180断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20219断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20227断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20228断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20229断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20232断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20233断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20234断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20241断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20242断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20247断点设置失败 PTRACE_SETREGSET设置失败: No space left on device 线程20248断点设置失败 恢复进程执行... 等待断点触发... 停止事件(si_code=0x1) 清理断点... 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 清除执行断点失败: No space left on device 清除观察点失败: No space left on device 分离调试会话... sh: can't create /proc/sys/kernel/yama/ptrace_scope: No such file or directory 修复好完整发给我 不要漏
最新发布
07-14
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值