I noticed recently that some of our compute nodes were getting a bit short on disk space, as we have a fairly large set of (multiple versions of) large applications installed into /opt
on each node rather than sharing those applications over NFS via /share/apps
(which is apparently the usual Rocks way).
In looking at this I noticed that the /install
directory on each compute node contained a complete copy of all packages installed during rebuild! In our case the /install
directory was using about 35GB, mostly because of multiple versions of Matlab and Mathematica being installed (which are up to 10GB each now…).
Anyhow, to avoid this you can convert from using the <packages>
XML tags in your extend-compute.xml
file to using a post-install script (the <post>
section) which calls yum install
explicitly for the packages you want to install.
Be sure to also run yum clean packages
regularly in the script, otherwise you’re just moving the packages from /install
into the yum package cache in /var/cache/yum
!
e.g. Convert this:
<package>opt-matlab-R2016a</package>
..into this:
<post>
yum install -y opt-matlab-R2016a
yum clean packages
</post>
This has allowed us to continue installing packages locally until we use up that extra 35GB 🙂