免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1420 | 回复: 5
打印 上一主题 下一主题

[存储备份] 磁盘空间释放不料怎么办? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-02-27 11:14 |只看该作者 |倒序浏览
过一段时间磁盘空间的一个分区就满了,
用du看其实该分区不大,机器重启后空间
就回来了,怎么知道是哪儿程序在占用空间
没释放???
谢谢

论坛徽章:
0
2 [报告]
发表于 2003-02-27 11:21 |只看该作者

磁盘空间释放不料怎么办?

可能是sparse file,df -k应能看到fs在涨
在该fs的mount dir下, ls -l 可看到file在涨。
如目录较深,可
ls -lR >;list.1
ls -lR >;list.2
diff list.1 list.2

论坛徽章:
0
3 [报告]
发表于 2003-02-27 11:32 |只看该作者

磁盘空间释放不料怎么办?

大猫:
何谓sparse file?

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
4 [报告]
发表于 2003-02-27 11:34 |只看该作者

磁盘空间释放不料怎么办?

可能有什么进程在写错误日志!还有进程没有关掉!空间也没有释放!

论坛徽章:
0
5 [报告]
发表于 2003-02-27 11:35 |只看该作者

磁盘空间释放不料怎么办?

df看它一直都不涨
但某天不看,它可能会突然涨起来
另:为什么用du看整个fs不大呢?

论坛徽章:
0
6 [报告]
发表于 2003-02-27 11:41 |只看该作者

磁盘空间释放不料怎么办?

Some applications, particularly databases, maintain data in sparse files. Files that do not have disk blocks allocated for each logical block are called sparse files. If the file offsets are greater than 4 MB, then a large disk block of 128 KB is allocated. Applications using sparse files larger than 4 MB may require more disk blocks in a file system enabled for large files than in a regular file system.
In the case of sparse files, the output of ls command is not  owing the actual files size, but is reporting the number of bytes between the first and last blocks allocated to the file, as shown in the following example:
# ls -l /tmp/"sparsefile  name"
-rw-r--r-- 1 root system 100000000 Jul 16 20:57 /tmp/sparsefile
The du command can be used to see the actual allocation, since it reports the
blocks actually allocated and in use by the file. Use du -rs to report the
number of allocated blocks on disk.
# du -rs /tmp/sparsefile
256 /tmp/sparsefile
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP