What happens if the disk is full?

I have a script that logs various things into non-volatile storage that happens to be on the main storage. What happens if the log file gets so big that it takes up all the remaining space? Do I need to build in some protective logic in order to prevent the system from crashing?

Most filesystems don't like to be filled up to 100%, jffs2 (which is often used as backing store for the overlay) in particular (it can turn read-only).

You may have a look to the package "logrotate" which is available for OpenWrt.
logrotate can be easily configured to archive logfiles as compressed gzip archives to save disk space. This may be the "logic" you are searching for :slight_smile: