LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Increase Swap Space? (https://www.linuxquestions.org/questions/linux-software-2/increase-swap-space-48728/)

star geezer 03-07-2003 12:46 PM

Increase Swap Space?
 
How do I increase swap space in an exiting partition configuration? Do I have to start over, i.e., redo partions & reinstall my Red Hat 7.3?

- Vaughn

Mara 03-07-2003 12:48 PM

No, you use parted. It has 'resize' option.

JStew 03-07-2003 02:08 PM

Delete all partitions and then re-install and re-configure.

That would be a start.

Mara 03-07-2003 03:03 PM

JStew, why do you think it's the best idea? Reinstallation requires data backup, while parted and 'resize' option make everything much easier.

JStew 03-07-2003 03:15 PM

Just an opinion...

thedeud 03-07-2003 03:37 PM

Why not just use a swap file?

To add swap you can create a swap file,

For eg:
Assuming you want to create this swap in /swap and having size 512M.

Run the following commands

dd if=/dev/zero of=/swap bs=512k count=1024
mkswap /swap
chmod 0600 /swap
swapon /swap

you will also have to add this line to /etc/fstab
/swap swap swap defaults 0 0

You can run free -m to find the swap space used in megabytes before and after the allocation of swap space.

JStew 03-07-2003 07:47 PM

how much actual ram do you have?

if you have 512mb or more then you really dont need a /swap partition IMHO

star geezer 03-10-2003 10:11 AM

Thanks for all the suggestions... I'm adding .5GB to my existing .5GB of RAM & I want to increase my swap space from .5GB up to at least 1.5GB. Right now my disk space is set up as follows:

Device Boot Start End Blocks Id System
/dev/sda1 1914 4427 20193705 83 Linux
/dev/sda2 1 9 72261 83 Linux
/dev/sda3 10 1913 15293880 5 Extended
/dev/sda5 10 264 2048256 83 Linux
/dev/sda6 265 456 1542208+ b Win95 FAT32
/dev/sda7 457 584 1028128+ 83 Linux
/dev/sda8 585 650 530113+ 82 Linux swap
/dev/sda9 651 714 514048+ 83 Linux
/dev/sda10 715 727 104391 83 Linux
/dev/sda11 728 1913 9526513+ 83 Linux

I didn't set it up this way myself & now I want to change it. My guess is that I can convert the Win95 FAT32 (/dev/sda6) partition which I don't use to Linux Swap space & I'm done. Right???

Vaughn

tcaptain 03-10-2003 11:26 AM

If you're going to have a total of 1Gig of ram, you really shouldn't need 1.5 Gigs of swapspace.

Use the diskspace for something else more worthwhile :)

Mara 03-10-2003 12:04 PM

1GB RAM+1.5GB swap would be good for film editing, but not for normal use...


All times are GMT -5. The time now is 04:07 AM.