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

Lucas Jellema 4
0 0
Read Time:58 Second

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.

About Post Author

Lucas Jellema

Lucas Jellema, active in IT (and with Oracle) since 1994. Oracle ACE Director and Oracle Developer Champion. Solution architect and developer on diverse areas including SQL, JavaScript, Kubernetes & Docker, Machine Learning, Java, SOA and microservices, events in various shapes and forms and many other things. Author of the Oracle Press book Oracle SOA Suite 12c Handbook. Frequent presenter on user groups and community events and conferences such as JavaOne, Oracle Code, CodeOne, NLJUG JFall and Oracle OpenWorld.
Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

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

After 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 […]
%d bloggers like this: