How to verify available storage

I have downloaded bash & pyton.... How do I see how much storage is left on my router?

From command line:

root@Router-J1900:~# df -kh
Filesystem                Size      Used Available Use% Mounted on
/dev/root               252.0M     39.3M    207.6M  16% /
tmpfs                     1.9G      3.5M      1.9G   0% /tmp
/dev/sda1                15.7M      4.0M     11.4M  26% /boot
/dev/sda1                15.7M      4.0M     11.4M  26% /boot
tmpfs                   512.0K         0    512.0K   0% /dev
root@Router-J1900:~#
2 Likes

Many OpenWrt installs use an overlay system. For most OpenWrt systems, that will start causing you significant problems with less than about 200 kB.

jeff@office:~$ df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                10.0M     10.0M         0 100% /rom
tmpfs                    60.8M    184.0K     60.6M   0% /tmp
/dev/mtdblock4            4.4M      1.6M      2.8M  36% /overlay
overlayfs:/overlay        4.4M      1.6M      2.8M  36% /
tmpfs                   512.0K         0    512.0K   0% /dev

(The above from an Archer C7v2 with 16 MB of flash)

The critical line there is

overlayfs:/overlay        4.4M      1.6M      2.8M  36% /

/tmp/ is, as its name suggests, temporary storage. It is in memory and does not survive reboots. It also "goes against" your total RAM available for run-time applications and the kernel.

3 Likes

I got this:

Filesystem                Size      Used Available Use% Mounted on
/dev/root                 2.5M      2.5M         0 100% /rom
tmpfs                    61.1M      6.5M     54.6M  11% /tmp
/dev/mtdblock5           27.9M     12.1M     15.7M  44% /overlay
overlayfs:/overlay       27.9M     12.1M     15.7M  44% /
tmpfs                   512.0K         0    512.0K   0% /dev

Can I uninstall & recover space?

  • Uninstalling packages you have installed manually after flashing your device -> spaced used by these packages will be available again
  • Uninstalling packages which are included in the image you have flashed -> spaced used by these packages will NOT be available again
2 Likes

You appear to have over 15 MB of available space on your /overlay for additional packages.

tmomas' advice is important. If you do not have enough space for what you want to install, you would need to build your own ROM, either with the image builder or with the build system. Incorporating a package into ROM very roughly halves its flash consumption as the ROM is highly compressed (xz -9 for most targets I've worked with).

1 Like

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