Move /tmp/ to an other partition

Hello,

I use a calculation program who dumps a lot of data in the /tmp/. When my sdb1 is full, the program stops and I lose all my work.

Is there a way to move my /tmp/ from my sdb1 to my sdb2. This is my /home/ partition and it has much more space.
Or can I make a symbolic link? If so, how?

Thanks for your help
Etienne

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sure… try a sym link if that works for you, and then remove the
/etc/fstab line for /tmp so it doesn’t try to mount it on boot. You may
need to do this with a LiveCD or something, and you’ll need to be sure
/home is mounted before anything needs /tmp which is probably okay,
though I haven’t tried it.

ln -s /home/tmp /tmp

Good luck.

Yeti AAA wrote:
> Hello,
>
> I use a calculation program who dumps a lot of data in the /tmp/. When
> my sdb1 is full, the program stops and I lose all my work.
>
> Is there a way to move my /tmp/ from my sdb1 to my sdb2. This is my
> /home/ partition and it has much more space.
> Or can I make a symbolic link? If so, how?
>
> Thanks for your help
> Etienne
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJkHEP3s42bA80+9kRAjGkAJ4k6B+vF2JS4hscz2X3mmuELDR/igCdHnES
PfIXwiy7YBfzzaFdZlXW1m8=
=bqYO
-----END PGP SIGNATURE-----

Hi,

As an alternative change the TMPDIR environment variable to point to the path you want, and try running the program to see the effect.

You may want to edit/create the /etc/bash.bashrc.local file to achieve this, e.g. have the lines

TMPDIR=/path_to_new_tmp_dir
export TMPDIR

Cheers

I prefer setting TMPDIR to, if you have plenty of RAM and swap space using tmpfs can avoid having the data pushed out to disk.