0

i have /tmp as a directory on my root partition i am running ubuntu 16.04 will creating a symlink for /tmp in my /var folder which have 650 GB of disk space will work for me ? i mean whether the disk space will be used from /var instead of root partition if i create a symlink by

ln -s /tmp /new/location/tmp

my df -h output looks like this

Filesystem             Size  Used Avail Use% Mounted on
udev                    16G     0   16G   0% /dev
tmpfs                  3.2G   13M  3.2G   1% /run
/dev/sda1              3.9G  2.9G 1012M  75% /
/dev/vg00/usr          4.8G  2.1G  2.5G  45% /usr
tmpfs                   16G     0   16G   0% /dev/shm
tmpfs                  5.0M     0  5.0M   0% /run/lock
tmpfs                   16G     0   16G   0% /sys/fs/cgroup
/dev/mapper/vg00-home  4.8G   11M  4.6G   1% /home
/dev/mapper/vg00-var   714G  106G  580G  16% /var
tmpfs   
2
  • It would be more sensible testing it on a non critical system before asking here; you also learn more through trial and error; the good thing about computers it that they replicate stuff very well PS. It will work, do not forget /tmp usually is mode 1777 Mar 1, 2018 at 15:11
  • Tnx! i didnt had any non critical system just a big server thats why i asked it so just to be sure that means partition on which i created the symlink will be used now for the storage ? :) Mar 2, 2018 at 4:26

1 Answer 1

0

What you are asking will not work.

Moving files to a symlink in /var that points to /tmp will still use space in root as the inode will still point to the /tmp directory located in root. You can verify this for yourself.

Your only options are to either move data from /tmp to another location or add space to your root LVM as that is where your /tmp directory resides.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .