Ask Your Question

Expand swap space in Fedora 20

asked 2014-04-14 11:30:45 -0500

gunit888 gravatar image

updated 2014-04-14 14:58:02 -0500

I recently installed Fedora 20, and I forgot to adjust the swap partition size during install. It seems to have defaulted me to a size of 8G, but it did create a swap partition. Since I have 16G of RAM, I'd like to increase the swap to 32G, as I believe that's a good practice.

I've tried:

swapoff -v /dev/fedora/swap
lvresize /dev/fedora/home -L -16G
lvresize /dev/fedora/swap -L +16G
swapon -v /dev/fedora/swap

As directed in the Fedora docs, but according to both



cat /proc/swap

The swap partition is only 8G still. How can I do this without reinstalling Fedora?

edit retag flag offensive close merge delete


This doesn't directly answer your question, but if I understand correctly you don't necessarily need that much swap; have a look at the Fedora 20 installation guide.

Ahmad Samir gravatar imageAhmad Samir ( 2014-04-15 05:46:28 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2014-04-14 18:32:59 -0500

deusdara gravatar image
edit flag offensive delete link more


The answers here indicate how to add a partition or file for swap space. I want to expand what I currently have.

gunit888 gravatar imagegunit888 ( 2014-04-15 12:43:53 -0500 )edit

answered 2014-04-14 14:15:56 -0500

Marc lml gravatar image

You can follow the steps described in the Fedora Documentation item "Adding Swap Space".

edit flag offensive delete link more


@Marc van der Wijst According to lvscan the sizes changed according what I provided, but not according to free or cat /proc/swaps.

gunit888 gravatar imagegunit888 ( 2014-04-14 14:59:31 -0500 )edit

Question Tools

1 follower


Asked: 2014-04-14 11:30:45 -0500

Seen: 3,361 times

Last updated: Apr 14 '14