How to increase your /tmp partition size

You, UnixUbuntu
Back

The /tmp directory is just a directory. Most people who install Ubuntu do so by setting up one big partition, so /tmp doesn't really have a fixed size limit, aside from the size of the main Ubuntu installation. It is possible, though, to set up /tmp on a separate partition, and if that's how your system is configured, /tmp will have a separate fixed size. To know what you've got, you should look at the output of "df -h". This will produce something like this:

Run

root@ns4007621:/# df -h
Filesystem      Size  Used Avail Use% Mounted on
rootfs           20G   11G  8.0G  57% /
/dev/root        20G   11G  8.0G  57% /
none            3.2G  256K  3.2G   1% /run
none            5.0M     0  5.0M   0% /run/lock
none             16G     0   16G   0% /run/shm
/dev/md3         92G   11G   77G  12% /home
overflow         10M   52K   10M   1% /tmp

If you see a separate entry for /tmp, then you've got a separate /tmp partition; but if there's no separate entry for /tmp, it's just part of your main root (/) filesystem.
If you've got a separate /tmp partition, then you have just three choices for increasing its size:

Above source from Ubuntu Forum:

Now let's talk about how to increase the partition size in few steps:

Note : try with sudo if you only have sudo permissions

Step 1: Unmount the /tmp partition 

umount /tmp

In this case I've got these erros:

_umount: /tmp: device is busy._
 _(In some cases useful info about processes that use_
 _the device is found by lsof(8) or fuser(1))_

So the fix is really simple, check who is using the temp, run lsof | grep /tmp and stop all the programs that are using /tmp directory.

Step 2: Mount a new partition with bigger size (10485760 = 10MB)

mount -t tmpfs -o size=10485760,mode=1777 overflow /tmp

Done!

© Heshan Wanigasooriya.RSS

🍪 This site does not track you.