OpenWrt Forum Archive

Topic: unused space on tmpfs

The content of this topic has been archived on 6 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

When trying to add a few packages, I was surprised to get the error: 

* wfopen: //usr/lib/opkg/info/kmod-usb-ohci.prerm: No space left on device. (for example). 

I thought I had plenty - in fact purchased the TL WDR 4300 because it had ample room, without needing to use extroot.  Things in this context (flash, SoC) obviously work differently than what I am used to with physical disks .  Can anyone point me to good documentation fo help me understand how storage and partitionaing works with OpenWrt, and why I can't use the 61 MB tmpfs partition? Or can I? Is there a way to extend root to use some of the 61 MB unused on /tmp? Is there a parted like utility for this purpose? Sorry for the newb question, but I'm quite confused.

My specs:
Model    TP-Link TL-WDR4300 v1
Firmware Version    OpenWrt Chaos Calmer 15.05.1 / LuCI 15.05-149-g0d8bbd2 Release (git-15.363.78009-956be55)
Kernel Version    3.18.23

and partition layout:

root@OpenWrt:/proc# df -hT
Filesystem           Type            Size      Used Available Use% Mounted on
rootfs               rootfs          4.5M      4.4M    104.0K  98% /
/dev/root            squashfs        2.3M      2.3M         0 100% /rom
tmpfs                tmpfs          61.5M      1.3M     60.3M   2% /tmp
/dev/mtdblock3       jffs2           4.5M      4.4M    104.0K  98% /overlay
overlayfs:/overlay   overlay         4.5M      4.4M    104.0K  98% /
tmpfs                tmpfs         512.0K         0    512.0K   0% /dev

/tmp is RAM, you have plenty of free space because you have plenty of free RAM.
Use extroot.

And preferably upgrade to latest LEDE (17.01.4 at the moment).

The rootfs and overlay are the flash.  Rootfs contains the files that are part of the original flash image.  Overlay is where packages and other files you add later are stored.  There is a total of about 8 MB on that model since that is the size of the flash chip.

If you erase a package that was in rootfs, it doesn't reclaim any space in the flash chip.  You have to flash a new image that does not contain the package in the first place.

Tmpfs is in RAM.  It will be erased when the power is cut or the router is rebooted.  The default size is up to half of the physical RAM-- you have 61 MB because the WDR4300 has a 128 MB RAM chip.  RAM is allocated only as files are placed into tmpfs.  If the "drive" is mostly empty, the RAM is available for other uses.

The discussion might have continued from here.