LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-15-2003, 11:09 PM   #1
ALF
Member
 
Registered: Oct 2002
Posts: 32

Rep: Reputation: 15
SWAP area


Hi,

I created a SWAP area under the /var directory and the desk space now for /var is 100%.

I tried to remove log and spool files and still 100%.

How can I get rid now of the swap AREA and .. lets say .. move it under /home? I mean can I partition /home without destroying it ?

.. and also where the desk space that I recovered is gone?

Alf
 
Old 12-15-2003, 11:13 PM   #2
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304

Rep: Reputation: 65
i can't really tell if you are talking about a swap file or a swap partition.
parted will let you change partition sizes, and add partitions, but
you'll have to make changes to fstab yourself.

if you're talking about a swap file, you can swapoff <filename>,
then delete the file. then you can create a new swapfile.
if you want to make one of 200 megs, then
dd if=/dev/zero of=swapfile.name bs=1M count=200
put it whereever you wish.
mkswap swapfile.name
swapon swapfile.name

add swapon swapfile name to some startup script.
 
Old 12-15-2003, 11:43 PM   #3
ALF
Member
 
Registered: Oct 2002
Posts: 32

Original Poster
Rep: Reputation: 15
SAWP File?

Thanks very much for your help. I really don't know how I can tell if it is SAWP file or SWAP Partition?

I think it is SAWP partition - that's what I can see when I issue the command
df -k.

I don't know is

dd if=/dev/zero of=swapfile.name bs=1M count=200

can be issued from command line (if it turn to be a swap file)

Alf
 
Old 12-16-2003, 01:49 AM   #4
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304

Rep: Reputation: 65
that dd command is something to run from the command line.
it just creates a 200 meg empty file that you can format as swap
and then mount as swap.
if your swap was created by an installer then it is most likely a swap
partition.
you should substitute the full path of where you want the file to be if you
make one. the of=/full/path/to/file.name of the dd command determines
where the file is written and what it's name is.
 
Old 12-16-2003, 12:59 PM   #5
ALF
Member
 
Registered: Oct 2002
Posts: 32

Original Poster
Rep: Reputation: 15
Mount SWAP

Ok, dd is to convert and copy a file. It started to make sense now. it is very much like creating a partition and formatting it with zeros.

I'm not really quite familiar with mount and how it work with directories. Is there a good tutorial for that or if you can explain to me how UNIX handle that?

I mean you can mount a partition as subdirectory or have many subdirectories under a single partition.

Thanks

Alf
 
Old 12-16-2003, 03:11 PM   #6
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304

Rep: Reputation: 65
here dd is creating a file of zeros.

you don't mount a swapfile. you just use swapon <filename>
you make an empty file a swap file with mkswap
 
  


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
Linux swap / solaris not appearing as swap in Ubuntu? Erik_the_Red Linux - Newbie 1 07-30-2005 12:57 PM
How to unmount actual swap and mount a new(bigger) swap space? isaac Linux - Newbie 1 06-06-2004 01:23 AM
Difference between Swap Virtrual memory and Swap Parition Nappa Slackware 4 11-27-2003 07:58 PM
swap area needs to be atleast 40 kB Sonderblade Linux - Hardware 1 11-18-2003 12:41 PM
Work area... bkeating General 19 11-10-2003 07:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:14 AM.

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