Re: [Dnsmasq-discuss] File System Access by Dnsmasq
Robert Pollai wrote: Hi, I am running dnsmasq on a NAS from Synology. The NAS puts its disks into standby if they are not needed and I want to move all files accessed by dnsmasq to a USB flash drive, so that dnsmasq won’t wake up the disks. So far I have done that for the log file and lease file by adding the following two lines to the configuration file: dhcp-leasefile=/volumeUSB1/dnsmasq/dnsmasq.lease log-facility=/volumeUSB1/dnsmasq/dnsmasq.log But still the disks seem to wake up when I switch one a device that fetches an IP via DHCP. Are there any other files that dnsmasq accesses, directly or through the operating system? Is the configuration file accessed regularly or only on startup? The configuration file is only read at startup. /etc/resolv.conf is checked regularly, but that's correlated with DNS queries, not DHCP transactions. You can use --no-poll to stop that. Those two files are the only ones written durring a DHCP transaction. Of course if you have a script configured that runs when a DHCP lease is created, that could do anything. Cheers, Simon. Thanks for your support, regards, Robert ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] File System Access by Dnsmasq
into standby if they are not needed and I want to move all files accessed by dnsmasq to a USB flash drive, so that dnsmasq won?t wake up the disks. So far I have done that for the log file and lease file by adding the following two lines to the configuration file: dhcp-leasefile=/volumeUSB1/dnsmasq/dnsmasq.lease log-facility=/volumeUSB1/dnsmasq/dnsmasq.log have you considered tmpfs or ramfs if you wont miss the log or lease in the event of shutdown ? The configuration file is only read at startup. /etc/resolv.conf is checked regularly, but that's correlated with DNS queries, not DHCP transactions. You can use --no-poll to stop that. Those two files are the only ones written durring a DHCP transaction. Of course if you have a script configured that runs when a DHCP lease is created, that could do anything. i wonder if you could symlink /etc/resolv.conf to a tmpfs or ramfs mounted filesystem, again if that works for you. matt
Re: [Dnsmasq-discuss] File System Access by Dnsmasq
Normal0 falsefalsefalseEN-US X-NONEX-NONE Hi Justin Simon, Thanks for your responses. I am already using the no-resolv option and the ls -la /proc/pid/fd gives me only sockets and pipes apart from the log and lease files. Not sure what is waking up the disks then. Maybe the NAS is not smart enough to know that dnsmasq accesses the files on the USB mount and just wakes up the disks for any file system access. Cheers, Robert Original-Nachricht Datum: Sun, 8 Aug 2010 13:38:11 -0500 Von: Justin McAteer jus...@jmcateer.com An: Robert Pollai rap.nosp...@gmx.net CC: dnsmasq-discuss@lists.thekelleys.org.uk Betreff: Re: [Dnsmasq-discuss] File System Access by Dnsmasq You can find all opened files by dnsmasq using the fd directory in the proc filesystem ls -la /proc/pid/fd or by using the command lsof Thanks, Justin McAteer On Sat, Aug 7, 2010 at 2:40 AM, Robert Pollai rap.nosp...@gmx.net wrote: Hi, I am running dnsmasq on a NAS from Synology. The NAS puts its disks into standby if they are not needed and I want to move all files accessed by dnsmasq to a USB flash drive, so that dnsmasq wonrsquo;t wake up the disks. So far I have done that for the log file and lease file by adding the following two lines to the configuration file: dhcp-leasefile=/volumeUSB1/dnsmasq/dnsmasq.lease log-facility=/volumeUSB1/dnsmasq/dnsmasq.log But still the disks seem to wake up when I switch one a device that fetches an IP via DHCP. Are there any other files that dnsmasq accesses, directly or through the operating system? Is the configuration file accessed regularly or only on startup? Thanks for your support, regards, Robert ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] File System Access by Dnsmasq
You can find all opened files by dnsmasq using the fd directory in the proc filesystem ls -la /proc/pid/fd or by using the command lsof Thanks, Justin McAteer On Sat, Aug 7, 2010 at 2:40 AM, Robert Pollai rap.nosp...@gmx.net wrote: Hi, I am running dnsmasq on a NAS from Synology. The NAS puts its disks into standby if they are not needed and I want to move all files accessed by dnsmasq to a USB flash drive, so that dnsmasq won’t wake up the disks. So far I have done that for the log file and lease file by adding the following two lines to the configuration file: dhcp-leasefile=/volumeUSB1/dnsmasq/dnsmasq.lease log-facility=/volumeUSB1/dnsmasq/dnsmasq.log But still the disks seem to wake up when I switch one a device that fetches an IP via DHCP. Are there any other files that dnsmasq accesses, directly or through the operating system? Is the configuration file accessed regularly or only on startup? Thanks for your support, regards, Robert ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] File System Access by Dnsmasq
Justin McAteer (jus...@jmcateer.com) wrote on 8 August 2010 13:38: You can find all opened files by dnsmasq using the fd directory in the proc filesystem ls -la /proc/pid/fd or by using the command lsof Yes but this will only show what files are open at that moment; it's possible that other files are opened and closed from time to time. You could run strace -f -eopen dnsmasq and watch the output, or use the continuous monitoring of lsof.
[Dnsmasq-discuss] File System Access by Dnsmasq
Hi, I am running dnsmasq on a NAS from Synology. The NAS puts its disks into standby if they are not needed and I want to move all files accessed by dnsmasq to a USB flash drive, so that dnsmasq won’t wake up the disks. So far I have done that for the log file and lease file by adding the following two lines to the configuration file: dhcp-leasefile=/volumeUSB1/dnsmasq/dnsmasq.lease log-facility=/volumeUSB1/dnsmasq/dnsmasq.log But still the disks seem to wake up when I switch one a device that fetches an IP via DHCP. Are there any other files that dnsmasq accesses, directly or through the operating system? Is the configuration file accessed regularly or only on startup? Thanks for your support, regards, Robert