We are running a Proxy CentOS 6server in a VM and I need to increase the Swapfile. This is a production machine so downtime has a critical impact on the company.
VM info:
CentOS 6.6
Memory 34 GB
HardDisk 1 - 50 GB
HardDisk 2 - 18GB
I just ran top cmd on this server and here are the results....
Mem: 34941356k total, 34575644k used, 365712k free, 310772k buffers
Swap: 5152764k total, 1500k used, 5151264k free, 10543844k cached
The SWAP was only set to 4 GB and I tried to increase it, but I was only allowed 5 GB of space.
This is where I need help. I am not too familiar swap, partitions, volumes, and volume groups in Linux (I will read up on this and get familiarized with it, but I need to resolve this asap so we do not have any issues)
So my question is: How do I increase the volume/partition(?) so I can extend the swapfile? and Can I do this during production hours?
Here is some information about these partitions/volumes ... Hopefully this will give you enough info to help me with the commands.
Code: Select all
#top
Mem: 34941356k total, 34575644k used, 365712k free, 310772k buffers
Swap: 5152764k total, 1500k used, 5151264k free, 10543844k cached
---------------------------
# swapon -s
Filename Type Size Used Priority
/dev/dm-1 partition 5152764 1492 -1
---------------------------
# fdisk -l
Disk /dev/sda: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00011967
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 3917 30944256 8e Linux LVM
/dev/sda3 3917 6527 20970847+ 8e Linux LVM
Disk /dev/sdb: 19.3 GB, 19327352832 bytes
255 heads, 63 sectors/track, 2349 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xd569971e
Device Boot Start End Blocks Id System
/dev/sdb1 1 2349 18868311 83 Linux
Disk /dev/mapper/vg_centostemplate-lv_root: 47.9 GB, 47857008640 bytes
255 heads, 63 sectors/track, 5818 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/vg_centostemplate-lv_swap: 5276 MB, 5276434432 bytes
255 heads, 63 sectors/track, 641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
---------------------------
# df -m
Filesystem 1M-blocks Used Available Use% Mounted on
/dev/mapper/vg_centostemplate-lv_root
44797 36496 6023 86% /
tmpfs 17062 1 17061 1% /dev/shm
/dev/sda1 477 116 336 26% /boot
//******01/****accounts
153469 141613 11857 93% /mnt/*****data/****accounts
//******303/****WorkingDir
204797 166487 38311 82% /mnt/*****303/****WorkingDir
//*****301/j**** 524285 202339 321947 39% /mnt/*****301/j****
//*****01/Archive 511997 281207 230791 55% /mnt/*****01/Archive
//******201/***-data 204670 177616 27055 87% /mnt/*****201/***data