Customise opennds logfile location

hi everyone ,i install opennds in my openwrt router and i use a USB stick as an external storage.my problems is after reboot i lose the files on /tmp that contains vouchers.txt,and i want to costumise this logfile to my usb stick instead of /tmp directory.please help i appreciate any answer

https://opennds.readthedocs.io/en/stable/

2 Likes

i have been visited this site much times and i didn't find any solution

You sure?

1 Like

yes sure.i can't find the method to costumise

You just posted a screenshot of the linked instructions. Since the documentation has now been posted by you - if you need more help, you may wish to to explain what issue you're having with the documentation or with following the instructions in the documentation.

the document has not explain how to costumise logfile from /tmp directory to external USB drive.what i screen is the only info that this document mentioned

You just posted a screenshot above of how to customize the log file from /tmp to another directory.

To be clear, the instructions explaining how to change/customize the log file from /tmp to another location are under the heading entitled "Local Log Mountpoint" - also, an example is provided:

  • You'll need to explain the issue you're having with following the instructions
  • If you need further information to use the instructions, feel free to let us know
1 Like

Checked the opennds conf files ?

Or, if there's an opennds dir in /tmp, where everything gets stored, simply soft link it.

1 Like

thank you so much.you mean to type this command : option log_mountpoint '/overlay'.overlay is my usb stick.

From https://opennds.readthedocs.io/en/stable/customize.html

The Configuration File
For all operating systems from openNDS v10.1.0 onwards, the configuration is kept in the file:

/etc/config/opennds

This appears to be standard OpenWrt UCI syntax. So I surmise there's an opennds config file located in the /etc/config/ directory.

You would add this option to that file:

option log_mountpoint '/overlay'

Really - OK (as I recall, overlay is a special directory in OpenWrt - but if you successfully configured it as /overlay - :+1: ).

1 Like

yes there is a file located in /etc/config/opennds.
i have to add this file to my usb or what ?
yes i have configured my usb as /overlay

As noted, you append this into your config file - or if it already exists with '/tmp' then edit it to '/overlay'.

ok i understand i have to change the config file from /tmp to /overlay.
ok thank you so much Sir

As @lleachii said, /overlay has special meaning in OpenWrt. It is a read/write partition where things like config changes can be stored and additional packages can be installed. It is not intended for regular and possibly intensive writing like in the case of a log file.

It seems, probably to give you more space for additional packages, your /overlay has been moved to usb storage.

Regardless, this should NOT be used for log file type of use, for the same reasons the built in flash should not be used for logging - it will be worn out by constant re-writing.
If you are lucky and your venue is quiet, a usb stick might last a few months, but if it is busy and you are unlucky it might not last even a few weeks. In your case the usb storage also contains critical operating system files, so be prepared for the router to eventually catastrophically fail.

What you should do is mount a secondary "disposable" usb stick, using a usb hub if necessary, and mount it at: /logs and set:
option log_mountpoint '/logs'

Then, come the day the logging usb stick fails, it is a simple matter of swapping it out, or even better, swap it out as part of regular maintenance before it fails.

1 Like

it's not a problem if the USB keep working just a few days,it's better than changing the config every reboot
my question is this command option log_mountpoint '/logs' enough to solve my problem without editing other opennds files

It is not a command. It is a config option. As posted earlier:
https://opennds.readthedocs.io/en/stable/config.html#local-log-mountpoint

You must make sure the usb storage is mounted at the configured mount point ie. /logs

1 Like


which file please ?

trial and error ?

do you mean payment?
no problem just solve it

1 Like