Quirks resulting from mounting an NFS at $HOME
While mounting our NFS at /home/
is convenient for users to share their data
between machines relatively transparently, there are some issues that crop up
from time to time. I want to document a list of these issues and mitigations
that I’ve come up with, so I’ll put that here.
opam
can’t enable switches: It seems thatopam
is not designed to run on an NFS, or maybe more precisely, our NFS has too high latency foropam
to work well. As such, putting yourOPAMROOT
on a different filesystem (namely/scratch
) is recommended. This can be done by adding the following line to your.bashrc
,.zshrc
, etc:export OPAMROOT=/scratch/$USER/.opam
Alternatively, you can check out something like
nfsopam.sh
.ghc
viaghcup
:ghcup
is the recommended tool to manageghc
versions. Upon install, it reads the environment variableGHCUP_INSTALL_BASE_PREFIX
, which allows you to select an alternative base installation location, probably a good idea, because Haskell compilation is already slow enough. Notably, this needs to be set when runningghcup
commands as well as during install, so it is best to put this in your.bashrc
/.zshrc
/etc:export GHCUP_INSTALL_BASE_PREFIX=/scratch/$USER