Your JFFS2-partition seems full and overlayfs is mounted read-only

Hi

I saw in LuCI that rrd statistics not got updated. So I begin troubleshooting...

I login to router and see

Your JFFS2-partition seems full and overlayfs is mounted read-only.
Please try to remove files from /overlay/upper/... and reboot!

I do

df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root                 2816      2816         0 100% /rom
tmpfs                    62256      1892     60364   3% /tmp
/dev/mtdblock9           11008     10836       172  98% /overlay
overlayfs:/overlay       11008     10836       172  98% /
tmpfs                      512         0       512   0% /dev

I see that my log file 50 MB on an external USB stick

du -sh * | sort -h
54.0K	rrd
49.2M	logs

I delete the log files and reboot

Then the login message is gone.

But the files I deleted was on an external USB disk attached to router. It should not matter how big this is?

My rrd stats also on USB stick / external

Can you explain me? What did I do wrong?

I do not see any external USB being mounted... are you sure it's working properly?

3 Likes

You are right. My

/dev/sda2

device is gone. I see nothing in logs about it. Also not in fstab and other locations

What happened?

you thrashed it

uci show fstab; block info
2 Likes
uci show fstab; block info
fstab.@global[0]=global
fstab.@global[0].anon_swap='0'
fstab.@global[0].anon_mount='0'
fstab.@global[0].auto_swap='1'
fstab.@global[0].auto_mount='1'
fstab.@global[0].delay_root='5'
fstab.@global[0].check_fs='0'
fstab.@mount[0]=mount
fstab.@mount[0].target='/mnt/sda2'
fstab.@mount[0].uuid='122f58e9-a341-4854-a440-53230f2c23af'
fstab.@mount[0].enabled='0'
-ash: block: not found
1 Like

Make sure to install:
https://openwrt.org/packages/pkgdata/block-mount

In addition, if you want to use extroot:
https://openwrt.org/docs/guide-user/additional-software/extroot_configuration

3 Likes

If the external drive fails to mount, logs will be written to internal flash under /mnt until the jffs is full.

Avoid this by either making the mount point under /tmp or using two levels of directory, e.g. have /logs/ on the drive which becomes /mnt/logs/ when the drive is mounted, and does not exist (thus log files will fail to write, if the logging program doesn't create directories) when the drive is not mounted.

3 Likes

This does not look good...

Also does not look good!

Lots of packages was missing

Mon Jan 11 05:15:07 2021 daemon.err block: No "mount.ext4" utility available
Mon Jan 11 05:15:07 2021 daemon.err block: mounting /dev/sda2 (ext4) as /mnt/sda2 failed (25) - Not a tty

I solved it with

opkg update && opkg install block-mount kmod-fs-ext4 kmod-usb-storage kmod-usb-ohci kmod-usb-uhci e2fsprogs fdisk

and

uci set fstab.@mount[0].enabled='1' && uci commit fstab

but what happend? I did this stuff already

Now the device is working

/dev/sda2 7425344 33580 6994864 0% /mnt/sda2

1 Like

Perhaps you forgot to reinstall the packages after an upgrade?

2 Likes