Open sunindersingh opened 2 years ago
a)
It is possible there is a race condition on startup for AdGuard Home. There are a few potential network related conditions that will possibly be required but not available at the time AdGuard Home started, these mainly include:
If for example, a bind address is not available at the time of startup this will cause AdGuardHome to error and not start.
Changing the startup value to such a high value is not recommended. You are leaving your router without DNS functionality (if AdGuardHome is the primary DNS resolver) for much longer than it should be. The better solution is to investigate the race condition you are experiencing and potentially mitigate it or create a custom init script that runs before AdGuard Home attempts to start, to prevent it.
You should be able to understand why AdGuard Home did not start by looking at syslog, it should tell you what triggered the startup failure.
logread -e adguardhome
b)
By default, adguardhome uses /var/adguardhome
to store it's data. Under a default OpenWrt build /var
is a symlink to the /tmp
directory. You therefore might want to change this in order to preserve data, this could be a path such as /opt or /mnt if you have USB storage. You can adjust this by editing /etc/config/adguardhome
and changing the workdir
path then restart AdGuard Home.
logread -e adguardhome
a) service adguardhome disable b) vi /etc/init.d/adguardhome. Change Start from 21 to 99 and Stop 89 to 120. c) service adguardhome enable d) reboot
logread -e adguardhome Thu Apr 21 23:34:12 2022 daemon.err AdGuardHome[2379]: 2022/04/21 18:04:12.527610 [info] Initializing auth module: /tmp/adguardhome/data/sessions.db Thu Apr 21 23:34:14 2022 daemon.err AdGuardHome[2379]: 2022/04/21 18:04:14.581935 [info] saving filter 1 contents to: /tmp/adguardhome/data/filters/1.txt Thu Apr 21 23:34:15 2022 daemon.err AdGuardHome[2379]: 2022/04/21 18:04:15.347152 [info] saving filter 2 contents to: /tmp/adguardhome/data/filters/2.txt Thu Apr 21 23:34:16 2022 daemon.err AdGuardHome[2379]: 2022/04/21 18:04:16.147069 [info] saving filter 1650206064 contents to: /tmp/adguardhome/data/filters/1650206064.txt Thu Apr 21 23:34:16 2022 daemon.err AdGuardHome[2379]: 2022/04/21 18:04:16.345929 [info] saving filter 1650206065 contents to: /tmp/adguardhome/data/filters/1650206065.txt Thu Apr 21 23:34:20 2022 daemon.err AdGuardHome[2379]: 2022/04/21 18:04:20.503423 [info] saving filter 1650206066 contents to: /tmp/adguardhome/data/filters/1650206066.txt Thu Apr 21 23:34:22 2022 daemon.err AdGuardHome[2379]: 2022/04/21 18:04:22.189991 [info] saving filter 1650206067 contents to: /tmp/adguardhome/data/filters/1650206067.txt Thu Apr 21 23:34:22 2022 daemon.err AdGuardHome[2379]: 2022/04/21 18:04:22.309499 [info] saving filter 1650206068 contents to: /tmp/adguardhome/data/filters/1650206068.txt Thu Apr 21 23:34:22 2022 daemon.err AdGuardHome[2379]: 2022/04/21 18:04:22.338724 [info] saving filter 1650206069 contents to: /tmp/adguardhome/data/filters/1650206069.txt Thu Apr 21 23:34:22 2022 daemon.err AdGuardHome[2379]: 2022/04/21 18:04:22.367674 [info] saving filter 1650206070 contents to: /tmp/adguardhome/data/filters/1650206070.txt Thu Apr 21 23:34:22 2022 daemon.err AdGuardHome[2379]: 2022/04/21 18:04:22.394533 [info] saving filter 1650206071 contents to: /tmp/adguardhome/data/filters/1650206071.txt Thu Apr 21 23:34:22 2022 daemon.err AdGuardHome[2379]: 2022/04/21 18:04:22.538810 [info] saving filter 1650206072 contents to: /tmp/adguardhome/data/filters/1650206072.txt Thu Apr 21 23:34:24 2022 daemon.err AdGuardHome[2379]: 2022/04/21 18:04:24.074773 [info] saving filter 1650206073 contents to: /tmp/adguardhome/data/filters/1650206073.txt Thu Apr 21 23:34:24 2022 daemon.err AdGuardHome[2379]: 2022/04/21 18:04:24.099996 [info] saving filter 1650206074 contents to: /tmp/adguardhome/data/filters/1650206074.txt
logread | grep -i AdGuard Thu Apr 21 22:30:46 2022 daemon.err AdGuardHome[1461]: 2022/04/21 17:00:46.721464 [info] AdGuard Home, version v0.107.6 Thu Apr 21 22:30:47 2022 daemon.err AdGuardHome[1461]: 2022/04/21 17:00:47.007858 [info] Initializing auth module: /tmp/adguardhome/data/sessions.db Thu Apr 21 22:30:47 2022 daemon.err AdGuardHome[1461]: 2022/04/21 17:00:47.009930 [info] auth: initialized. users:1 sessions:0 Thu Apr 21 22:30:47 2022 daemon.err AdGuardHome[1461]: 2022/04/21 17:00:47.010222 [info] Initialize web module Thu Apr 21 22:30:47 2022 daemon.err AdGuardHome[1461]: 2022/04/21 17:00:47.074235 [error] starting dhcp server: dhcpv4: finding interface br-lan by name: route ip+net: no such network interface Thu Apr 21 22:30:47 2022 daemon.err AdGuardHome[1461]: 2022/04/21 17:00:47.081412 [info] AdGuard Home is available at the following addresses: Thu Apr 21 22:30:47 2022 daemon.err AdGuardHome[1461]: 2022/04/21 17:00:47.082612 [info] Go to http://192.168.1.1:8080 Thu Apr 21 22:30:47 2022 daemon.err AdGuardHome[1461]: 2022/04/21 17:00:47.089143 [info] Stopped Thu Apr 21 22:30:47 2022 daemon.err AdGuardHome[1461]: 2022/04/21 17:00:47.090084 [fatal] listen tcp 192.168.1.1:8080: bind: cannot assign requested address Thu Apr 21 22:38:01 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:01.806111 [info] AdGuard Home, version v0.107.6 Thu Apr 21 22:38:01 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:01.898028 [info] Initializing auth module: /tmp/adguardhome/data/sessions.db Thu Apr 21 22:38:01 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:01.898793 [info] auth: initialized. users:1 sessions:0 Thu Apr 21 22:38:01 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:01.899049 [info] Initialize web module Thu Apr 21 22:38:01 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:01.909383 [info] dhcpv4: listening Thu Apr 21 22:38:01 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:01.912810 [info] AdGuard Home is available at the following addresses: Thu Apr 21 22:38:01 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:01.913027 [info] Go to http://192.168.1.1:8080 Thu Apr 21 22:38:01 2022 daemon.err AdGuardHome[4222]: [dhcpv4] 2022/04/21 17:08:01 Server listening on 0.0.0.0:67 Thu Apr 21 22:38:01 2022 daemon.err AdGuardHome[4222]: [dhcpv4] 2022/04/21 17:08:01 Ready to handle requests Thu Apr 21 22:38:01 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:01.965192 [info] Starting the DNS proxy server Thu Apr 21 22:38:01 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:01.965414 [info] Ratelimit is enabled and set to 20 rps Thu Apr 21 22:38:01 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:01.965527 [info] The server is configured to refuse ANY requests Thu Apr 21 22:38:01 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:01.965632 [info] DNS cache is enabled Thu Apr 21 22:38:01 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:01.965795 [info] MaxGoroutines is set to 300 Thu Apr 21 22:38:01 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:01.965955 [info] Creating the UDP server socket Thu Apr 21 22:38:01 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:01.966627 [info] Listening to udp://192.168.1.1:53 Thu Apr 21 22:38:01 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:01.966774 [info] Creating a TCP server socket Thu Apr 21 22:38:01 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:01.967107 [info] Listening to tcp://192.168.1.1:53 Thu Apr 21 22:38:01 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:01.971610 [info] Entering the tcp listener loop on 192.168.1.1:53 Thu Apr 21 22:38:01 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:01.972222 [info] Entering the UDP listener loop on 192.168.1.1:53 Thu Apr 21 22:38:03 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:03.139684 [info] saving filter 1 contents to: /tmp/adguardhome/data/filters/1.txt Thu Apr 21 22:38:03 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:03.140164 [info] updated filter 1: 898187 bytes, 46549 rules Thu Apr 21 22:38:03 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:03.809800 [info] saving filter 2 contents to: /tmp/adguardhome/data/filters/2.txt Thu Apr 21 22:38:03 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:03.810273 [info] updated filter 2: 263586 bytes, 7050 rules Thu Apr 21 22:38:04 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:04.650454 [info] saving filter 1650206064 contents to: /tmp/adguardhome/data/filters/1650206064.txt Thu Apr 21 22:38:04 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:04.651017 [info] updated filter 1650206064: 1015361 bytes, 51802 rules Thu Apr 21 22:38:04 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:04.840515 [info] saving filter 1650206065 contents to: /tmp/adguardhome/data/filters/1650206065.txt Thu Apr 21 22:38:04 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:04.841286 [info] updated filter 1650206065: 10607 bytes, 154 rules Thu Apr 21 22:38:08 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:08.351655 [info] saving filter 1650206066 contents to: /tmp/adguardhome/data/filters/1650206066.txt Thu Apr 21 22:38:08 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:08.352179 [info] updated filter 1650206066: 295656 bytes, 10375 rules Thu Apr 21 22:38:10 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:10.049132 [info] saving filter 1650206067 contents to: /tmp/adguardhome/data/filters/1650206067.txt Thu Apr 21 22:38:10 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:10.049502 [info] updated filter 1650206067: 72389 bytes, 3683 rules Thu Apr 21 22:38:10 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:10.153273 [info] saving filter 1650206068 contents to: /tmp/adguardhome/data/filters/1650206068.txt Thu Apr 21 22:38:10 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:10.153699 [info] updated filter 1650206068: 192053 bytes, 6790 rules Thu Apr 21 22:38:10 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:10.180836 [info] saving filter 1650206069 contents to: /tmp/adguardhome/data/filters/1650206069.txt Thu Apr 21 22:38:10 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:10.181420 [info] updated filter 1650206069: 5758 bytes, 11 rules Thu Apr 21 22:38:10 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:10.209094 [info] saving filter 1650206070 contents to: /tmp/adguardhome/data/filters/1650206070.txt Thu Apr 21 22:38:10 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:10.209449 [info] updated filter 1650206070: 18544 bytes, 694 rules Thu Apr 21 22:38:10 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:10.238350 [info] saving filter 1650206071 contents to: /tmp/adguardhome/data/filters/1650206071.txt Thu Apr 21 22:38:10 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:10.238773 [info] updated filter 1650206071: 8219 bytes, 416 rules Thu Apr 21 22:38:10 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:10.426319 [info] saving filter 1650206072 contents to: /tmp/adguardhome/data/filters/1650206072.txt Thu Apr 21 22:38:10 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:10.426804 [info] updated filter 1650206072: 368556 bytes, 13822 rules Thu Apr 21 22:38:11 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:11.428872 [info] auth: user "admin" successfully logged in from ip 192.168.1.2 Thu Apr 21 22:38:21 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:21.821983 [info] saving filter 1650206073 contents to: /tmp/adguardhome/data/filters/1650206073.txt Thu Apr 21 22:38:21 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:21.822414 [info] updated filter 1650206073: 95898 bytes, 5228 rules Thu Apr 21 22:38:21 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:21.848091 [info] saving filter 1650206074 contents to: /tmp/adguardhome/data/filters/1650206074.txt Thu Apr 21 22:38:21 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:21.848461 [info] updated filter 1650206074: 13408 bytes, 378 rules Thu Apr 21 22:38:21 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:21.848562 [info] Updated filter #1. Rules: 0 -> 46549 Thu Apr 21 22:38:21 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:21.848828 [info] Updated filter #2. Rules: 0 -> 7050 Thu Apr 21 22:38:21 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:21.848979 [info] Updated filter #1650206064. Rules: 0 -> 51802 Thu Apr 21 22:38:21 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:21.849053 [info] Updated filter #1650206065. Rules: 0 -> 154 Thu Apr 21 22:38:21 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:21.849238 [info] Updated filter #1650206066. Rules: 0 -> 10375 Thu Apr 21 22:38:21 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:21.849320 [info] Updated filter #1650206067. Rules: 0 -> 3683 Thu Apr 21 22:38:21 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:21.849390 [info] Updated filter #1650206068. Rules: 0 -> 6790 Thu Apr 21 22:38:21 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:21.849458 [info] Updated filter #1650206069. Rules: 0 -> 11 Thu Apr 21 22:38:21 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:21.849528 [info] Updated filter #1650206070. Rules: 0 -> 694 Thu Apr 21 22:38:21 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:21.849597 [info] Updated filter #1650206071. Rules: 0 -> 416 Thu Apr 21 22:38:21 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:21.849665 [info] Updated filter #1650206072. Rules: 0 -> 13822 Thu Apr 21 22:38:21 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:21.849734 [info] Updated filter #1650206073. Rules: 0 -> 5228 Thu Apr 21 22:38:21 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:08:21.849806 [info] Updated filter #1650206074. Rules: 0 -> 378 Thu Apr 21 22:40:41 2022 daemon.err AdGuardHome[4222]: [dhcpv4] 2022/04/21 17:10:41 Handling request from 0.0.0.0:68 Thu Apr 21 22:40:42 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:10:42.482759 [info] dhcp: stored 1 leases in db Thu Apr 21 22:40:42 2022 daemon.err AdGuardHome[4222]: [dhcpv4] 2022/04/21 17:10:42 Handling request from 0.0.0.0:68 Thu Apr 21 22:40:42 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:10:42.495143 [info] dhcp: stored 1 leases in db Thu Apr 21 22:40:49 2022 daemon.err AdGuardHome[4222]: [dhcpv4] 2022/04/21 17:10:49 Handling request from 0.0.0.0:68 Thu Apr 21 22:40:49 2022 daemon.err AdGuardHome[4222]: [dhcpv4] 2022/04/21 17:10:49 Handling request from 0.0.0.0:68 Thu Apr 21 22:40:50 2022 daemon.err AdGuardHome[4222]: [dhcpv4] 2022/04/21 17:10:50 Handling request from 0.0.0.0:68 Thu Apr 21 22:40:50 2022 daemon.err AdGuardHome[4222]: [dhcpv4] 2022/04/21 17:10:50 Handling request from 0.0.0.0:68 Thu Apr 21 22:40:50 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:10:50.792353 [info] dhcp: stored 2 leases in db Thu Apr 21 22:40:50 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:10:50.795828 [info] dhcp: stored 2 leases in db Thu Apr 21 22:40:50 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:10:50.799345 [info] dhcp: stored 2 leases in db Thu Apr 21 22:40:50 2022 daemon.err AdGuardHome[4222]: [dhcpv4] 2022/04/21 17:10:50 Handling request from 0.0.0.0:68 Thu Apr 21 22:40:50 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:10:50.853724 [info] dhcp: stored 2 leases in db Thu Apr 21 22:43:56 2022 daemon.err AdGuardHome[4222]: [dhcpv4] 2022/04/21 17:13:56 Handling request from 0.0.0.0:68 Thu Apr 21 22:43:57 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:13:57.732366 [info] dhcp: stored 3 leases in db Thu Apr 21 22:43:57 2022 daemon.err AdGuardHome[4222]: [dhcpv4] 2022/04/21 17:13:57 Handling request from 0.0.0.0:68 Thu Apr 21 22:43:57 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:13:57.741072 [info] dhcp: stored 3 leases in db Thu Apr 21 22:56:30 2022 daemon.err AdGuardHome[4222]: [dhcpv4] 2022/04/21 17:26:30 Handling request from 0.0.0.0:68 Thu Apr 21 22:56:30 2022 daemon.err AdGuardHome[4222]: [dhcpv4] 2022/04/21 17:26:30 Handling request from 0.0.0.0:68 Thu Apr 21 22:56:31 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:26:31.282466 [info] dhcp: stored 4 leases in db Thu Apr 21 22:56:31 2022 daemon.err AdGuardHome[4222]: [dhcpv4] 2022/04/21 17:26:31 Handling request from 0.0.0.0:68 Thu Apr 21 22:56:31 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:26:31.332789 [info] dhcp: stored 4 leases in db Thu Apr 21 22:56:31 2022 daemon.err AdGuardHome[4222]: [dhcpv4] 2022/04/21 17:26:31 Handling request from 0.0.0.0:68 Thu Apr 21 22:56:31 2022 daemon.err AdGuardHome[4222]: 2022/04/21 17:26:31.390094 [info] dhcp: stored 4 leases in db
By default, adguardhome uses
/var/adguardhome
to store it's data. Under a default OpenWrt build/var
is a symlink to the/tmp
directory. You therefore might want to change this in order to preserve data, this could be a path such as /opt or /mnt if you have USB storage. You can adjust this by editing/etc/config/adguardhome
and changing theworkdir
path then restart AdGuard Home.
cat /etc/config/adguardhome config adguardhome config
option workdir /var/adguardhome
And this folder orders, My USB disk already mounted on overlay and any settings changes save even after reboot except "DHCP static leases"
find / -iname adg* /etc/config/adguardhome /etc/init.d/adguardhome /etc/adguardhome.yaml /lib/upgrade/keep.d/adguardhome /overlay/upper/etc/config/adguardhome /overlay/upper/etc/adguardhome.yaml /overlay/upper/etc/init.d/adguardhome /overlay/upper/lib/upgrade/keep.d/adguardhome /overlay/upper/usr/bin/AdGuardHome /overlay/upper/usr/lib/opkg/info/adguardhome.conffiles /overlay/upper/usr/lib/opkg/info/adguardhome.control /overlay/upper/usr/lib/opkg/info/adguardhome.prerm /overlay/upper/usr/lib/opkg/info/adguardhome.postinst /overlay/upper/usr/lib/opkg/info/adguardhome.list /sys/fs/cgroup/services/adguardhome /tmp/adguardhome /usr/bin/AdGuardHome /usr/lib/opkg/info/adguardhome.conffiles /usr/lib/opkg/info/adguardhome.control /usr/lib/opkg/info/adguardhome.prerm /usr/lib/opkg/info/adguardhome.postinst /usr/lib/opkg/info/adguardhome.list
Thu Apr 21 22:30:47 2022 daemon.err AdGuardHome[1461]: 2022/04/21 17:00:47.074235 [error] starting dhcp server: dhcpv4: finding interface br-lan by name: route ip+net: no such network interface
This looks specific to the DHCP service, it would appear when AdGuard Home tried to start, it could not find the interface to bind to.
Yes this one is fixed by adding delay from 21 to 99 in startup script and its fixed as of now.
So my only issue is right now i am not able to trace where it storing "DHCP static leases". If I made any changes into Adguard it save all settings except "DHCP static leases". Once I reboot all setting change preserve expect "DHCP static leases"
Change the workdir value to a path that's not /tmp/adguardhome
. Anything in /tmp is going to be lost on a reboot. If you've got an exroot/USB storage configuration already.
Stop adguardhome
Move the current /tmp/adguardhome directory to somewhere like /mnt or /opt
Update the workdir value in /etc/config/adguardhome
Restart adguardhome.
You will also notice that your DNS stats are also lost for the same reason.
Ok let me try. Wait
Can you please suggest how to ensure it not lost even after reboot? I used default opkg install adguard after mounting USB stick. So i am not sure where to set path and which directory of USB!
Within /etc/config/adguardhome
is the workdir value. You need to change the path to the adguardhome data folder there. Where it exists on your router is entirely up to you, I would use /opt/ or /mnt so /opt/adguardhome or /mnt/sda1/adguardhome, providing that this is backed USB storage and isn't being written to your router flash, as this will cause heavy write cycles, so external storage recommended.
Within
/etc/config/adguardhome
find / -iname adguardhome /etc/config/adguardhome /etc/init.d/adguardhome /lib/upgrade/keep.d/adguardhome /overlay/upper/etc/config/adguardhome /overlay/upper/etc/init.d/adguardhome /overlay/upper/lib/upgrade/keep.d/adguardhome /overlay/upper/usr/bin/AdGuardHome /sys/fs/cgroup/services/adguardhome /tmp/adguardhome /usr/bin/AdGuardHome
I have so many adguardhome folder name with default opkg install adguardhome. I am not sure which one is mapped to "option workdir /var/adguardhome" right now. Any idea how to check /var link to USB stick by default by Openwrt??
It's currently mapped to /tmp/adguardhome. The default value of /var/adguardhome, is actually /tmp/adguardhome because /var is a symlink to the /tmp directory.
It's currently mapped to /tmp/adguardhome. The default value of /var/adguardhome, is actually /tmp/adguardhome because /var is a symlink to the /tmp directory.
So in that case should i change "option workdir /var/adguardhome" to "option workdir /tmp/adguardhome" or "option workdir /overlay/upper/etc/config/adguardhome" ??
You need to have USB backed storage first. What's the output of:
df -h
I need to see what your current storage mount points are, before recommending a new location.
root@OpenWrt:~# grep -e /overlay /etc/mtab /dev/sda1 /overlay ext4 rw,relatime 0 0 overlayfs:/overlay / overlay rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work 0 0 root@OpenWrt:~# df -h Filesystem Size Used Available Use% Mounted on /dev/root 3.8M 3.8M 0 100% /rom tmpfs 122.1M 6.1M 116.0M 5% /tmp /dev/sda1 7.3G 3.9G 3.0G 57% /overlay overlayfs:/overlay 7.3G 3.9G 3.0G 57% / tmpfs 512.0K 0 512.0K 0% /dev /dev/ubi0_1 24.3M 4.5M 18.6M 19% /rwm
Even in this article /var mapping is not mention anywhere. I used same instruction to configure USB stick.
https://openwrt.org/docs/guide-user/additional-software/extroot_configuration
df -h
root@OpenWrt:~# df -h Filesystem Size Used Available Use% Mounted on
/dev/root 3.8M 3.8M 0 100% /rom
tmpfs 122.1M 6.1M 116.0M 5% /tmp
/dev/sda1 7.3G 3.9G 3.0G 57% /overlay
overlayfs:/overlay 7.3G 3.9G 3.0G 57% /
tmpfs 512.0K 0 512.0K 0% /dev
/dev/ubi0_1 24.3M 4.5M 18.6M 19% /rwm
So in your case as you've got USB storage configured on your /overlay
partition, you can specify a path from root, so I'd do this.
Update workdir
to /opt/adguardhome
in the /etc/config/adguardhome
config.
service adguardhome stop
mkdir /opt
mv /tmp/adguardhome /opt
service adguardhome start
You AdguardHome data is now on a persistent storage path. It's now being written to the USB, not /tmp or flash space.
So in your case as you've got USB storage configured on your
/overlay
partition, you can specify a path from root, so I'd do this.Update
workdir
to/opt/adguardhome
in the/etc/config/adguardhome
config.service adguardhome stop mkdir /opt mv /tmp/adguardhome /opt service adguardhome start
You AdguardHome data is now on a persistent storage path. It's now being written to the USB, not /tmp or flash space.
Ok let me check. wait please.
service adguardhome start
Nope its not saving, Once reboot all DHCP static lease lost
Are your DNS logs and stats maintained across reboots? If not, I'd suggest the data isn't persistent.
Are your DNS logs and stats maintained across reboots? If not, I'd suggest the data isn't persistent.
Did'nt get you. I am using AdGuardHome DHCP service instead of Openwrt DNS/DHCP packs.
The objective is to assign Dynamic IP and Static IP reserve for device. Here Dynamic IP is working fine. Only issue Static IP reserve [DHCP static lease] flush once reboot. Did i misunderstood the feature??
Here the steps which i follow :-
Set static IP to desktop. ssh openwrt service adguard stop service odhcpd stop / service odhcpd disable service dnsmasq stop / service dnsmasq disable service adguard start https://x.x.x.x:8080/ > settings > dhcp > enable dhcp > interface br-lan That openwrt pack startup script need to edit. After reboot issue is fixed.
service adguardhome disable vi /etc/init.d/adguardhome. Change Start from 21 to 99 and Stop 89 to 120. service adguardhome enable reboot
service adguardhome stop mkdir /opt mv /tmp/adguardhome /opt vi /etc/config/adguardhome and workdir to /opt/adguardhome service adguardhome start
add DHCP static lease
Reboot and Check
Maintainer: @\ (find it by checking history of the package Makefile)
Environment: (ramips/mt7621, D-Link DIR-2660-A1, OpenWrt SNAPSHOT r19481-a5ac8ad0ba)
Description:
Hello,
Once i install adguardhome 0.107.6-1 from Openwrt there two issues i had notice.
a) It not autostart the service, so i manually change the /etc/init.d/adguardhome. "Start from 21 to 99 and Stop 89 to 120" and it fix. b) Now second issue is after reboot it lost all DHCP static leases [Mac / IP / Hostname] entries.
In my router already overlay configure on USB stick so just wondering how to preserve the settings? Because all other settings are saved except "DHCP static leases'