Author Topic: Swap Files  (Read 511 times)

billy_gates

  • Member
  • **
  • Posts: 801
  • Kudos: 0
    • http://www.skinner.com/jeffberg
Swap Files
« on: 20 May 2003, 07:27 »
Is it possible for me to make my RH 8 use the / parition as the swap instead of a seperate dedicated partition?

jtpenrod

  • VIP
  • Member
  • ***
  • Posts: 675
  • Kudos: 105
Swap Files
« Reply #1 on: 21 May 2003, 11:49 »
Yes, however it's strongly disrecommended.
___________________________________
Live Free or Die: Linux

"There: now you'll never have to look at those dirty Windows anymore"
      --Daffy Duck
Live Free or Die: Linux
If software can be free, why can't dolphins?

SAJChurchey

  • Member
  • **
  • Posts: 246
  • Kudos: 0
    • http://sajchurchey.htmlplanet.com
Swap Files
« Reply #2 on: 21 May 2003, 13:17 »
It's not recommnended b/c frequent writes to / will cause it to need to be defragmented.
SAJChurchey                    

JH

  • Member
  • **
  • Posts: 40
  • Kudos: 0
Swap Files
« Reply #3 on: 21 May 2003, 13:28 »
quote:
Is it possible for me to make my RH 8 use the / parition as the swap instead of a seperate dedicated partition?


Sure. Even though as it was already said it's not the best solution. Actually you'll need to create a file of certain size (approximately two times bigger than your memory size) for swapping that's filled with zeroes by copying it from /dev/zero (that is a special device where zeroes are kept for further usage) with dd command. After that you'll have to find swapon command in your scripts (guess it was in rc.sysinit in RH) and make it turn your swap file on on start up OR (better) edit your /etc/fstab and put the appropriate line that your swap file is on by swapon -a command.

Err... Not very clear? Than do
man swapon
man swapoff
man kswapd
man dd
man fstab
...ad finitum

KernelPanic

  • VIP
  • Member
  • ***
  • Posts: 1,878
  • Kudos: 222
Swap Files
« Reply #4 on: 21 May 2003, 21:23 »
quote:
Originally posted by jtpenrod:
disrecommended



hmm, because that's a real word...
  ;)

[ May 21, 2003: Message edited by: Tux ]

Contains scenes of mild peril.

billy_gates

  • Member
  • **
  • Posts: 801
  • Kudos: 0
    • http://www.skinner.com/jeffberg
Swap Files
« Reply #5 on: 23 May 2003, 18:43 »
quote:
Originally posted by JH:


Sure. Even though as it was already said it's not the best solution. Actually you'll need to create a file of certain size (approximately two times bigger than your memory size) for swapping that's filled with zeroes by copying it from /dev/zero (that is a special device where zeroes are kept for further usage) with dd command. After that you'll have to find swapon command in your scripts (guess it was in rc.sysinit in RH) and make it turn your swap file on on start up OR (better) edit your /etc/fstab and put the appropriate line that your swap file is on by swapon -a command.

Err... Not very clear? Than do
man swapon
man swapoff
man kswapd
man dd
man fstab
...ad finitum




I'll see if I can make any sense of that... Thanks for your help