免费注册 查看新帖 |

Chinaunix

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

[FreeBSD] 各位达人,Freebsd怎样减少swap分区的大小! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-11-04 12:22 |只看该作者 |倒序浏览
5可用积分
各位达人,Freebsd怎样减少swap分区的大小!


分区的时候把swap做到太大了,现在想减少他,改怎么做?

小到大有人做过,大到小,如何啊!头痛,

最佳答案

查看完整内容

1. Be certain that your kernel configuration includes the vnode driver. It is not in recent versions of GENERIC.2. pseudo-device vn 1 #Vnode driver (turns a file into a device)3. create a vn-device:4. # cd /dev5. # sh MAKEDEV vn06. create a swapfile (/usr/swap0):7. # dd if=/dev/zero of=/usr/swap0 bs=1024k count=648. set proper permissions on (/usr/swap0):9. # chmod 0600 /usr/swap010. enable the sw ...

论坛徽章:
0
2 [报告]
发表于 2008-11-04 12:22 |只看该作者
1. Be certain that your kernel configuration includes the vnode driver. It is not in recent versions of GENERIC.
2. pseudo-device vn 1 #Vnode driver (turns a file into a device)
3. create a vn-device:
4. # cd /dev
5. # sh MAKEDEV vn0
6. create a swapfile (/usr/swap0):
7. # dd if=/dev/zero of=/usr/swap0 bs=1024k count=64
8. set proper permissions on (/usr/swap0):
9. # chmod 0600 /usr/swap0
10. enable the swap file in /etc/rc.conf:
11. swapfile="/usr/swap0" # Set to name of swapfile if aux swapfile desired.
12. Reboot the machine or to enable the swap file immediately, type:
13. # vnconfig -e /dev/vn0b /usr/swap0 swap

http://www.freebsdchina.org/foru ... 1c16077a059d79fb618

论坛徽章:
0
3 [报告]
发表于 2008-11-04 12:51 |只看该作者
原帖由 ziggler 于 2008-11-4 12:23 发表
1. Be certain that your kernel configuration includes the vnode driver. It is not in recent versions of GENERIC.
2. pseudo-device vn 1 #Vnode driver (turns a file into a device)
3. create a vn- ...



这是增加空间?替换旧的?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP