adding swap partition

Chiu, PCM (Peter) P.C.M.Chiu at rl.ac.uk
Fri Jun 11 09:01:13 UTC 2004


Dear Rick,

>which will cause the file to be used automatically at your next boot. Also
note that the maximum size of a single >>swap partition or file is 2GB, but
you can have up to 8 of those (16GB total swap).

How do you determine the limits on the maximum swap file or partitions and
their total number?
 
Peter

-----Original Message-----
From: redhat-install-list-bounces at redhat.com
[mailto:redhat-install-list-bounces at redhat.com] On Behalf Of Rick Stevens
Sent: 10 June 2004 19:53
To: invincible invincible invincible; Getting started with Red Hat Linux
Subject: Re: adding swap partition


invincible invincible invincible wrote:
>   
> hello all
> 
> i have installed red hat linux 9.0 but at the time 0f partitioning it 
> was  giving me error at the time of creating swap partition. so i 
> installed linux without it and the systems is kind of behaving quite 
> slow. is there a way to add swap partition after we have installed 
> linux. waiting for ur reply.

You can create an empty file of the size you want, use "mkswap" on the file
to convert it to swap format, then enable it using the swapon command.

For example, to create a 512MB swap file, find a filesystem that has 512MB
free (use the "df -h" command).  Let's assume that's on your /var
filesystem.  As root:

	# dd if=/dev/null of=/var/swapfile bs=1M bc=512
	# mkswap /var/swapfile
	# swapon /var/swapfile

You can then edit your /etc/fstab file and add a line like:

	/var/swapfile    swap          swap    defaults        0 0

which will cause the file to be used automatically at your next boot. Also
note that the maximum size of a single swap partition or file is 2GB, but
you can have up to 8 of those (16GB total swap).

If you have unassigned space on your hard drive, you can create a swap
_partition_ and use it.  I don't know what kind of error you got, but the
most common one in disk druid is trying to specify a mountpoint for a
partition with the "swap" filesystem type.  I'd sure like to know what you
did and what error you got.
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-    If your broker is so damned smart...why is he still working?    -
----------------------------------------------------------------------


_______________________________________________
Redhat-install-list mailing list
Redhat-install-list at redhat.com
https://www.redhat.com/mailman/listinfo/redhat-install-list
To Unsubscribe Go To ABOVE URL or send a message to:
redhat-install-list-request at redhat.com
Subject: unsubscribe





More information about the Redhat-install-list mailing list