Storage is full for no reason

I am running OpenWrt 21.02 rc3 (ext4 image) on x86 Machine and suddenly my free space on /dev/root is zero and I can't install any new packages. I have the same amount of packages used when I was on 19.07 if not even less with the same configuration and everything. this is the output when I run the df command. does anyone know what is the problem?

`

root@OpenWrt:~# df -h`

`Filesystem Size Used Available Use% Mounted on`

`/dev/root 102.4M 102.3M 0 100% /`

`tmpfs 238.6M 352.0K 238.2M 0% /tmp`

`/dev/sda1 15.7M 4.8M 10.7M 31% /boot`

`/dev/sda1 15.7M 4.8M 10.7M 31% /boot`

`tmpfs 512.0K 0 512.0K 0% /dev`

`/dev/sda3 14.1G 49.9M 13.3G 0% /mnt/sda3`

also, I have some very small files on the system, and when I try to remove them the following error shows up which is not usual.
can't remove 'install.sh': Read-only file system

This usually results from writing log files to a persistent location on the / filesystem instead of /tmp. Use du to explore the total usage of each directory. After finding and stopping the process that is overfilling the system, remount read-write and delete the extra files.

I did run du and the total is way less than the size of the root partition

`root@OpenWrt:/# du -shx *`
`620.0K bin`
`4.7M boot`
`0 dev`
`1.0M etc`
`5.7M lib`
`0 lib64`
`4.0K lost+found`
`4.0K mnt`
`4.0K overlay`
`0 proc`
`8.0K rom`
`24.0K root`
`820.0K sbin`
`0 sys`
`356.0K tmp`
`19.4M usr`
`0 var`
`1.2M www`

I think I found the problem, for some reason sda2 (the root partition) is mounted as read-only and I don't know why or how to fix it. i tried to reboot but that did not help

Check the log it is probably filesystem error which you must fix manually with fsck. OpenWrt by default doesn't automatically try to repair filesystems.

1 Like

thanks, i ran e2fsck and now every thing is working fine. is there a way to make e2fsck run automatically at boot?

https://openwrt.org/docs/guide-user/storage/fstab?s=check_fs#the_global_section

1 Like

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