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 |
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. |
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 |
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. |
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 |
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 |
All times are GMT -5. The time now is 06:23 AM. |