AdGuard corrupts rootfs_data?

I'm running OpenWrt on Dynalink DL-WRX36 (4cpu, 256MB flash, 1GB RAM). It was working fine, and I decided to install adguardhome on it, using external USB stick for external storage at /mnt/sda, and configured adguard for that as its working directory. I also installed zram-swap because without it adguard would crash after a day due to running out of RAM (because of large filtering lists, I suppose).

After about a week of proper function, the router crashed and would not come back after reboots. Investigation showed that boot process stops at a failed attempt to mount partition ubi0:2 (rootfs_data) due to corruption.
I had to re-flash firmware to resurrect the router.

Can this corruption of ubi0:2 (rootfs_data) partition be caused by adguard (its logs, perhaps)? Was that filesystem corruption or underlaying hardware corruption - is there a way to check it?

adguard version?
corrupt rootfs_data aka overlay can be fixed by recovery+firstboot, sysupgrade not needed.

You're not writing any logs, etc, to the flash, are you ?

2 Likes

I described the setup above. If it is writing to internal flash, it's by adguard design, not by myself.

I needed to do sysupgrade because I was trying to recover rootfs_data by dd'ing mtd20 (rootfs_1) to mtd18 (rootfs) and system no longer booted even in recovery mode.

I can't remember the version of adguard, but it was one of the newest ones (maybe v0.107.48) installed from some latest snaphot, because the version for 23.03.2 repo was too old to support adguard sync.

adguardhome package does not write in rootfs.
upstream 50MB blob does, and it is up to you to teach it out of it, like running it in container or so.

1 Like

Is it possible that the external USB drive mount dropped due to some error and then adgaurd started writing to flash memory instead?

Only if you're writing directly to the mount point folder.

1 Like

I am not, but the point of the mointpoint of /mnt/sda/adguardhome is to serve as something to be written directly to. When the external device drops, it exposes underlying rootfs to adguard's logging. Right?

It is vice versa but yes.