# grepSwapTotal /proc/meminfo SwapTotal: 8241144 kB
若交换空间不足,用以下方法增加:
假如分区空间要增加,可以增加新硬盘来加入VG内使其增加 先加上硬盘,用fdisk –l,可以看到新硬盘。 给新加的硬盘分区: fdisk /dev/sde >n >p >1 >t
>8e(linux LVM)
>w
分成一个分区,格式为linux LVM.
下面开始把分区加到LVM内去:
1.建立物理卷
#pvcreate/dev/sde1
2.把新物理卷加入到卷组中去 #vgextendVolGroup /dev/sde1
3.关闭swap分区
#swapoff/dev/VolGroup/lv_swap
4.扩展 /dev/VolGroup/lv_swap,增加8336M
# lvextend -L+8336M /dev/VolGroup/lv_swap Extending logical volume lv_swap to 16.28 GiB Logical volume lv_swap successfully resized
5.将 /dev/VolGroup/lv_swap 设置为swap分区 # mkswap/dev/VolGroup/lv_swap
mkswap: /dev/VolGroup/lv_swap: warning:don't erase bootbits sectors on whole disk. Use -f to force.
Setting up swapspace version 1, size =17072124 KiB no label,UUID=f5fa0e85-da9e-440c-8f1c-e3ab978c9d6b
6.启动swap分区
# swapon/dev/VolGroup/lv_swap
7.查看结果
# free -m
total used free shared buffers cached Mem: 16081 14695 1386 0 83 13680 -/+ buffers/cache: 931 15150 Swap: 16671 0 16671
1.3 确认LINUX是64-Bit
# uname -m x86_64
1.4 操作系统版本查看
# cat/etc/redhat-release
Red Hat Enterprise Linux Server release 6.4(Santiago)