Re: using swap files - where do I activate at boot?
*- On 28 Dec, debuser@platinum.globalmart.com wrote about "using swap files - where do I activate at boot?"
> I inherited a Debian system running potato. The system occassionaly was
> running out of memory so I thought I should increase my virtual memory.
> Rather than repartitioning the hard drive to add another swap partition, I
> thought it would be best to just use a swap file. So, I've created the
> file with dd, made it a swap file with mkswap, and activated it with
> swapon, and it's working fine. My question is, what is the best way to
> activate the swap file at boot time?
>
Just add it to your /etc/fstab.
/path/to/swapfile none sw
It will get added to the swap at boot with the rest of the swap space. I
would recommend giving your swap partitions/files different priorities
in this case so that the faster partitions are higher priority and the
swap files are lower priority. See swapon(2) for more details.
/dev/of/swap/partition none sw,pri=1
/path/to/swapfile none sw,pri=0
HTH,
Brian Servis
--
------------------------------------------------------------------------
Mechanical Engineering | Never criticize anybody until you
Purdue University | have walked a mile in their shoes,
servis@purdue.edu | because by that time you will be a
http://www.ecn.purdue.edu/~servis | mile away and have their shoes.
Reply to: