No space left on device

#df

/dev/sdc1             20799540  19751436         0 100% /home/sluo

无论怎么删除文件,剩余空间都为0,并没有增加。
网上很多人遇到的是硬盘还有空间,但是也报错:No space left on device. 显然他们的问题是因为inode耗尽了。
Linux上创建文件需要对应的inode如果inode 耗尽也无法写入文件,inode可以通过df -i查看。通常由于<2K的小文件过多,而每个小文件又占用一个inode,这样就会出现硬盘空间还有,却无法继续写入。

A few hours ago my root partition filled up, I moved files away from it and df reports:

# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda1             183G  174G     0 100% /

So there should be 9GB free, but avail reports 0 and Use is still at 100%.

I tested as root, e.g.

# echo test >a ; cat a
test

it works as expected; however as a normal user, I still get the error:

$ echo test >a ; cat a
bash: echo: write error: No space left on device

The root home directory where I conducted the positive test and my home directory are on the same partition.The fstab entry is:

/dev/hda1 / ext3 noatime,defaults,errors=remount-ro 0 1
例子:
yuan@lihacker-laptop:~/tools/arm-2009q3/bin$ arm-linux-gcc
ccache: failed to create /home/yuan/.ccache_4.2.2 (No space left on device)

第一步:

yuan@lihacker-laptop:~/tools/arm-2009q3/bin$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1             15773312  14972440         0 100% /
tmpfs                   254724         0    254724   0% /lib/init/rw
varrun                  254724       124    254600   1% /var/run
varlock                 254724         0    254724   0% /var/lock
udev                    254724       152    254572   1% /dev
tmpfs                   254724      1460    253264   1% /dev/shm
lrm                     254724      2392    252332   1% /lib/modules/2.6.28-11-generic/volatile
/dev/sr0                 32780     32780         0 100% /media/cdrom0
f_DRIVE              142327832  82981080  59346752  59% /mnt/shared

第二步:

yuan@lihacker-laptop:~/tools/arm-2009q3/bin$ sudo tune2fs -l /dev/sda1 | grep -i reserved
Reserved block count:     120186
Reserved GDT blocks:      978
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)

第三步:

yuan@lihacker-laptop:~/tools/arm-2009q3/bin$ sudo tune2fs -m 3 /dev/sda1
[sudo] password for yuan: 
tune2fs 1.41.4 (27-Jan-2009)
Setting reserved blocks percentage to 3% (120186 blocks)

第四步:

yuan@lihacker-laptop:~/tools/arm-2009q3/bin$ arm-linux-gcc hello.c

执行成功!

输入目标进程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=0xffffffff) 清理断点... 清除执行断点失败: 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、付费专栏及课程。

余额充值