Make /tmp location configurable?

Please follow the below template, it will help us to help you!

Expected Behaviour:

FTL installs.

Actual Behaviour:

I'm running out of room in /tmp and the install fails as a result

Debug Token:

I can't run the debug script due to a lack of space on /tmp

Would it be possible to modify the install script to allow /tmp to be pointed at another directory? I recall when initially installing I ran into a problem with FTL that required that I edit the install scripts to replace /tmp with a directory I created at ~/tmp. This is due to raspbian installing with a verrrrry small (1MB) /tmp directory. I'd reinstall Raspbian with different options but the install runs from a disk image, as I'm sure you're aware. Lacking the knowledge on how to expand the partition in place, is it possible to specify another "scratch" directory to use during the install?

I don't recall if I changed something (and I still use a rather ancient Raspbian), but for me /tmp is not a dedicated partition:

# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       3,6G  3,0G  407M  89% /
devtmpfs        481M     0  481M   0% /dev
tmpfs           486M  1,2M  485M   1% /dev/shm
tmpfs           486M   50M  437M  11% /run
tmpfs           5,0M  4,0K  5,0M   1% /run/lock
tmpfs           486M     0  486M   0% /sys/fs/cgroup
/dev/mmcblk0p1   63M   22M   42M  35% /boot

Can you check if your /tmp is a tmpfs system (look at the output of mount)? If so, you can easily enlarge its size as it resides in memory only (not on the SD card).

running the latest version of Raspbian,

df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        30G  2.5G   26G   9% /
devtmpfs        460M     0  460M   0% /dev
tmpfs           464M     0  464M   0% /dev/shm
tmpfs           464M   47M  417M  11% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           464M     0  464M   0% /sys/fs/cgroup
/dev/mmcblk0p1   44M   23M   22M  51% /boot
tmpfs            93M     0   93M   0% /run/user/999
tmpfs            93M     0   93M   0% /run/user/1000

no /tmp ...

Please post the output of df -h so we can see what it is reporting. Thanks.

I figured out that /tmp is in fact a tmpfs partition, and tried upping it to 2M. However, I still ran into this problem near the end of the repair process: [✓] Pi-hole blocking is Enabled /opt/pihole/updatecheck.sh: line 22: cannot create temp file for here-document: No space left on device /opt/pihole/updatecheck.sh: line 22: cannot create temp file for here-document: No space left on device /opt/pihole/updatecheck.sh: line 22: cannot create temp file for here-document: No space left on device

Sorry for the bad formatting, but I'm not sure how to post a block of code on this platform.

Output of df -h:

Filesystem      Size  Used Avail Use% Mounted on
/dev/root        29G  5.6G   22G  21% /
devtmpfs        484M     0  484M   0% /dev
tmpfs           489M     0  489M   0% /dev/shm
tmpfs           489M   13M  476M   3% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           489M     0  489M   0% /sys/fs/cgroup
tmpfs           2.0M  2.0M  4.0K 100% /tmp
/dev/mmcblk0p1   41M   21M   21M  51% /boot
tmpfs            98M     0   98M   0% /run/user/1000

Are you running any ramdisk software?

It's vanilla Raspbian, I'm not aware of any ramdisk software.

I'm running things on a raspberry Pi 3B. I don't have /tmp mounted as tmpfs, but regularly use tmpfs mounts for other purposes

I would suggest to increase the size of /tmp
you can do this by editing /etc/fstab, using sudo nano /etc/fstab
you should see a line, something like:

tmpfs /tmp tmpfs nodev,nosuid,size=2M 0 0

change 2M into 8M or whatever size you want (if you can spare the memory).

walk the file, using the arrows until the cursor is on the M after the 2, press backspace and press 8
now save the file, by pressing <CTRL>o, press the <ENTER> key and press <CTRL>x
the editor will now close.
reboot your system
df -h should now show a size of 8.0M

try again to see if that resolves the space problem

good luck

edit
you can verify how much memory you can spare with free -m
you already have 3 x 489M of tmpfs mounts
/edit

edit2
checked again, /tmp isn't mounted by default on raspbian
you, or some software you installed, changed that
you should simply remove the tmpfs entry for /tmp from your /etc/fstab
the other big entries, as I indicated earlier (489M) are also mounted as tmpfs on my system, be it different (smaller) in size
/edit2

I concur. 1MB is just not enough for /tmp as it is a general purpose folder, also meant for "real" data, not only text files.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.