No space left (in /tmp)

I have a r7800, i can't upload anything to my tmp partition (this cause problem with the sysupgrade process...)
I have 70 mb free in my ram... How can i solve this or underestand from what is caused?

Tell us more about this:

You identified this as the cause...what happened?

the fact that i can't upload anything to tmp dir (ram) cause problem with sysupgrade. As i can't upload a full sysupgrade image the process tell me that the image file provided is not valid.
Also it's strange as the webui tells me that i have 70 mb free on the ram but when i use scp to upload a generic file i can only upload 9mb or less

(the strange part is that if i upload the same file to the rom (i have 100 mb free) i don't have any problem)

what do you have on ?

 df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 8.5M      8.5M         0 100% /rom
/dev/root                 8.5M      8.5M         0 100% /rom
tmpfs                   250.0M    720.0K    249.3M   0% /tmp
/dev/ubi0_1              51.9M    108.0K     49.1M   0% /overlay
overlayfs:/overlay       51.9M    108.0K     49.1M   0% /
ubi1:syscfg              70.2M    412.0K     66.2M   1% /tmp/syscfg
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/sda3                18.4G     11.1G      6.8G  62% /mnt/sda3

tmpfs value can be live changed

BusyBox v1.27.2 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 OpenWrt SNAPSHOT, r5933-a9ffe9fd75
root@No-More-Lag-Router:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                12.5M     12.5M         0 100% /rom
/dev/zram0               11.5M      2.7M      8.5M  24% /tmp
tmpfs                   233.9M         0    233.9M   0% /tmp/shm
/dev/ubi0_1              72.1M      2.1M     66.3M   3% /overlay
overlayfs:/overlay       72.1M      2.1M     66.3M   3% /
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/sda2               465.6G    167.3G    297.2G  36% /mnt/hard_disk
/dev/sdb1               931.5G    835.6G     95.9G  90% /mnt/hard_disk2

think there is something strange here o.o 2 tmpfs... zram0 ? wtf is hammening

so you see ?

zram0 !

zram0 shouldn't mount the entire ram and compress it?

so my router is living on only 11 mb O_O

I think is configurable somewhere

then this is a bug / problem with the default configuration... zram should give better performance not worse o.o

zram is useful only if you don't have ram, no way better performance, as is live compressing files

that's ok but this is not normal... also i didn't have this problem 1 month ago... i just select it in menuconfig. Any idea? Also on how configure it

sorry, didn't use it. google it..

ok found the init script..... think something here is broken...

and also this configuration should be added in luci!!! (think it's not even documented somewhere that with this option we set the size of zram)

zram_size()	# in megabytes
	local zram_size="$( uci -q get system.@system[0].zram_size_mb )"
	local ram_size="$( ram_size )"

	if [ -z "$zram_size" ]; then
		# e.g. 6mb for 16mb-routers or 61mb for 128mb-routers
		echo $(( $ram_size / 2048 ))
		echo "$zram_size"

ok this is strange... problem is not with package zram-swap (that mount half of the ram on swap)
but with kmod-zram

Thu Jan 25 23:01:17 2018 kernel: [    5.455755] zram: Added device: zram0
Thu Jan 25 23:01:17 2018 kernel: [    5.472720] zram0: detected capacity change from 0 to 16777216
Thu Jan 25 23:01:17 2018 kern.err kernel: [    5.955621] EXT4-fs (zram0): noquota option not supported
Thu Jan 25 23:01:17 2018 kernel: [    5.956980] EXT4-fs (zram0): mounted filesystem with ordered data mode. Opts: errors=continue,noquota
Thu Jan 25 23:01:17 2018 kernel: [    5.960178] init: Using up to 16384 kB of RAM as ZRAM storage on /mnt

actually i can't find who is mounting zram0 to /tmp..... for what i can see, zram0 should be mounted as swap and never as /tmp


so procd mount the wrong amount of ram...

Hi @Ansuel, I have exactly the same problem
/dev/zram0 is mounted as tmp with only 16MB
/dev/zram1 is mounted as swap with 4GB

I have 4GB in total. 16MB tmp quickly makes the system unusable. How can I change to procd ram mount for tmp? Is there any progress on this?