Thanks, we'll have a check.
Thank you for your feedback. We are currently check this issue.This is a great way to expand route overlay memory size by setting another overlay partition in the external storage device.You deleted the adguardhome for v0.107.50, copied v0.107.21, but after restarting, it became v0.107.50.I repeated your operation, but I didn't encounter such a problem. Can you describe it more carefully. Normally, if you copy to/usr/bin or/overlay/upper/usr/bin, both will be synchronized.
I added the sd card and formatted with ext4. In luci, I set it to be the overlay and rebooted. On reboot I downloaded the new version of AdGuardHome to /tmp, extracted and installed following my script here. I did this both manually and automated via the script above to the same effect. Whenever I write to /overlay/upper/usr/bin it is not synchronized with /usr/bin as you can see from the output above. The old version reappears each time until another reboot which the new version takes effect. I’ve now repeated this on multiple sd cards.
Tested again today and /overlay is still having issues. Here's the raw code of commands I did after copying the new adguardhome version into /mnt/mmcblk0/upper/usr/bin
root@GL-MT1300:~# ls -lah /usr/bin/AdGuardHome
-rwxr-xr-x 0 root root 32.8M May 30 17:48 /usr/bin/AdGuardHome
root@GL-MT1300:~# ls -lah /mnt/mmcblk0/upper/usr/bin/AdGuardHome
-rwxr-xr-x 1 root root 32.8M Jun 6 11:54 /mnt/mmcblk0/upper/usr/bin/AdGuardHome
root@GL-MT1300:~# ps |grep -I adguardhome
4887 root 558m S /usr/bin/AdGuardHome -c /etc/adguardhome.yaml -w /mnt/mmcblk0/etc/adguardhome --no-check-update
15896 root 1316 S grep -I adguardhome
root@GL-MT1300:~# cp /usr/bin/AdGuardHome /mnt/mmcblk0/upper/usr/bin/AdGuardHome
root@GL-MT1300:~# ls -lah /usr/bin/AdGuardHome
-rwxr-xr-x 0 root root 32.8M May 30 17:48 /usr/bin/AdGuardHome
root@GL-MT1300:~# ls -lah /mnt/mmcblk0/upper/usr/bin/AdGuardHome
-rwxr-xr-x 1 root root 32.8M Jun 6 12:00 /mnt/mmcblk0/upper/usr/bin/AdGuardHome
root@GL-MT1300:~# /etc/rc.
rc.button/ rc.common rc.d/ rc.local
root@GL-MT1300:~# /etc/rc.d/S21adguardhome stop
root@GL-MT1300:~# ps |grep -i adguardhome
21769 root 1316 S grep -i adguardhome
root@GL-MT1300:~# cp /usr/bin/AdGuardHome /mnt/mmcblk0/upper/usr/bin/AdGuardHome
root@GL-MT1300:~# ls -lah /usr/bin/AdGuardHome
-rwxr-xr-x 0 root root 32.8M May 30 17:48 /usr/bin/AdGuardHome
root@GL-MT1300:~# ls -lah /mnt/mmcblk0/upper/usr/bin/AdGuardHome
-rwxr-xr-x 1 root root 32.8M Jun 6 12:02 /mnt/mmcblk0/upper/usr/bin/AdGuardHome
root@GL-MT1300:~#
Going to reboot and will report back what shows up. In theory it should be the older version at this point
So even though I explicitly copied the older version from /usr/bin to overlay, on reboot the NEWER version is what's showing in /usr/bin
root@GL-MT1300:~# ls -lah /usr/bin/AdGuardHome
-rwxr-xr-x 1 root root 32.8M Jun 6 12:02 /usr/bin/AdGuardHome
root@GL-MT1300:~# ls -lah /mnt/mmcblk0/upper/usr/bin/AdGuardHome
-rwxr-xr-x 1 root root 32.8M Jun 6 12:02 /mnt/mmcblk0/upper/usr/bin/AdGuardHome
root@GL-MT1300:~#
There is definitely some bad bug here.
Sorry for replying so late.Why are you changing files in the upper dir?You should modify the files in the merge directory, because overayfs is not allowed to operate in upper and lowdir after mounting, which will result in some unpredictable results.This indicates that the overlay system itself is stable.
I have used your script to update AdGuardHome and it was successful. I directly copied it to/usr/bin and found that the files on both sides of/overlay/upper/usr/bin were successfully synchronized.
If you want to modify a file through the/upper directory, only if the file does not exist can you synchronize it with the merge directory after creation.
I’ll take another look but this seems like a serious limitation where you have a file system and path that is read/write capable but on write will not “sync” to another mounted location if the file already exists in another location. I’ll add logic to my script to ignore /upper/usr/bin.