Thursday, August 29, 2013

How To Create Swap File System

Information about How to  Create Swap File system 

This document will explain how to create additional swap  filesystem using LVM 
Document  Creator Todd Walters 

How to Create Swap File  System 
Creating an LVM2 Logical Volume for  Swap, using the serverX[1-3] servers as an example 
To add a swap volume group (assuming  /dev/dbx01_localVG/ is the swap volume you want to add): 
  1. Create the LVM2 logical volume of size 6 GB: 
    • # lvm lvcreate dbx01_localVG -n swapLV -L  6g 
  2.   Format the new swap space: 
    • # mkswap /dev/dbx01_localVG/swapLV 
  3. Add the following entry to the /etc/fstab file: 
    • /dev/dbx01_localVG/swapLV    swap     swap    defaults     0  0 
  4. Enable the extended logical volume: 
    • # swapon -va 
  5.  Test that the logical volume has been extended  properly: 
    • # cat /proc/swaps 
    • # free 




No comments:

Post a Comment