Re: Swap space

Robert <[email protected]> Wed, 03 Nov 2004 07:32:38 -0600
Newsgroups gmane.linux.redhat.release.valhalla
Message-ID <[email protected]>
Andreas Lund wrote:

>Tue, 2 Nov 2004 15:34:14 -0000, "Harry Hambi" <[email protected]> wrote:
>  
>
>>Hi All,
>>Trying to find out how much swap I have......remember configuring a swap
>>file when I installed linux 7.2. the command I use is df -f ..no
>>mentioned of a swap, how do you change the size of the swap space?.
>>    
>>
>
>Type "free", the last line tells you the total swap space, how much is in use
>and hos much is free. Here's what mine looks like:
>
># free 
>             total       used       free     shared    buffers     cached
>Mem:        513640     500984      12656          0      90064     334584
>-/+ buffers/cache:      76336     437304
>Swap:       481940      29696     452244
>
>
>In Linux, you don't use a swap file but rather one or more swap partitions.
>This means swap performance and reliability won't be affected by a fragmented
>or busy file system, but the downside is you have to re-partition (or add a
>new drive) if you want to change the size later on.
>
Not exactly.   Check man mkswap and man fstab for instructions on 
creating a swap file. You CAN have both a swap partition and a swap 
file. I did this in RH6.0 because of my own foolishness during 
installation.  Basically, you have to create an empty file, use mkswap 
to format it, an the entry in /etc/fstab and activate it with swapon. 




>
>Here's what the main drive looks like on one of my servers:
>
># fdisk -l /dev/sda
>
>Disk /dev/sda: 255 heads, 63 sectors, 1106 cylinders
>Units = cylinders of 16065 * 512 bytes
>
>   Device Boot    Start       End    Blocks   Id  System
>/dev/sda1   *         1       523   4200966   83  Linux
>/dev/sda2           524      1046   4200997+  83  Linux
>/dev/sda3          1047      1106    481950   82  Linux swap
>
>
>Swap partitions are usually turned on by /etc/rc.sysinit during boot, but you
>can also turn swap partitions on and off manually using the swapon/swapoff
>commands to avoid unnecessary reboots.
>
>Notice the partition type 0x82 meaning "Linux swap"
>
>
>--
>Andreas Lund ([email protected]) - Net.adm - http://www.atc.no
>Tel: +47 90.07.71.62 / +47 63.88.33.57  Fax: +47 21.69.09.10
>Ano-Tech Computers AS - Din interaktive leverandør
>** He had a baseball bat and I was tied to a chair. 
>** Pissing him off was the smart thing to do.  -- Max Payne
>
>_______________________________________________
>Valhalla-list mailing list
>[email protected]
>https://www.redhat.com/mailman/listinfo/valhalla-list
>
>  
>


-- 
The time is Wed Nov 3 07:18:37 CST 2004
It has been 47917 seconds since the Chump Challenge began!