博客首页 注册 建议与交流 排行榜 加入友情链接
推荐 投诉 搜索: 帮助

好好学习,天天向SUN

联系方式: leiyu530@163.com
  penguinstorm.cublog.cn

关于作者
姓名:雷宇
昵称:storm
职业:IT
年龄:26
位置:北京
个性介绍:没啥个性
不聊MSN/QQ
本着资源共享的精神,所有文章欢迎转载
|| << >> ||
我的分类


Adding secondary device swap on a logical volume
Adding secondary swap space consists of:
creating a logical volume
adding a line to /etc/fstab
and finally, executing the swapon cmmand
 
A rough calculation of swap space requirements for a small standalone system can be made by determing the total size of the applications likely to be running at peak times and add this to the size of physical memory. A precise and detailed calculation can be made. To do this refer to the system administration tasks chapter titled managing swap space and dump areas.
 
As a guideline, it is recommended that swap space be equal to 1.5 times the size of physical memory though this may be reduced for systems with very large amounts of memory.
 
Once the total swap size has been estimated or precisely calculated, proceed with the following:
1,Determine the current state of the system's swap space
# swapinfo
The output of the swapinfo command will indicate the type of swap by location, how much of it is available, used, and free. If hold is diplayed, it indicates how much space the system has reserved based on possible requirements of running processes
 
2,Create a logical volume of sufficient size to bring total swap space to the required amount. Specify the size of the logical volume to be created in M following the -L parameter
# lvcreate -L xxx vgxx
 
3,Add a new line in /etc/fstab using vi or ed for the new logical volume
/dev/vgxx/lvolx /swap swap defaults 0 0
 
4,Enable swapping on the new device
# swapon -a
 
5,Verify that the new swap device is enabled
# swapinfo
 
6,Backup the LVM data structures. the default path name for the backup will be /etc/lvmconf/vgxx.cnf
# vgcfgbackup /dev/vgxx

发表于: 2006-07-11,修改于: 2007-09-26 14:39,已浏览866次,有评论0条 推荐 投诉


网友评论
 发表评论