Chinaunix首页 | 论坛 | 博客
  • 博客访问: 5701742
  • 博文数量: 745
  • 博客积分: 10075
  • 博客等级: 上将
  • 技术积分: 7716
  • 用 户 组: 普通用户
  • 注册时间: 2005-04-29 12:09
文章分类

全部博文(745)

文章存档

2019年(1)

2016年(1)

2010年(31)

2009年(88)

2008年(129)

2007年(155)

2006年(197)

2005年(143)

分类:

2006-07-11 16:30:50

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
阅读(2534) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~