SUMARY: swap over NFS???

From: John M. Blasik (
Date: Wed Feb 06 1991 - 08:13:39 CST

I needed more swap on a workstation low on disk space and ended up adding:
         server:/usr/swap.client /swap/server nfs rw 0 0
         /swap/server swap swap rw 0 0

to "client"'s /etc/fstab in order to swap over NFS to a server with
bytes to spare. Since these additions to fstab looks wierd to me,
I asked if this is how it's susposed to be done.

Joe Pruett explains:
} network swapping is just one case of swapping to a file.
} therefore you have to be able to get to the file first
} (i.e. nfs mount that filesystem), then you can swap to it.

My fellow sun-managers who (are forced to ?-) do this
forgo the the swap-type fstab entry and add test in the rc or rc.local
and swapon if the file is mounted.

If I were going to make a habit out of this, I would probably do what
Diana Stockdale does:

} In our fstab we have
} server:/export/swap/client /usr/swap/client nfs rw,noquota
} In /etc/rc.local we test for the existence of the swap file, and if
} it is there we swapon it:
} #
} # More swap?
} #
} if [ -f /usr/swap/`hostname` ]; then
} swapon /usr/swap/`hostname` & (echo -n ' mswap' ) >/dev/console
} fi

For the short term, I will take David Grootwassink's advice and
move the user's files (/home stuff) to the server and swap on the local disk.
(A few respondents warn of the wrath of the network gods and cycle demons
that will rain down upon me if I swap over NFS.)

Long term is to leave the user's files on the server, upgrade the client
to 4.1 so I can get that nice juicy tmpfs /tmp with all this swap
space I have now.
Thanks to --
        jaf@Inference.COM (Jose Fernandez) (Dick St.Peters)
        "Grootwassink, David" <> (Fabrice Le Metayer)
        diana@mpl.UCSD.EDU (Diana Stockdale)
        tessi!joey@nosun.West.Sun.COM (Joe Pruett)

-- john

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:10 CDT