免费注册 查看新帖 |

Chinaunix

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

我的根目录下空间不满了,怎么增加 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-01-19 12:40 |只看该作者 |倒序浏览
[root@localhost tmp]# df -v
文件系统               1K-块        已用     可用   已用%  挂载点
/dev/sda2              5898156   5561720     36824  100%  /
/dev/sda1               101089      9296         86574  10%   /boot
none                     46668         0               46668   0%     /dev/shm



怎么增加 /

还是删除些没有用的呢

论坛徽章:
0
2 [报告]
发表于 2006-01-19 12:49 |只看该作者
做LVM好像能增加吧,建议删除些..

论坛徽章:
0
3 [报告]
发表于 2006-01-19 12:50 |只看该作者
删除些什么呀?

论坛徽章:
0
4 [报告]
发表于 2006-01-19 13:05 |只看该作者
提示: 作者被禁止或删除 内容自动屏蔽

论坛徽章:
0
5 [报告]
发表于 2006-01-19 13:24 |只看该作者
1. find out the size of /usr, /var, etc by "du -sk /usr /var"
2. create partions for /usr; /var. (fdisk, reboot, newfs/mkfs)
3. mount the partions on /mnt/usr, /mnt/var, etc
4. reboot the system to single user mode
4. copy /usr, /var etc to the new file systems by "cd /; tar cf - usr | (cd /mnt; tar xf -)" , "cd /; tar cf - var | (cd /mnt; tar xf -)"
5. mv /usr /usr.old; mv /var /var.old
6. mkdir -m 555 /var /usr
7. add new file systems /usr, /var, etc onto /etc/fstab
8. "mount /var; mount /usr" to verify the syntax of /etc/fstab and mount the new file systems.
9. boot the system to run level 3 or 5 by "init 3" or "init 5"
10. verify if applications are functioning.
11. if no issues found, remove the old directories /usr.old /var.old

note:
. /home, /tmp should be on seperate file systems as well, theyt can be done together with /usr, /var
. new /var, /tmp, /home should be much larger than the existing ones. new /usr can be a bit larger than the exiting one.

论坛徽章:
0
6 [报告]
发表于 2006-01-19 13:45 |只看该作者
原帖由 likebusy 于 2006-1-19 13:05 发表
linux里边没有LVM,你看看/tmp下边删除一些不用的临时文件吧

??  真的吗?

Screenshot.jpg (107.01 KB, 下载次数: 18)

Screenshot.jpg

论坛徽章:
0
7 [报告]
发表于 2006-01-19 14:13 |只看该作者
my subject should be "how to resolve the issue of root file system getting full".


add one more note: there is no need to copy /tmp; but the permission of the file system /tmp should be "1777" (done by "chmod 1777 /tmp").

another immediate solutions is to remove all unnecessary stuff, zip huge log files.

[ 本帖最后由 chinaux 于 2006-1-19 14:16 编辑 ]

论坛徽章:
0
8 [报告]
发表于 2006-01-19 14:25 |只看该作者
增加硬盤

把/usr /var 給 tar 過去, 刪除原來的再mount上新的硬盤, 修改fstab
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP