How can I add more swap?

How can I add more swap?

Post by David Be » Sun, 31 Dec 1899 09:00:00



[posted to comp.os.linux.misc and comp.os.linux.setup]

Hello!  I just installed Mandrake 7.0 last night without any trouble
whatsoever. :)  I did the workstation install, and the installer partitioned
everything for me.  After playing with KDE for awhile, I opened a few Netscape
browser windows and watched top, to find I only had 5megs of swap left...  I've
only got 32megs of  RAM and 64megs of swap.  I took a look at the partitions to
see that the main Linux partition took up the entire drive, but is actually
only 23% full.  Here's my question:  How can I create another swap partition
without losing any data?  TIA

-------------------------
David Bell - Otherwise known as DB7654321

Remember to remove nospam, notrash or anything odd looking from my email
address. :)

 
 
 

How can I add more swap?

Post by Doug Alcor » Sun, 31 Dec 1899 09:00:00



>  I took a look at the partitions to see that the main Linux
>  partition took up the entire drive, but is actually only 23% full.
>  Here's my question: How can I create another swap partition without
>  losing any data?

If you have unallocated space on the disk, just use fdisk to create
new partitions.  While in fdisk, you can change the partition type
from linux ext2 to linux swap.  Then write the new partition table.
After that, run 'mkswap /dev/hdxY' (whatever your partition number
was).  Then add the line to /etc/fstab similar to your other swap
line.  You should be able to run 'swapon -a' and get more swap space
without rebooting!  (Let's see windows do that trick)

--

 oo /  Win a 66MB capacity tape drive. Help me win too!
 |_/   http://www.ecrix.com/extreme/getReferrals.cfm?ref=7612

 
 
 

How can I add more swap?

Post by Tom Hoffman » Sun, 31 Dec 1899 09:00:00


1)  create a new partition
2)  mkswap -c device size
3)  swapon device



> [posted to comp.os.linux.misc and comp.os.linux.setup]

> Hello!  I just installed Mandrake 7.0 last night without any trouble
> whatsoever. :)  I did the workstation install, and the installer
> partitioned everything for me.  After playing with KDE for awhile, I
> opened a few Netscape browser windows and watched top, to find I only
> had 5megs of swap left...  I've only got 32megs of  RAM and 64megs of
> swap.  I took a look at the partitions to see that the main Linux
> partition took up the entire drive, but is actually only 23% full.
> Here's my question:  How can I create another swap partition without
> losing any data?  TIA

> -------------------------
> David Bell - Otherwise known as DB7654321

> Remember to remove nospam, notrash or anything odd looking from my email
> address. :)

 
 
 

How can I add more swap?

Post by David Be » Sun, 31 Dec 1899 09:00:00


Quote:>If you have unallocated space on the disk, just use fdisk to create
>new partitions.  While in fdisk, you can change the partition type
>from linux ext2 to linux swap.  Then write the new partition table.
>After that, run 'mkswap /dev/hdxY' (whatever your partition number
>was).  Then add the line to /etc/fstab similar to your other swap
>line.  You should be able to run 'swapon -a' and get more swap space
>without rebooting!  (Let's see windows do that trick)

Wow, that sounds a lot easier than exepected. :)  Well, I made another swap
partition with Partition Magic, but am not sure what the partition number was..
 How can I figure this out?  Thanks :)

-------------------------
David Bell - Otherwise known as DB7654321

Remember to remove nospam, notrash or anything odd looking from my email
address. :)

 
 
 

How can I add more swap?

Post by Michael Per » Sun, 31 Dec 1899 09:00:00



Quote:>[posted to comp.os.linux.misc and comp.os.linux.setup]

>Hello!  I just installed Mandrake 7.0 last night without any trouble
>whatsoever. :)  I did the workstation install, and the installer partitioned
>everything for me.  After playing with KDE for awhile, I opened a few Netscape
>browser windows and watched top, to find I only had 5megs of swap left...  I've
>only got 32megs of  RAM and 64megs of swap.  I took a look at the partitions to
>see that the main Linux partition took up the entire drive, but is actually
>only 23% full.  Here's my question:  How can I create another swap partition
>without losing any data?  TIA

>-------------------------
>David Bell - Otherwise known as DB7654321

>Remember to remove nospam, notrash or anything odd looking from my email
>address. :)

You can also use a swapfile if you need more swap room.  Try doing a "man
mkswap" on your system.  

--
Michael Perry          

------------------

 
 
 

1. Adding swap space using 'swap -a' command ?

Greetings,

I am using SCO OpenServer 5.0.4 on a compaq prolian 4500 server. The
initial swap space setup is too small. I want to increase the swap
space.

I first create a directory say '/hotswap' and inside the hotswap
directory, I created a empty file called 'swapfile2'. I then make the
file swapfile2 act as a swap space
using :
              swap -a /hotswap/swapfile2 65536

When I used 'swap -l' to list the current swap space, it appears to have
added to the system. But when I check the system disk space, it appear
to be the same as before the swap file is added to the system.

path                                        swaplo    block        free
block
=========================================
/dev/swap                  1,41            0        196668      186790
/hotswap/swapfile2     76,1            0        65536        65536

Can someone tell if I done it correctly?  If not, how should I do it ?


Thank in advance

Eric Chin

2. HELP: building a shared library / mkimage ?

3. Adding Swap: 257000k swap-space (priority -1)

4. Piping to another program from "C"; continuing while other program lasts

5. It's not bad canned meat...

6. Find out the Process belonging to a port

7. Alias declaration and output using Kornshell script!

8. Canned Proxy URLs to Filter

9. CGI: apache canned response

10. For those of you tired of canned distributions...

11. Canned "ping"

12. Any Canned Class code?