Home » linux administration » file system » increasing swap memory using lvm

increasing swap memory using lvm

check the current swap space

free -m

check the current volume group and logical volume status

lvdisplay

I am assuming this is the first logical volume I am creating, so create a new lv and the vg being used is volgroup001

lvcreate -L +1G -n logvol01 volgroup001

make the above created lv as Swap

mkswap /dev/volgroup001/logvol01
swapon /dev/volgroup001/logvol01

edit /etc/fstab to make these changes permanent

echo “/dev/volgroup001/logvol01       swap                    swap    defaults        0 0″ >> /etc/fstab
mount -a

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s