View Full Version : How to make LVM swap space larger?

Jim Rockford
31st January 2007, 10:05 PM
I planned to use Gparted to increase the size of my FC6 swap partition, but I just learned that Gparted doesn't support LVM. How may I go about increasing the size of my swap space from 2g to 4g, say? I include the detials of my file system below.

Here's what's in /etc/fstab:
/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0

Here's a result of the "df" command:
300658944 15192732 269947288 6% /
/dev/sdc1 101086 11700 84167 13% /boot
tmpfs 1026880 0 1026880 0% /dev/shm

Jim Rockford
31st January 2007, 10:57 PM
[QUOTE=leigh123]Why , A 2gig swap is more than enough for any desktop.

Oh really? And how do you know that with such certainty?

That thread you pointed me to isn't very useful. Most of the posts stumble around and arrive at the conclusion that I already know, that Gparted doesn't deal with LVM. There's a suggestion that the Knoppix cd has a program that can be used, but I'd like to hear from anybody who has actually used Knoppix Live or any other tool to resize an LVM partition.



31st January 2007, 11:02 PM
What you could do:
1) use Gparted to determine if you have a free partition
- lets say you had partition /dev/hda6 open fro use.

2) then you do this:
- step one: mkswap /dev/hda6
- step two: swapon /dev/hda6

3) then use top and you should see the new swap space

4) to make the changes permanent edit you /etc/rc.local file and
add the commands from step 2 into the /etc/rc.local file. then when you
boot up it will automatically be saved and ready for use.