publicarray / spksrc

Cross compilation framework to create native packages for the Synology's NAS
https://synocommunity.com/
Other
66 stars 14 forks source link

Working with spundown HDDs? #2

Closed gymnae closed 6 years ago

gymnae commented 6 years ago

Thanks for the package, I installed it and it seems to work most of the time, but I'm not sure if it works when the disks of a disk station are spun down. In my use cases, the HDDs are not always "on" to save power and wear.

If this packages creates logs or a cache, would it be possible to define the location of created or altered files to use a USB stick for r/w activity instead? Then the proxy would react immediately, even when the disks are spun down and thus avoid a DNS requester to use a fallback (e.g. the ISP DNS)

publicarray commented 6 years ago

@Gymnae Hm that's an interesting thought, I have to get back to you on that one.

You can however change the log file location and even disable it by commenting out the log_file= directive in the configuration file. If you have a blacklist file or clocking rules I think they are kept in memory (pinging @jedisct1 to confirm?) same with the cache.

Occasionally the public-resolvers.md file and the signature file are updated. I'm not sure how often this happens? @jedisct1 could you help me out here? It is possible to change the file path if you like. (cache_file = 'public-resolvers.md')

I think that covers everything that requires disk access.

to use a fallback (e.g. the ISP DNS)

Does this mean you have a more than one DNS address configured via the DSM in the network settings? if so in my experience they are not only used for fallback. An OS with multiple configured DNS servers tend to load balances between them. I think most OSs prefer the first one while others prefer the the faster one, but in my experience both are used.

https://serverfault.com/questions/84291/how-does-windows-decides-which-dns-server-to-use-when-resolving-names

jedisct1 commented 6 years ago

Log files and resolver files can be anywhere. Just replace the file name with an absolute or relative path in the configuration file. They can even be stored into /tmp. Automatic rotation will prevent them from filling the memory.

By default, public-resolvers.md (and other sources) is refreshed every 3 days. This can be changed with the refresh_delay parameter.

gymnae commented 6 years ago

Thank you, @publicarray and @jedisct1 - For me this answers my issue and I will configure accordingly. Thanks for your both very helpful work to help more people have a safer Internet.