Linux Trick with symbolic link to overcome folder storage and disk extension problems (for /tmp)

Lucas Jellema 4

I am no Linux wizard by any standard. During the installation of some piece of Oracle software, I ran into a an error, indicating that my /tmp folder had too little space.

image

The installer was right about that. Unfortunately, the /tmp folder was on a device that I could not extend. So I tried to persuade the installer to use a different location for its temporary files:

TEMP=/media/sf_host_temp/tmp

TMPDIR=/media/sf_host_temp/tmp

export TEMP TMPDIR

Unfortunately, the installer ignored these settings. I then tried to replace folder /tmp with a symbolic folder link, also named /tmp but referring to a folder on a different device with plenty of space. And that did the trick:

//save my current tmp folder
mv /tmp /tmp_bak

// create a symbolic link called /tmp that refers to /u01/tmp
ln -s /u01/tmpĀ  /tmp

//grant permissions on /u01/tmp to the whole wide world
chmod 777 /u01/tmp

At this point, the installer fortunately could do its job, happily using /u01/tmp as its temporary storage.

After the installation was complete, I removed the symbolic link and renamed /tmp_bak back to /tmp.

4 thoughts on “Linux Trick with symbolic link to overcome folder storage and disk extension problems (for /tmp)

  1. I really appreciate this
    I was installing a game on a linux machine, and kept running into disk usage errors, even though I knew I had plenty of available space. Turns out tmp was being filled, then kicking the updater. I made a symlink in the directory the game was using ‘/tmp/ankama/cache’ and finally, success.

  2. Hi Olaf,

    My problem was that redefining TMP and TEMP did not work in this case. I tried them – but alas… Hence the trick with the symbolic link.

    thanks for your reply.

    Lucas

Comments are closed.

Next Post

Typical

Facebook0TwitterLinkedinAfter a presentation by Lucas Jellema I decided to try something with types in Oracle. One of the issues posed in this presentation was that the type cannot self-reference. Neither direct nor indirect.   A table like the emp table cannot be expressed as an object type. The table has […]