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

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

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 Comments

  1. Patrick foster December 16, 2015
  2. Olaf Heimburger February 28, 2014
  3. Lucas Jellema February 26, 2014
  4. Olaf Heimburger February 26, 2014