LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-20-2004, 07:17 AM   #1
jamaso
Member
 
Registered: Oct 2001
Location: brasil
Distribution: mdrk 8.0,redht7.1,debianpotato
Posts: 615

Rep: Reputation: 30
adding swap space


Hi!
I read about swap partitionning and partitions in general in most valuable slackware /usr/doc but i didn't see anything regarding adding swap space to already installed swap partition on a running system, this is possible, right?
Well, the reason why i am concerned is because while looking at info center in KDE i noticed there is no swap space at all (altough RAM size is 430MB).

--------------------------------------------------------------------------
bash-2.05b# fdisk /dev/hda
...
Disk /dev/hda: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 1275 10241406 7 HPFS/NTFS
/dev/hda2 1276 4864 28828611 5 Extended
/dev/hda5 1276 1394 955804+ 82 Linux swap
/dev/hda6 1395 2679 10321731 83 Linux
/dev/hda7 2680 3061 3068352 b W95 FAT32
/dev/hda8 3062 3443 3068383+ b W95 FAT32
/dev/hda9 3444 3820 3028189+ 83 Linux
/dev/hda10 3821 4207 3108546 83 Linux
/dev/hda11 4208 4864 5277289+ 83 Linux

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

bash-2.05b# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/hda6 4294967295 0 4294967295 0% /
/dev/hda10 4294967295 0 4294967295 0% /A700
/dev/hda11 4294967295 0 4294967295 0% /A800
/dev/hda9 4294967295 0 4294967295 0% /A900
/dev/hda7 0 0 0 - /w1
/dev/hda8 0 0 0 - /w2
---------------------------------------------------------------------------

As my graphics card (ATI radeon 340M) is not properly configured yet* (i
can't watch dvd unless i have it running in a small window) i wonder to what extent is performance compromised by lack of swap space, on the other hand, it looks like i have plenty space (see below).
Another dumb but important question is how large is my swap anyways?

start end
my / (dev/hda6) partition is 10GB ---------- 1395 - 2679 = (-)1284

10080 MB ---------- 1284
x ---------- 118

x = is about 900 MB(?)

can you please help ?
 
Old 06-20-2004, 07:46 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
Here is your swap partition
/dev/hda5 1276 1394 955804+ 82 Linux swap

Swap is not a mounted partition and does not display any information with the df command. Look at the output of the free or top commands and you should see a non zero value for total swap space. If it is zero then your swap space not being activated at boot. It looks like you have plenty of swap space but it depends on what applications are running.

There should be a line in the /etc/fstab file similar to:
/dev/hda5 swap swap defaults 0 0

This activates the swap at boot.
 
Old 06-20-2004, 07:50 AM   #3
rotvogel
Member
 
Registered: Oct 2003
Posts: 534

Rep: Reputation: 30
I don't know what version of Slack you are using but I think the latest X will have much better support for Radeon based cards. Slackware 10 is about to be released and that version will have the latest X version. Otherwise searching the forum for Radeon related problems will give a lot of information I guess. A search on Slackware Radeon provides a lot of information on the issue.

I think your swap is about 950 MB , it won't show using df but you can see it using free or free -m if you want the output in Megabytes.
 
Old 06-20-2004, 09:00 AM   #4
jamaso
Member
 
Registered: Oct 2001
Location: brasil
Distribution: mdrk 8.0,redht7.1,debianpotato
Posts: 615

Original Poster
Rep: Reputation: 30
sh-2.05b# cat /etc/fstab
/dev/hda6 / reiserfs defaults 1 1
/dev/hda10 /A700 reiserfs defaults 1 2
/dev/hda11 /A800 reiserfs defaults 1 2
/dev/hda9 /A900 reiserfs defaults 1 2
/dev/hda7 /w1 vfat defaults 1 0
/dev/hda8 /w2 vfat defaults 1 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0




--------------------------------------------------------------------
12:33:39 up 3:57, 3 users, load average: 0.21, 0.27, 0.31
55 processes: 54 sleeping, 1 running, 0 zombie, 0 stopped
CPU states: 4.7% user 7.7% system 0.0% nice 0.0% iowait 87.5% idle
Mem: 450140k av, 222908k used, 227232k free, 0k shrd, 44664k buff
98812k active, 99472k inactive
Swap: 0k av, 0k used, 0k free 99092k cached
----------------------------------------------------------------------------

bash-2.05b# free -m
total used free shared buffers cached
Mem: 439 215 224 0 43 96
-/+ buffers/cache: 75 364
Swap: 0 0 0
bash-2.05b# free
total used free shared buffers cached
Mem: 450140 220764 229376 0 44668 99112
-/+ buffers/cache: 76984 373156
Swap: 0 0 0



so basically i just have to add 1 line to /etc/fstab, right?
and about the command you showed(free) rotvogel, i have been looking for just that!
really quick response! thanks
 
Old 06-20-2004, 10:07 AM   #5
major.tom
Member
 
Registered: Jun 2003
Location: Canada
Distribution: Slackware (current); Gentoo (newbie)
Posts: 142

Rep: Reputation: 15
That looks right. You should only need to add the swap partition to /etc/fstab.

FYI, here's what mine looks like (this is the first line, maybe because it's the 1st partition, but I guess because it's the swap partition):

/dev/hda1 swap swap defaults 0 0

So just change hda1 to hda5, reboot and you should see it with 'free'. Or instead of rebooting, maybe you can just use these commands to see it:

mkswap /dev/hda5
swapon -a

Good luck,

Garry

Last edited by major.tom; 06-20-2004 at 10:10 AM.
 
Old 06-20-2004, 10:14 AM   #6
jamaso
Member
 
Registered: Oct 2001
Location: brasil
Distribution: mdrk 8.0,redht7.1,debianpotato
Posts: 615

Original Poster
Rep: Reputation: 30
yes i can see it now, thanks
 
Old 06-20-2004, 11:05 PM   #7
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
The line in fstab for swap usually is the first one, unless a swapFILE is being used. If this is the case, then whatever partition the swapfile is on must be mounted first.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to reduce swap space and reclaim the space grantm Linux - Newbie 7 08-16-2012 07:05 AM
Adding swap space sbrewer Linux - Distributions 4 12-19-2004 04:32 AM
How to unmount actual swap and mount a new(bigger) swap space? isaac Linux - Newbie 1 06-06-2004 01:23 AM
Swap space ekoome Red Hat 3 11-07-2003 10:49 AM
Swap space ? wr3ck3d Linux - Hardware 2 03-28-2003 06:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration