免费注册 查看新帖 |

Chinaunix

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

solaris下的文件系统空间清除问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-01-14 14:08 |只看该作者 |倒序浏览
solaris8的机器
/var下的空间满了,把/var/log里面的无用大文件删除后
#df -k /var
/dev/dsk/c0t0d0s3 962571 958172 0 100% /var
仍然显示占用100%
du -sk /var
显示空间只占用了100M
如何才能将该部分空间释放出来(不能重新启动机器)

论坛徽章:
0
2 [报告]
发表于 2004-01-14 23:55 |只看该作者
I have ever met this suitation. I do not know the exact reason. perhaps it some priviledged daemon that log some info in /var. I can only tell you how to find the possible largest file and how to enlarge /var online.

1.Find the possible largest file and check if it can be eliminate from var
#du -sk /var/*/* | sort -nr
Some file related to mail, log etc can be touched to 0 size.

2. The worst thing is that so much /var space is occupied by /var/run, /var/tmp. Reboot system may solve this. As for you, your server can not be rebooted. perhaps you need to online revise your /var size.
move /var to new disk(if /var is not in /)
#umount /var
Then add a new disk,
#newfs /dev/dsk/cntxdysz
# mount -F ufs /dev/cntxdysz /var
Then ufsdump /var on it.

论坛徽章:
0
3 [报告]
发表于 2004-01-15 12:42 |只看该作者
我以前在HP-UX也遇到过。
但如果用>清空文件的话空间就可以释放,不知道是为什么?

论坛徽章:
0
4 [报告]
发表于 2004-01-16 12:04 |只看该作者
lsof is a good tool to analyse such kind of problem, basically, this issue is due to some unix process which hold the diskspace was not killed.
lsof will help to identified the unix process after killed the process the diskspace will be released.
or, just reboot the box.

论坛徽章:
0
5 [报告]
发表于 2004-01-16 14:22 |只看该作者
thanks a lot!

i used the fuser -cu /var to identify the process and killed the hanged process.
So,i\'ve released the space.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP