Thursday, February 11, 2010

Reducing swap space

Click Here For Free Windows Downloads
mywindowsdownloads.blogspot.com

स्पसlick here for all Free Linux Downloads



Blog address for Linux in Hindi

Reducing swap space


Many a times it becomes necessary to reduce swap after installation. Here also we have three options. 1- Reduce swap space on existing LVM logical volume, 2- Remove logical volume used for swap, or 3- Remove swap file.


Reduce swap space on existing logical volume


Assuming /dev/vol_gr0/log_vol1 is the volume we want to reduce


1. Disable swap for associated logical volume:


# swapoff -v /dev/vol_gr0/log_vol1


2. Now reduce logical volume b 512 MB:


# lvm lvreduce /dev/vol_gr0/log_vol1 -L -512M


3. Format the new swap space now, using the following command:


# mkswap /dev/vol_gr0/log_vol1


4. lastly, enable this new reduced logical volume:


# swapon -va


5. We can now test whether the volume has been properly reduced or not:


# cat /proc/swaps


Or


# free

No comments:

Post a Comment