NFS Boot

Werner Schram wrschram at gmail.com
Sat Jan 16 19:34:43 UTC 2010


On 01/16/2010 05:33 PM, Mikie wrote:
> Hello,
>
> I am converting an Ubuntu 9.10 to NFS boot by coping files to the NFS
> root.
>
> My question is:
>
> Would it be better to create a local hard drive swap and file system for
> certain root dir?
>
> Should Tmp  be local rather than on the NFS root?
>
> Any suggestions on what to keep local would help.
>
> Thanks.
>
>    
I wouldn't recommend swap over nfs, not only because of the performance 
penalty, but mainly because I believe it isn't (fully) supported. I just 
tested (/srv/media is nfs mounted):

werner at yoda:~$ sudo swapon /srv/media/swaptest
swapon: /srv/media/swaptest: Invalid argument

dmesg says that the swap file has holes, which isn't the case if I mount 
the swap file on the host system. I googled a bit, but I couldn't find 
too much information. What I did find out is that there are some kernel 
patches to make it work:
http://kerneltrap.org/Linux/Swap_Over_NFS

You can mount /tmp as tmpfs. A tmpfs is a filesystem that resides in 
memory. If your system runs out of memory, the files in the tmpfs will 
written to your swap, so the impact should be minimal.

You could also consider putting the swap partition on a usb stick. That 
way you don't need a (noisy) harddisk on the nfs-hosts.

Werner




More information about the ubuntu-users mailing list