Sunday, 19 May 2013

"No space left on device" error in OpenWRT when there really is space

"No space left on device" error in OpenWRT when there really is space

I ran into a problem with my application running on OpenWRT, where I write files to /tmp which is in RAM. Even though df reports that about 0% is used:
root@OpenWrt:/tmp# df
Filesystem           1K-blocks      Used Available Use% Mounted on
rootfs                     576       212       364  37% /
/dev/root                 2560      2560         0 100% /rom
tmpfs                    14680        48     14632   0% /tmp
tmpfs                      512         0       512   0% /dev
/dev/mtdblock3             576       212       364  37% /overlay
overlayfs:/overlay         576       212       364  37% /
after I have written 3,640 0-byte files, I get the error "No space left on device".
Can anyone explain why this is happening? In the real world case, I wouldn't normally have a condition like this, as I would be deleting these files, but I need to take care of this condition anyway.

No comments:

Post a Comment