Disk space issues and log rotation. (OpenWRT) #3161

Open
opened 2026-03-04 03:06:16 -05:00 by deekerman · 3 comments
Owner

Originally created by @mercyground on GitHub (Nov 3, 2021).

Originally assigned to: @ainar-g on GitHub.

Prerequisites

Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • [X ] I am running the latest version
  • [X ] I checked the documentation and found no answer
  • [X ] I checked to make sure that this issue has not already been filed

Issue Details

  • Version of AdGuard Home server:

    • Updating from v0.107.0-a.198+1e729601 to v0.107.0-a.199+2fc10848.
  • How did you install AdGuard Home:

    • Originally installed via AGH script. Edge build
  • If it's a router or IoT, please write device model:

    • BT Home Hub 5
  • CPU architecture:

    • (MIPS)
  • Operating system and version:

    • ( OpenWrt 21.02.0, r16279-5cc0535800)

Expected Behavior

Currently AGH copies its binary and config to the /opt/AdGuardHome/agh-backup folder on upgrade. However it does not appear to check for available diskspace before it does so and thus on limited space filesystems AGH fails the upgrade and does not report reason why on the control panel (however it does report on the router logs). A error message back to the web console would be appreciated.

Also AGH recently changed how it managed logs/query logging but there is no way to have it purge the old logs at the rotation leading to double the disk space needed?
github.com/AdguardTeam/AdGuardHome@1e72960140

At present i manage these issues by manually deleting the rotated logs and purging the backed up copy of AGH once it has updated to stop AGH running out of disk space. A method for managing this or even a warning to the console that disk space is low would be a good addition.

Originally created by @mercyground on GitHub (Nov 3, 2021). Originally assigned to: @ainar-g on GitHub. ### Prerequisites Please answer the following questions for yourself before submitting an issue. **YOU MAY DELETE THE PREREQUISITES SECTION.** - [X ] I am running the latest version - [X ] I checked the documentation and found no answer - [X ] I checked to make sure that this issue has not already been filed ### Issue Details <!-- Please include all relevant details about the environment you experienced the bug in. If possible, include the result of running `./AdGuardHome -v --version` from the installation directory. --> * **Version of AdGuard Home server:** * Updating from v0.107.0-a.198+1e729601 to v0.107.0-a.199+2fc10848. * **How did you install AdGuard Home:** * Originally installed via AGH script. Edge build * **If it's a router or IoT, please write device model:** * BT Home Hub 5 * **CPU architecture:** * (MIPS) * **Operating system and version:** * ( OpenWrt 21.02.0, r16279-5cc0535800) ### Expected Behavior <!-- A clear and concise description of what you expected to happen. --> Currently AGH copies its binary and config to the /opt/AdGuardHome/agh-backup folder on upgrade. However it does not appear to check for available diskspace before it does so and thus on limited space filesystems AGH fails the upgrade and does not report reason why on the control panel (however it does report on the router logs). A error message back to the web console would be appreciated. Also AGH recently changed how it managed logs/query logging but there is no way to have it purge the old logs at the rotation leading to double the disk space needed? https://github.com/AdguardTeam/AdGuardHome/commit/1e72960140cbc5f932650f2202ec6290a70185c0 At present i manage these issues by manually deleting the rotated logs and purging the backed up copy of AGH once it has updated to stop AGH running out of disk space. A method for managing this or even a warning to the console that disk space is low would be a good addition.
Author
Owner

@ainar-g commented on GitHub (Nov 3, 2021):

Thank you for your report! The error message should definitely be added / improved. As for the log rotation and doubling, #3404 should allow you to simply set a lower custom value for log rotation.

@ainar-g commented on GitHub (Nov 3, 2021): Thank you for your report! The error message should definitely be added / improved. As for the log rotation and doubling, #3404 should allow you to simply set a lower custom value for log rotation.
Author
Owner

@mercyground commented on GitHub (Nov 3, 2021):

As part of the upgrade a simple disk space check should be done maybe?

So you click the upgrade and it checks to see if there is space and warns you to fix the issue rather than a failed upgrade would be a better experience.

The logging space issues can be managed by just keeping shorter logs on OpenWRT or limited space devices.

@mercyground commented on GitHub (Nov 3, 2021): As part of the upgrade a simple disk space check should be done maybe? So you click the upgrade and it checks to see if there is space and warns you to fix the issue rather than a failed upgrade would be a better experience. The logging space issues can be managed by just keeping shorter logs on OpenWRT or limited space devices.
Author
Owner

@ainar-g commented on GitHub (Dec 30, 2021):

Okay, so after some researching, I'm not sure that we'll be able to do this properly in the v0.107 cycle. In order to know if there is enough disk space, we'll need to get the data about the compressed and uncompressed size of the release, and that information is currently unavailable to us.

Besides, our update procedure just generally needs a refactoring, and that's supposed to happen in the v0.108 cycle, see #2630.

@ainar-g commented on GitHub (Dec 30, 2021): Okay, so after some researching, I'm not sure that we'll be able to do this properly in the v0.107 cycle. In order to know if there is enough disk space, we'll need to get the data about the compressed and uncompressed size of the release, and that information is currently unavailable to us. Besides, our update procedure just generally needs a refactoring, and that's supposed to happen in the v0.108 cycle, see #2630.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/AdGuardHome#3161
No description provided.