On Fri, Dec 07, 2007 at 10:18:24PM +0000, Gilbert Fernandes wrote:

> On Fri, Dec 07, 2007 at 01:57:47PM -0800, Jake Conk wrote:
> 
> > I want to put my /tmp partition in RAM and I got the following example  
> > from the fstab's man page:
> > 
> > swap /tmp mfs rw,nodev,nosuid,-s=153600 0 0
> > 
> > The problem is that I don't want to have any swap in RAM, only my /tmp  
> > partition so I'm wondering if I simply remove the "swap" entry from  
> > that line if that would work?
> 
> technically, swap is never on memory. swap is memory written
> to the disk (when data is in memory it is either used or cache)
> 
> what you wrote is the correct way to create a partition in
> memory (i do the same for my swap, the difference is my disk
> is one 1 gb / and 95 Gb cgd disk but it is just for the fun
> of doing it, i am not yet that paranoid...)
> 
> i suggest you to keep the swap entry. on bsd systems it wont be
> used that much, and when it does you have usually trouble on your
> hands (your mileage and size of flames coming from the server
> might vary).
> 
> if you are worried and paranoid, you can create a partition,
> mounted on each boot with a random key for your swap and tmp and
> that key will be forgotten on each reboot and a new random one
> used.
> 
> keep the swap entry. the /tmp one is good and that's how
> you create one to put your /tmp in memory.

To the reader: if you feel confused after reading this, this is not
your fault.  It's just a lot of bad and confusing advice. 

        -Otto

Reply via email to