LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-04-2004, 01:49 PM   #1
samhob
Member
 
Registered: Jan 2004
Location: Bern, Switzerland
Distribution: Debian
Posts: 72

Rep: Reputation: 15
recreate swap


Hello , i wanted to put a little more swap space so i deleted the swap partition , before i had a mount of a windows partition , but now i delete it so swap will be hda1 instead of hda2 ...

i hacve created a new partition of 600 megs ( i have 512 mb ram but only need 600 of swap)
set type to linux swap ...

venus:/home/sam# mkswap /dev/hda1
Setting up swapspace version 1, size = 600408 kB

and if i swapon:
swapon: /dev/hda1: Device or resource busy
venus:/home/sam#

venus:/home/sam# swapon -s
Filename Type Size Used Priority
/dev/hda1 partition 586332 0 -1
venus:/home/sam#

i can see system monitor that i have a partition , but 0 mb is used , i think it isnt good activated , in booting everything seem fine ..

any ideas ??
 
Old 02-04-2004, 02:04 PM   #2
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
Did you change the /etc/fstab to point to the new location of the swap?
 
Old 02-05-2004, 09:16 AM   #3
samhob
Member
 
Registered: Jan 2004
Location: Bern, Switzerland
Distribution: Debian
Posts: 72

Original Poster
Rep: Reputation: 15
yes !

/dev/hda1 none swap sw 0 0 0

( have also tried other like /dev/hda1 swap swap sw 0 0 0 ) no results
 
Old 02-05-2004, 09:17 AM   #4
samhob
Member
 
Registered: Jan 2004
Location: Bern, Switzerland
Distribution: Debian
Posts: 72

Original Poster
Rep: Reputation: 15
dmesg | grep swap --- no output ,


but in startup it tells activating swap
 
Old 02-05-2004, 09:26 AM   #5
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
With the amount of memory you have, the swap may never get used. Mine doesn't and no harm done.
 
Old 02-05-2004, 05:12 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,703

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
If the system monitor says you have total swap space of 600mb then your swap space is working.
 
Old 02-05-2004, 11:45 PM   #7
samhob
Member
 
Registered: Jan 2004
Location: Bern, Switzerland
Distribution: Debian
Posts: 72

Original Poster
Rep: Reputation: 15
is it activated ? i i launch a big app ( like open office ) still 0 %

before it were used
 
Old 02-06-2004, 04:06 AM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,703

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
What does the console command free indicate as your total swap memory size?
 
Old 02-06-2004, 10:59 AM   #9
samhob
Member
 
Registered: Jan 2004
Location: Bern, Switzerland
Distribution: Debian
Posts: 72

Original Poster
Rep: Reputation: 15
here it is :
______________________________________________________

sam@venus:~$ free
total used free shared buffers cached
Mem: 514860 228964 285896 0 5600 131396
-/+ buffers/cache: 91968 422892
Swap: 586332 0 586332
sam@venus:~$

__________________________________________________

 
Old 02-06-2004, 03:37 PM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,703

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
IMO your swap is activated.
 
Old 02-07-2004, 04:47 AM   #11
samhob
Member
 
Registered: Jan 2004
Location: Bern, Switzerland
Distribution: Debian
Posts: 72

Original Poster
Rep: Reputation: 15
before i change things , swap was always using 10 mb or 30 , but ok , no problem system runs fine
 
Old 02-07-2004, 10:04 AM   #12
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
I think the fstab should look like this:
/dev/hda1 none swap defaults 0 0


and if i swapon:
swapon: /dev/hda1: Device or resource busy
venus:/home/sam#

Try this:
swapoff /dev/hda1
swapon /dev/hda1
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Recreate a package from /var/log/package/ Vgui Slackware 2 08-31-2005 10:59 PM
Software Raid - recreate failed disk. FragInHell Red Hat 5 11-25-2004 04:32 PM
How to unmount actual swap and mount a new(bigger) swap space? isaac Linux - Newbie 1 06-06-2004 01:23 AM
Missing /dev/hdd .. .. anyway to recreate it or use hdd1 ? Zero-0-Effect Slackware 2 03-04-2004 04:16 AM
how to recreate mysql database java8964 Linux - Software 1 07-25-2002 09:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:08 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