Loading ...
Sorry, an error occurred while loading the content.

Halfway solution for Cool'n'Quiet fun killer

Expand Messages
  • alien69_de
    Hi, I invested some time to find the fun killers of suspending the HDD. I noticed an occasional wakeup every few seconds. After some investigations with: find
    Message 1 of 2 , Aug 31, 2005
    • 0 Attachment
      Hi,

      I invested some time to find the fun killers of suspending the HDD. I noticed an occasional
      wakeup every few seconds. After some investigations with:

      find / -cmin -1

      after such a wakeup I realized the following two files are touched and changed:

      > /etc/samba/smbpasswd
      > /mnt/hda/spool/win/lock.pr

      I found a simple solution for the second one, it's created by the printer daemon. You can
      simply configure the location of such "*.pr" files in /etc/lpd.conf.

      For my solution, I configure lpd.conf the way it places those file under /var/tmp, which
      resides in RAM and not on the mount spool directory. This works fine for me and is stable
      over reboots.

      As a quick and dirty solution for the smbpasswd access, one can move the directory to /
      mnt/ram, too, and create a symbolic link under /etc. But before a shutdown, we have to
      save this directory back to /etc, otherwise changes regarding SAMBA are thrown away.

      I hope, this will help some guys for keeping there LS2 quiet and cool.

      Bye,

      Alien
    • alien69_de
      Hi, it s me again: Here s my quick solution for the smbpasswd problem: I changed /etc/init.d/smb the following way: start() { if [ -f /var/run/smbd.pid ] ;
      Message 2 of 2 , Aug 31, 2005
      • 0 Attachment
        Hi,

        it's me again: Here's my quick solution for the smbpasswd problem:

        I changed /etc/init.d/smb the following way:

        start()
        {
        if [ -f /var/run/smbd.pid ] ; then
        rm -f /var/run/smbd.pid
        fi
        if [ -f /var/run/nmbd.pid ] ; then
        rm -f /var/run/nmbd.pid
        fi
        if [ -f /var/run/winbindd.pid ] ; then
        rm -f /var/run/winbindd.pid
        fi

        # Quick'n'dirty hack to avoid disk access by samba
        # Copy stuff to ram-disk
        /bin/mv -b /etc/samba /mnt/ram/
        /bin/ln -s /mnt/ram/samba /etc/samba

        if [ $domain = on ] ; then
        echo "Start services: smbd nmbd winbindd"
        /usr/sbin/smbd -D
        /usr/sbin/nmbd -D
        /usr/sbin/winbindd
        logger -t ${tag} -p ${facility} -i 'Started smbd nmbd winbindd'
        else
        echo "Start services: smbd nmbd"
        /usr/sbin/smbd -D
        /usr/sbin/nmbd -D
        logger -t ${tag} -p ${facility} -i 'Started smbd nmbd'
        fi
        }

        stop()
        {
        if [ $domain = on ] ; then
        echo "Stop services: smbd nmbd winbindd"
        else
        echo "Stop services: smbd nmbd"
        fi
        /sbin/killall "smbd" > /dev/null 2>&1
        /sbin/killall "nmbd" > /dev/null 2>&1
        /sbin/killall "winbindd" > /dev/null 2>&1

        if [ -f /var/run/smbd.pid ] ; then
        rm -f /var/run/smbd.pid
        fi
        if [ -f /var/run/nmbd.pid ] ; then
        rm -f /var/run/nmbd.pid
        fi
        if [ -f /var/run/winbindd.pid ] ; then
        rm -f /var/run/winbindd.pid
        fi

        # Quick'n'dirty hack to avoid disk access by samba
        # Restore samba settings
        /bin/rm /etc/samba
        /bin/mv -b /mnt/ram/samba /etc/samba

        logger -t ${tag} -p ${facility} -i 'Started smbd nmbd winbindd'
        }

        This works fine for me at the moment. I would be pleased if there's
        someone out there to
        verify the changes I proposed today.

        Bye,

        Alien
      Your message has been successfully submitted and would be delivered to recipients shortly.