Find the answer to your Linux question:
Results 1 to 7 of 7

Thread: Move Swap

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Enthusiast carlosponti's Avatar
    Join Date
    Dec 2004
    Location
    Oklahoma
    Posts
    560

    Move Swap


    i have an experiment i want to try with moving swap to another spare drive how would i move where my system looks for swap.

    basically here is what i want to do:

    i have a dual boot slackware and windows 2000 i am going to install a small drive and create a small partition for both windows swap and linux swap. now this can be a discussion area too because i would like people's opinions whether on both windows and linux whether this would make any difference in performance? i am still going to try doing this as an experiment however i am curious of what other people think that are more experienced with linux.
    Blog
    Registered Linux user 396557

  2. #2
    Linux Engineer
    Join Date
    Nov 2004
    Location
    Montreal, Canada
    Posts
    1,267
    Create a partition, give it a swap id, run 'mkswap', do 'swapon'.
    and/or
    Delete a swap partition.

    You can also create a swapfile, e.g from the man page:
    dd if=/dev/zero of=swapfile bs=1024 count=65536
    and then initialize it.

    Repartioning a working system can be tricky, though. If you've got enough RAM, swap's not generally an issue, really. I don't 'manage' mine at all - it's just there at need but I basically forget it's there.

    If you've got extra space you can have more than one partition, though, so you might just add to rather than delete or resize.

    Anyway - the relevant man pages (fdisk, cfdisk, mkswap, swapon, and so on) have lots of information.



    also, you could always... (I just though about this, and it might not work) create a swap partition where ever you feel like creating it, and change the location in your FSTAB!!! on second thought, that is probably the fastest way to do it... but I didnt test it
    \"Meditative mind\'s is like a vast ocean... whatever strikes the surface, the bottom stays calm\" - Dalai Lama
    \"Competition ultimatly comes down to one thing... a loser and a winner.\" - Ugo Deschamps

  3. #3
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    Location
    /dev/urandom
    Posts
    3,682
    Also make sure that you change/add your /etc/fstab entries for where your swap partition is located.
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer
    Join Date
    Nov 2004
    Location
    Montreal, Canada
    Posts
    1,267
    Quote Originally Posted by UgoDeschamps
    create a swap partition where ever you feel like creating it, and change the location in your FSTAB!!!
    Quote Originally Posted by sarumont
    Also make sure that you change/add your /etc/fstab entries for where your swap partition is located.
    Didn't I say so just playing
    \"Meditative mind\'s is like a vast ocean... whatever strikes the surface, the bottom stays calm\" - Dalai Lama
    \"Competition ultimatly comes down to one thing... a loser and a winner.\" - Ugo Deschamps

  6. #5
    hello
    basically its no matter where your swap lies, but keeping it in the current drive will reduce propagation time.

    use fdisk to make/delete swap partition.
    make sure you update your swap entry in /etc/fstab (just change the "/dev/hda"...others will remain the way they are.

  7. #6
    hello
    basically its no matter where your swap lies, but keeping it in the current drive will reduce propagation time.

    use fdisk to make/delete swap partition.
    make sure you update your swap entry in /etc/fstab (just change the "/dev/hda"...others will remain the way they are.

  8. #7
    Linux Enthusiast carlosponti's Avatar
    Join Date
    Dec 2004
    Location
    Oklahoma
    Posts
    560
    mainly the experiment is for windows because i run games on windows and pretty much everything else on linux. i am just a normal user pretty much. the thing is is windows swap is inherently crappy and i am try this experiment to isolate the swap in windows to see if i get a better performace out of it and to not getting a fragmented swap problem. i just decided to do the same with linux because i am still learning and i need to find stuff to do to gain more knowledge. it may be something if successful on the windows side i do when installing all windows systems is isolate the swap and hide it from the user.
    Blog
    Registered Linux user 396557

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •