Low on space in /run

Solution 1:

In a post on Ask Ubuntu, korrident suggested a possible workaround:

Adding a mount command to the /etc/rc.local file:

mount -t tmpfs tmpfs /run -o remount,size=85M

Make sure that the script will "exit 0" on success or any other value on error. (Excerpt from the file.)

Solution 2:

I do not think that increasing the size of /run is necessary, but in case you do need to increase it try editing your /etc/fstab file. All mountpoints and most partitions are listed there. If your /run partition is a tmpfs(which it should be, at least according to https://askubuntu.com/questions/57297/why-has-var-run-been-migrated-to-run, I would confirm before following these instructions) then you can simply change the fstab line of your /run mount to something akin to the following:

none /dev/shm tmpfs defaults,size=8G 0 0

See how the size is declared right after defaults? Try doing that. You can use megabytes as well by using M:

none /dev/shm tmpfs defaults,size=100M 0 0

Reboot the computer after this and the changes should take place.

Edit: Scratch that, looks like Ubuntu creates the run partition using files in /etc/init and /etc/init.d and not via fstab. You'd have to look through those files and find the mount command that it uses to create run and edit it manually. I don't have a box to test this on right now, but try running this:

find /etc/init* -type f | xargs grep "mount"

OR

find /etc/init* -type f | xargs grep "run"

If it's being mounted via a bash script then this should find the file and line that does the mounting.

Solution 3:

Temporary increase tmpfs filesystem

1) Open /etc/fstab with vi or any text editor of your choice,

2) Locate the line of /dev/shm and use the tmpfs size option to specify your expected size,

e.g. 512MB:
tmpfs      /dev/shm      tmpfs   defaults,size=512m   0   0

e.g. 2GB:
tmpfs      /dev/shm      tmpfs   defaults,size=2g   0   0

after then

mount -o remount /dev/shm