Skip to content

Instantly share code, notes, and snippets.

@MawKKe
Created September 13, 2018 18:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save MawKKe/8261d76551490fea3de0df15a5ede5cf to your computer and use it in GitHub Desktop.
Save MawKKe/8261d76551490fea3de0df15a5ede5cf to your computer and use it in GitHub Desktop.
Not enough space on /tmp for Matlab install? No problem.
Problem scenario:
------------------
1) stupid Matlab installer wants to download several gigabytes into your /tmp directory.
2) You don't have "several gigabytes" available on your root partition (where /tmp is). The installer warns you and/or fails.
3) You DO have available disk space, but on some other disk/partition/wherever.
Solution:
----------
Run the command inside Linux filesystem namespace. For example:
sudo unshare --mount -- \
/bin/bash -c "mount -o bind,noexec,nosuid,nodev /foobar/tmp /tmp && sudo -u your_username ./matlab_R2018b_glnxa64/install"
So now the installer process runs as usual, but all writes into /tmp are actually written into /foobar/tmp,
which has lots and lots of space available. The installer succeeds. Hooray!
More info
----------
man namespaces
man unshare
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment