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

4.20 and disk power down

Expand Messages
  • Robert Hammond
    The concept adopted with 4.x firmware of running from a hard disk O/S image in no doubt a big step forward, should stop many users from bricking there slugs
    Message 1 of 21 , May 30 2:55 AM
    • 0 Attachment
      The concept adopted with 4.x firmware of running from a hard disk O/S
      image in no doubt a big step forward, should stop many users from
      bricking there slugs etc.

      However one draw back to the concept of version 4.x firmware is with
      disk power down. My Maxtor disk will power down but also keeps
      powering up every so many minutes. I think that this is probably due
      to the various log files located in the /var folder being updated (not
      proven).

      So.....
      Is there any easy way to un-sling to hard disk but also the install the
      /var folder to a small ram disk as with previous firmware versions.
      Perhaps an option for this could be incorporated into later firmware
      revisions??
      --
      Robert Hammond
      PGP:0x154144DA
    • Gerald L. Clark
      ... Write yourself a diversion script. -- nslu-linux - glc
      Message 2 of 21 , May 30 9:54 AM
      • 0 Attachment
        Robert Hammond wrote:
        > The concept adopted with 4.x firmware of running from a hard disk O/S
        > image in no doubt a big step forward, should stop many users from
        > bricking there slugs etc.
        >
        > However one draw back to the concept of version 4.x firmware is with
        > disk power down. My Maxtor disk will power down but also keeps
        > powering up every so many minutes. I think that this is probably due
        > to the various log files located in the /var folder being updated (not
        > proven).
        >
        > So.....
        > Is there any easy way to un-sling to hard disk but also the install the
        > /var folder to a small ram disk as with previous firmware versions.
        > Perhaps an option for this could be incorporated into later firmware
        > revisions??
        > --
        > Robert Hammond
        > PGP:0x154144DA
        >
        >
        >
        Write yourself a diversion script.


        --
        nslu-linux - glc
      • Robert Hammond
        In message , Gerald L. Clark writes ... I will have a go at this. Is there any chance that
        Message 3 of 21 , May 30 12:47 PM
        • 0 Attachment
          In message <429B4557.8050400@...>, Gerald L. Clark
          <gerald_clark@...> writes
          >Robert Hammond wrote:
          >> The concept adopted with 4.x firmware of running from a hard disk O/S
          >> image in no doubt a big step forward, should stop many users from
          >> bricking there slugs etc.
          >>
          >> However one draw back to the concept of version 4.x firmware is with
          >> disk power down. My Maxtor disk will power down but also keeps
          >> powering up every so many minutes. I think that this is probably due
          >> to the various log files located in the /var folder being updated (not
          >> proven).
          >>
          >> So.....
          >> Is there any easy way to un-sling to hard disk but also the install the
          >> /var folder to a small ram disk as with previous firmware versions.
          >> Perhaps an option for this could be incorporated into later firmware
          >> revisions??
          >>
          >>
          >>
          >Write yourself a diversion script.
          >
          >
          I will have a go at this. Is there any chance that someone running
          3.18 could send by private email a copy of two scripts from /etc/rc.d/.
          I think that rc.1 and rc.sysinit should contain some coding that could
          be used.

          --
          Robert Hammond
          PGP:0x154144DA
        • Robert Hammond
          In message , Robert Hammond writes ... Thanks, I now have the two scripts, rc.sysinit seems to have
          Message 4 of 21 , May 31 1:18 PM
          • 0 Attachment
            In message <Rs1mVMBR32mCFwDZ@...>, Robert Hammond
            <rob.hammond@...> writes
            >In message <429B4557.8050400@...>, Gerald L. Clark
            ><gerald_clark@...> writes
            >>Robert Hammond wrote:
            >>> The concept adopted with 4.x firmware of running from a hard disk O/S
            >>> image in no doubt a big step forward, should stop many users from
            >>> bricking there slugs etc.
            >>>
            >>> However one draw back to the concept of version 4.x firmware is with
            >>> disk power down. My Maxtor disk will power down but also keeps
            >>> powering up every so many minutes. I think that this is probably due
            >>> to the various log files located in the /var folder being updated (not
            >>> proven).
            >>>
            >>> So.....
            >>> Is there any easy way to un-sling to hard disk but also the install the
            >>> /var folder to a small ram disk as with previous firmware versions.
            >>> Perhaps an option for this could be incorporated into later firmware
            >>> revisions??
            >>>
            >>>
            >>>
            >>Write yourself a diversion script.
            >>
            >>
            >I will have a go at this. Is there any chance that someone running
            >3.18 could send by private email a copy of two scripts from /etc/rc.d/.
            >I think that rc.1 and rc.sysinit should contain some coding that could
            >be used.
            >
            Thanks, I now have the two scripts, rc.sysinit seems to have the
            relevant ram disk scripts.
            --
            Robert Hammond
            PGP:0x154144DA
          • pTweety
            ... I m also interested in this. Can you please create a wiki pages which documents your steps? -- MFG Matthias Oh, well, I guess this is just going to be one
            Message 5 of 21 , Jun 2, 2005
            • 0 Attachment
              Robert Hammond wrote:

              > Thanks, I now have the two scripts, rc.sysinit seems to have the
              > relevant ram disk scripts.

              I'm also interested in this. Can you please create a wiki pages which
              documents your steps?


              --
              MFG Matthias

              Oh, well, I guess this is just going to be one of those lifetimes.
            • Robert Hammond
              In message , Matthias Appel writes ... I have generated an /unslung/rc.sysinit script file but it seems
              Message 6 of 21 , Jun 2, 2005
              • 0 Attachment
                In message <168038247.20050602203259@...>, Matthias Appel
                <lists@...> writes
                >Robert Hammond wrote:
                >
                >> Thanks, I now have the two scripts, rc.sysinit seems to have the
                >> relevant ram disk scripts.
                >
                >I'm also interested in this. Can you please create a wiki pages which
                >documents your steps?
                >
                I have generated an /unslung/rc.sysinit script file but it seems not to
                work as expected. Also had little time to sort this due to sick child
                in the house (now on the mend).

                The script section that I am using is basically unchanged from that used
                in 3.18 so sets up a small ram disk for /var and /dev. Something is
                failing here, a df command indicates that both /var or /dev are still
                running from hard disk!!. I am sure that this is because the ram disks
                are being cancelled in some way because /var and /dev also both exist in
                the existing disk tree structure as standard folders.

                Some advice is needed if possible

                What should I do with the existing /var /var.state /dev /dev.state
                folders in the disk tree??

                My gut feeling here is just to delete them all (booting to jffs2 and
                deleting through /mnt/sda1/) followed by a re-boot but I am not too sure
                of the outcome of this and would rather not rash my slug.

                Also not too sure of the function of /var.state and /dev.state.

                --
                Robert Hammond
                PGP:0x154144DA
              • Robert Hammond
                In message , Matthias Appel writes ... I am posting a working script here first for others to try, my
                Message 7 of 21 , Jun 3, 2005
                • 0 Attachment
                  In message <168038247.20050602203259@...>, Matthias Appel
                  <lists@...> writes
                  >Robert Hammond wrote:
                  >
                  >> Thanks, I now have the two scripts, rc.sysinit seems to have the
                  >> relevant ram disk scripts.
                  >
                  >I'm also interested in this. Can you please create a wiki pages which
                  >documents your steps?
                  >
                  I am posting a working script here first for others to try, my
                  intention is to post to the wiki in a few days if all is well.

                  Instructions-

                  Copy the following script section into a new file called rc.sysinit,
                  you need to locate this file in the /unslung folder located on the disk
                  drive and not the one located in the flash ram. To locate the correct
                  folder does depend if you are running off of the hd rootfs or not. The
                  best way to guarantee the correct unslung folder is to follow
                  /mnt/sda1/unslung (note - may be sda2 depending upon USB socket used for
                  disk drive).
                  chmod the file with permissions 755.


                  #!/bin/sh
                  # Intended for unslung firmware 4.x only
                  # Script section to create ramdisk for /var
                  mkdir -p /var/lock/samba >/dev/null

                  /bin/echo "Creating ramfs for /var:"
                  /bin/mount -t ramfs ramfs /mnt/tmpmnt -o maxsize=256
                  /bin/cp -rp /var/* /mnt/tmpmnt/
                  /bin/mkdir -p /var.state
                  /bin/mount -o bind /var /var.state
                  /bin/mount -o bind /mnt/tmpmnt /var
                  /bin/umount /mnt/tmpmnt
                  /bin/killall syslogd
                  /bin/killall klogd

                  # Return and continue execution of system rc.sysinit
                  return 1
                  # [EOF]


                  Re-boot your slug

                  Interestingly this ram disk does not show up when using the df command,
                  but does show when using the mount command. The slug disk drive does
                  seem to power down for extended periods so does seem to be working.


                  --
                  Robert Hammond
                  PGP:0x154144DA
                • Robert Hammond
                  In message , Robert Hammond writes ... Note that this does not work correctly, I just noticed that
                  Message 8 of 21 , Jun 3, 2005
                  • 0 Attachment
                    In message <gEdR28BifJoCFwGY@...>, Robert Hammond
                    <rob.hammond@...> writes
                    >In message <168038247.20050602203259@...>, Matthias Appel
                    ><lists@...> writes
                    >>Robert Hammond wrote:
                    >>
                    >>> Thanks, I now have the two scripts, rc.sysinit seems to have the
                    >>> relevant ram disk scripts.
                    >>
                    >>I'm also interested in this. Can you please create a wiki pages which
                    >>documents your steps?
                    >>
                    >I am posting a working script here first for others to try, my
                    >intention is to post to the wiki in a few days if all is well.
                    >
                    >Instructions-
                    >
                    >Copy the following script section into a new file called rc.sysinit,
                    >you need to locate this file in the /unslung folder located on the disk
                    >drive and not the one located in the flash ram. To locate the correct
                    >folder does depend if you are running off of the hd rootfs or not. The
                    >best way to guarantee the correct unslung folder is to follow
                    >/mnt/sda1/unslung (note - may be sda2 depending upon USB socket used for
                    >disk drive).
                    >chmod the file with permissions 755.
                    >
                    >
                    >#!/bin/sh
                    ># Intended for unslung firmware 4.x only
                    ># Script section to create ramdisk for /var
                    >mkdir -p /var/lock/samba >/dev/null
                    >
                    >/bin/echo "Creating ramfs for /var:"
                    >/bin/mount -t ramfs ramfs /mnt/tmpmnt -o maxsize=256
                    >/bin/cp -rp /var/* /mnt/tmpmnt/
                    >/bin/mkdir -p /var.state
                    >/bin/mount -o bind /var /var.state
                    >/bin/mount -o bind /mnt/tmpmnt /var
                    >/bin/umount /mnt/tmpmnt
                    >/bin/killall syslogd
                    >/bin/killall klogd
                    >
                    ># Return and continue execution of system rc.sysinit
                    >return 1
                    ># [EOF]
                    >
                    >
                    >Re-boot your slug
                    >
                    >Interestingly this ram disk does not show up when using the df command,
                    >but does show when using the mount command. The slug disk drive does
                    >seem to power down for extended periods so does seem to be working.
                    >
                    >
                    Note that this does not work correctly, I just noticed that my disk
                    shares in Windows are missing when this script section is loaded. Have
                    now removed it.

                    --
                    Robert Hammond
                    PGP:0x154144DA
                  • Robert Hammond
                    In message , Robert Hammond writes ... I do have one more important observation - when using the
                    Message 9 of 21 , Jun 5, 2005
                    • 0 Attachment
                      In message <MWY6iRB34LoCFwCa@...>, Robert Hammond
                      <rob.hammond@...> writes
                      >In message <gEdR28BifJoCFwGY@...>, Robert Hammond
                      ><rob.hammond@...> writes
                      >>In message <168038247.20050602203259@...>, Matthias Appel
                      >><lists@...> writes
                      >>>Robert Hammond wrote:
                      >>>
                      >>>> Thanks, I now have the two scripts, rc.sysinit seems to have the
                      >>>> relevant ram disk scripts.
                      >>>
                      >>>I'm also interested in this. Can you please create a wiki pages which
                      >>>documents your steps?
                      >>>
                      >>I am posting a working script here first for others to try, my
                      >>intention is to post to the wiki in a few days if all is well.
                      >>
                      >>Instructions-
                      >>
                      >>Copy the following script section into a new file called rc.sysinit,
                      >>you need to locate this file in the /unslung folder located on the disk
                      >>drive and not the one located in the flash ram. To locate the correct
                      >>folder does depend if you are running off of the hd rootfs or not. The
                      >>best way to guarantee the correct unslung folder is to follow
                      >>/mnt/sda1/unslung (note - may be sda2 depending upon USB socket used for
                      >>disk drive).
                      >>chmod the file with permissions 755.
                      >>
                      >>
                      >>#!/bin/sh
                      >># Intended for unslung firmware 4.x only
                      >># Script section to create ramdisk for /var
                      >>mkdir -p /var/lock/samba >/dev/null
                      >>
                      >>/bin/echo "Creating ramfs for /var:"
                      >>/bin/mount -t ramfs ramfs /mnt/tmpmnt -o maxsize=256
                      >>/bin/cp -rp /var/* /mnt/tmpmnt/
                      >>/bin/mkdir -p /var.state
                      >>/bin/mount -o bind /var /var.state
                      >>/bin/mount -o bind /mnt/tmpmnt /var
                      >>/bin/umount /mnt/tmpmnt
                      >>/bin/killall syslogd
                      >>/bin/killall klogd
                      >>
                      >># Return and continue execution of system rc.sysinit
                      >>return 1
                      >># [EOF]
                      >>
                      >>
                      >>Re-boot your slug
                      >>
                      >>Interestingly this ram disk does not show up when using the df command,
                      >>but does show when using the mount command. The slug disk drive does
                      >>seem to power down for extended periods so does seem to be working.
                      >>
                      >>
                      >Note that this does not work correctly, I just noticed that my disk
                      >shares in Windows are missing when this script section is loaded. Have
                      >now removed it.
                      >
                      I do have one more important observation - when using the above script,
                      the conf partition on /dev/sda2 either never mounts or is somehow
                      unmounted. The side effect of this is the dreaded disk un-formated
                      message in the web interface and hence all of the disk shares failing.
                      Luckily removing the script will recover from this.

                      Creating a ram disk for /var using an /unslung script may be impossible
                      with firmware 4.20 so could be better serviced at the slingbox stage in
                      a later firmware release.

                      Unfortunately the reason why this script section fails to work correctly
                      is beyond my knowledge so perhaps another user who wants reliable disk
                      spin down could take on this project.

                      --
                      Robert Hammond
                      PGP:0x154144DA
                    • Nathan Ellsworth
                      Would it be possible to put /var on a Linux-formatted USB thumb drive on the Drive 1 port and then put your spin-downable drive with all your other data on the
                      Message 10 of 21 , Jun 6, 2005
                      • 0 Attachment
                        Would it be possible to put /var on a Linux-formatted
                        USB thumb drive on the Drive 1 port and then put your
                        spin-downable drive with all your other data on the
                        Drive 2 port? Just a random thought ...

                        Nathan

                        --- Robert Hammond <rob.hammond@...> wrote:


                        ---------------------------------
                        In message <MWY6iRB34LoCFwCa@...>, Robert
                        Hammond
                        <rob.hammond@...> writes
                        >In message <gEdR28BifJoCFwGY@...>, Robert
                        Hammond
                        ><rob.hammond@...> writes
                        >>In message <168038247.20050602203259@...>,
                        Matthias Appel
                        >><lists@...> writes
                        >>>Robert Hammond wrote:
                        >>>
                        >>>> Thanks, I now have the two scripts, rc.sysinit
                        seems to have the
                        >>>> relevant ram disk scripts.
                        >>>
                        >>>I'm also interested in this. Can you please create
                        a wiki pages which
                        >>>documents your steps?
                        >>>
                        >>I am posting a working script here first for others
                        to try, my
                        >>intention is to post to the wiki in a few days if
                        all is well.
                        >>
                        >>Instructions-
                        >>
                        >>Copy the following script section into a new file
                        called rc.sysinit,
                        >>you need to locate this file in the /unslung folder
                        located on the disk
                        >>drive and not the one located in the flash ram. To
                        locate the correct
                        >>folder does depend if you are running off of the hd
                        rootfs or not. The
                        >>best way to guarantee the correct unslung folder is
                        to follow
                        >>/mnt/sda1/unslung (note - may be sda2 depending upon
                        USB socket used for
                        >>disk drive).
                        >>chmod the file with permissions 755.
                        >>
                        >>
                        >>#!/bin/sh
                        >># Intended for unslung firmware 4.x only
                        >># Script section to create ramdisk for /var
                        >>mkdir -p /var/lock/samba >/dev/null
                        >>
                        >>/bin/echo "Creating ramfs for /var:"
                        >>/bin/mount -t ramfs ramfs /mnt/tmpmnt -o maxsize=256
                        >>/bin/cp -rp /var/* /mnt/tmpmnt/
                        >>/bin/mkdir -p /var.state
                        >>/bin/mount -o bind /var /var.state
                        >>/bin/mount -o bind /mnt/tmpmnt /var
                        >>/bin/umount /mnt/tmpmnt
                        >>/bin/killall syslogd
                        >>/bin/killall klogd
                        >>
                        >># Return and continue execution of system rc.sysinit
                        >>return 1
                        >># [EOF]
                        >>
                        >>
                        >>Re-boot your slug
                        >>
                        >>Interestingly this ram disk does not show up when
                        using the df command,
                        >>but does show when using the mount command. The
                        slug disk drive does
                        >>seem to power down for extended periods so does seem
                        to be working.
                        >>
                        >>
                        >Note that this does not work correctly, I just
                        noticed that my disk
                        >shares in Windows are missing when this script
                        section is loaded. Have
                        >now removed it.
                        >
                        I do have one more important observation - when using
                        the above script,
                        the conf partition on /dev/sda2 either never mounts or
                        is somehow
                        unmounted. The side effect of this is the dreaded disk
                        un-formated
                        message in the web interface and hence all of the disk
                        shares failing.
                        Luckily removing the script will recover from this.

                        Creating a ram disk for /var using an /unslung script
                        may be impossible
                        with firmware 4.20 so could be better serviced at the
                        slingbox stage in
                        a later firmware release.

                        Unfortunately the reason why this script section fails
                        to work correctly
                        is beyond my knowledge so perhaps another user who
                        wants reliable disk
                        spin down could take on this project.

                        --
                        Robert Hammond
                        PGP:0x154144DA


                        [ Moderator Note: All new information should be
                        recorded in the Wiki at http://www.nslu2-linux.org ]



                        ---------------------------------
                        Yahoo! Groups Links

                        To visit your group on the web, go to:
                        http://groups.yahoo.com/group/nslu2-linux/

                        To unsubscribe from this group, send an email to:
                        nslu2-linux-unsubscribe@yahoogroups.com

                        Your use of Yahoo! Groups is subject to the Yahoo!
                        Terms of Service.





                        __________________________________
                        Discover Yahoo!
                        Get on-the-go sports scores, stock quotes, news and more. Check it out!
                        http://discover.yahoo.com/mobile.html
                      • Robert Hammond
                        In message , Nathan Ellsworth writes ... I have been thinking along the same
                        Message 11 of 21 , Jun 6, 2005
                        • 0 Attachment
                          In message <20050606173259.65445.qmail@...>, Nathan
                          Ellsworth <nathan@...> writes
                          >Would it be possible to put /var on a Linux-formatted
                          >USB thumb drive on the Drive 1 port and then put your
                          >spin-downable drive with all your other data on the
                          >Drive 2 port? Just a random thought ...
                          >
                          I have been thinking along the same lines but have little knowledge of
                          file systems located on a ram stick, my understanding is that the stick
                          would be formatted as vfat which could cause unpredictable problems for
                          a system folder.


                          Strange how a couple of days away can generate a solution to getting the
                          ram disk working.

                          I have been working backwards through the boot sequence contained in
                          rc.sysinit and rc.1 and have discovered that the earliest that I seem to
                          be able to create a working ram disk using a slightly modified script
                          with out any noticeable bad effects is at rc.bootbin :)

                          The next earlier script step is rc.1 its self, the script will fail if
                          booting this early :(

                          Very strange because it should boot before this, most probable reason
                          is that there does seem to be some strange script lines early in the
                          rc.1 file in 4.20 which can un-mount /dev/sda2 under certain
                          circumstances so could be some sort of conflict here.

                          I just need to test for another night or two so hope to post up a
                          working beta script some time over the next couple of days, followed by
                          a wiki page some days later.

                          Do note that some packages use the disk folder /opt/var rather than /var
                          for there log files (I think that samba3 is configured this way) so some
                          package.conf files made need attention for reliable disk spin down.

                          --
                          Robert Hammond
                          PGP:0x154144DA
                        • Robert Hammond
                          At last a working script for others to try. Short form Instruction (requires moderate slug knowledge) : - Copy the following script section into a new file
                          Message 12 of 21 , Jun 7, 2005
                          • 0 Attachment
                            At last a working script for others to try.



                            Short form Instruction (requires moderate slug knowledge) : -

                            Copy the following script section into a new file called rc.bootbin
                            using a unix style text editor, you need to locate this file in the
                            /unslung folder located on the disk drive and not the folder located in
                            the flash ram. To locate the correct folder does depend if you are
                            running off of the hd rootfs or not. The best way to guarantee the
                            correct unslung folder is to follow /mnt/sda1/unslung (note - may be
                            sda2 depending upon USB socket used for disk drive).
                            chmod the file with permissions 755.

                            #!/bin/sh
                            # /unslung/rc.bootbin
                            # Intended for unslung firmware 4.x only
                            # Script section to create ramdisk for /var

                            /bin/echo "Creating ramfs for /var:"
                            /bin/mount -t ramfs ramfs /mnt/tmpmnt -o maxsize=256
                            /bin/cp -rp /var/* /mnt/tmpmnt/
                            /bin/mkdir -p /var.state
                            /bin/mount -o bind /var /var.state
                            /bin/mount -o bind /mnt/tmpmnt /var
                            /bin/umount /mnt/tmpmnt

                            # Return and continue execution of system rc.
                            return 1
                            # [EOF]


                            --
                            Robert Hammond
                            PGP:0x154144DA
                          • Rod Whitby
                            ... Actually, it would be sda2 if you unslung to the conf partition instead of the data partition. It would be sdb1 or sdb2 if you used the disk2 port instead
                            Message 13 of 21 , Jun 7, 2005
                            • 0 Attachment
                              On 6/8/05, Robert Hammond <rob.hammond@...> wrote:
                              > The best way to guarantee the
                              > correct unslung folder is to follow /mnt/sda1/unslung (note - may be
                              > sda2 depending upon USB socket used for disk drive).

                              Actually, it would be sda2 if you unslung to the conf partition
                              instead of the data partition. It would be sdb1 or sdb2 if you used
                              the disk2 port instead of the disk1 port.

                              -- Rod
                            • mpmarks2000
                              Thanks so much for working on this Robert. I don t really want to use NSLU2 on a 24/7 basis unless I can get those drives to sleep somehow. large capacity 7200
                              Message 14 of 21 , Jun 15, 2005
                              • 0 Attachment
                                Thanks so much for working on this Robert. I don't really want to use
                                NSLU2 on a 24/7 basis unless I can get those drives to sleep somehow.
                                large capacity 7200 RPM drives get very hot and sweaty if they are
                                spinning in little boxes 24/7 - they wear out fast and make my
                                computer area hot too.

                                I have followed your instructions but I have yet to see my One Touch
                                go to sleep. Looking at /proc/mounts I can see that /var is on a
                                ramfs. But df shows /var still on the disk? So I'm a bit confused if
                                the script executed properly. Otherwise everything is working
                                normally. If I power the NSLU2 down the One Touch drives go to sleep
                                on time, but never if the Slug is awake.

                                I have a couple of questions for you.
                                1) How did you discover what processes were accessing the disk?
                                2) The script echos a note when it executes but I don't see the
                                message in /var/log/messages - is that simply because of timing or is
                                there a log entry somewhere that I missed?
                                3) Do you have other suggestions on how I can troubleshoot the
                                problem?

                                thanks!
                                /maurice



                                --- In nslu2-linux@yahoogroups.com, Robert Hammond <rob.hammond@n...>
                                wrote:
                                > At last a working script for others to try.
                                >
                                >
                                >
                                > Short form Instruction (requires moderate slug knowledge) : -
                                >
                                > Copy the following script section into a new file called rc.bootbin
                                > using a unix style text editor, you need to locate this file in the
                                > /unslung folder located on the disk drive and not the folder
                                located in
                                > the flash ram. To locate the correct folder does depend if you
                                are
                                > running off of the hd rootfs or not. The best way to guarantee
                                the
                                > correct unslung folder is to follow /mnt/sda1/unslung (note - may
                                be
                                > sda2 depending upon USB socket used for disk drive).
                                > chmod the file with permissions 755.
                                >
                                > #!/bin/sh
                                > # /unslung/rc.bootbin
                                > # Intended for unslung firmware 4.x only
                                > # Script section to create ramdisk for /var
                                >
                                > /bin/echo "Creating ramfs for /var:"



                                > /bin/mount -t ramfs ramfs /mnt/tmpmnt -o maxsize=256
                                > /bin/cp -rp /var/* /mnt/tmpmnt/
                                > /bin/mkdir -p /var.state
                                > /bin/mount -o bind /var /var.state
                                > /bin/mount -o bind /mnt/tmpmnt /var
                                > /bin/umount /mnt/tmpmnt
                                >
                                > # Return and continue execution of system rc.
                                > return 1
                                > # [EOF]
                                >
                                >
                                > --
                                > Robert Hammond
                                > PGP:0x154144DA
                              • mpmarks2000
                                An update. The script does work! My drive eventually went to sleep. Its not clear to me what Unslung is doing that keeps the drive active but eventually it
                                Message 15 of 21 , Jun 16, 2005
                                • 0 Attachment
                                  An update. The script does work! My drive eventually went to sleep.
                                  Its not clear to me what Unslung is doing that keeps the drive active
                                  but eventually it went to sleep. Possibly the failure of a backup job.

                                  So for my penance I added Robert's instructions to the Wiki as an
                                  update to the "how to set the timeout on One Touch drives". I'm still
                                  searching for a solution on how to put NON One Touch USB 2.0 drives to
                                  sleep from Linux.

                                  Thanks again Robert.
                                  /maurice

                                  --- In nslu2-linux@yahoogroups.com, "mpmarks2000" <marks@s...> wrote:
                                  > Thanks so much for working on this Robert. I don't really want to use
                                  > NSLU2 on a 24/7 basis unless I can get those drives to sleep somehow.
                                  > large capacity 7200 RPM drives get very hot and sweaty if they are
                                  > spinning in little boxes 24/7 - they wear out fast and make my
                                  > computer area hot too.
                                  >
                                  > I have followed your instructions but I have yet to see my One Touch
                                  > go to sleep. Looking at /proc/mounts I can see that /var is on a
                                  > ramfs. But df shows /var still on the disk? So I'm a bit confused if
                                  > the script executed properly. Otherwise everything is working
                                  > normally. If I power the NSLU2 down the One Touch drives go to sleep
                                  > on time, but never if the Slug is awake.
                                  >
                                  > I have a couple of questions for you.
                                  > 1) How did you discover what processes were accessing the disk?
                                  > 2) The script echos a note when it executes but I don't see the
                                  > message in /var/log/messages - is that simply because of timing or is
                                  > there a log entry somewhere that I missed?
                                  > 3) Do you have other suggestions on how I can troubleshoot the
                                  > problem?
                                  >
                                  > thanks!
                                  > /maurice
                                  >


                                  <some omitted>
                                  > > PGP:0x154144DA
                                • Robert Hammond
                                  In message , mpmarks2000 writes ... Thanks for adding it to the Wiki page, I have been meaning to do this for some
                                  Message 16 of 21 , Jun 16, 2005
                                  • 0 Attachment
                                    In message <d8rvj3+lusp@...>, mpmarks2000 <marks@...>
                                    writes
                                    >An update. The script does work! My drive eventually went to sleep.
                                    >Its not clear to me what Unslung is doing that keeps the drive active
                                    >but eventually it went to sleep. Possibly the failure of a backup job.
                                    >
                                    >So for my penance I added Robert's instructions to the Wiki as an
                                    >update to the "how to set the timeout on One Touch drives". I'm still
                                    >searching for a solution on how to put NON One Touch USB 2.0 drives to
                                    >sleep from Linux.
                                    >
                                    >/maurice
                                    >
                                    Thanks for adding it to the Wiki page, I have been meaning to do this
                                    for some time. Note that I have slightly changed and reformatted the
                                    Wiki page mainly so that cut and paste will work better with the script
                                    section.

                                    I have my disk set to power down on the minimum time setting, 5 minutes
                                    I think. Drive does still spin up always at midnight perhaps to check
                                    out any cron jobs, also spins up at other times for unknown reasons but
                                    does seem to sleep most of the time.

                                    --
                                    Robert Hammond
                                    PGP:0x154144DA
                                  • mpmarks2000
                                    I m actually running 5.5 now, but I was trying to track down why sda1 was active sometimes and why free memory kept disappearing and I found a problem with the
                                    Message 17 of 21 , Jul 12, 2005
                                    • 0 Attachment
                                      I'm actually running 5.5 now, but I was trying to track down why sda1
                                      was active sometimes and why free memory kept disappearing and I found
                                      a problem with the Samba config. Robert's rc.bootbin script puts /var
                                      in a ramfs (in memory). This is supposed to be limited to 256K but
                                      others have suggested that the ramfs memory limit is ignored, so more
                                      memory could be actually used.

                                      I noticed that the samba log file (in /var/log/samba/log.smbd) kept
                                      growing as the disks were accessed because of an error in the
                                      /etc/smb.conf. It contains the line 'username map = no' and tries to
                                      open a file called 'no' every time the samba disks are accessed. So
                                      the log keeps growing and growing because the file doesn't exist.
                                      Commenting out that line in /etc/samba doesnt work because its
                                      recreated on reboot. So I searched for all of the smb.conf files and
                                      changed them all. Lo and behold on reboot the line was gone and no
                                      more errors were logged. Free memory still seems to decrease (more
                                      slowly), but at least one problem is solved. I hope that this fixed in
                                      the next beta by removing the line or pointing usname map to the right
                                      file.

                                      /maurice

                                      --- In nslu2-linux@yahoogroups.com, Robert Hammond <rob.hammond@n...>
                                      wrote:
                                      > In message <d8rvj3+lusp@e...>, mpmarks2000 <marks@s...>
                                      > writes
                                      > >An update. The script does work! My drive eventually went to sleep.
                                      > >Its not clear to me what Unslung is doing that keeps the drive active
                                      > >but eventually it went to sleep. Possibly the failure of a backup job.
                                      > >
                                      > >So for my penance I added Robert's instructions to the Wiki as an
                                      > >update to the "how to set the timeout on One Touch drives". I'm still
                                      > >searching for a solution on how to put NON One Touch USB 2.0 drives to
                                      > >sleep from Linux.
                                      > >
                                      > >/maurice
                                      > >
                                      > Thanks for adding it to the Wiki page, I have been meaning to do this
                                      > for some time. Note that I have slightly changed and reformatted the
                                      > Wiki page mainly so that cut and paste will work better with the script
                                      > section.
                                      >
                                      > I have my disk set to power down on the minimum time setting, 5
                                      minutes
                                      > I think. Drive does still spin up always at midnight perhaps to check
                                      > out any cron jobs, also spins up at other times for unknown reasons
                                      but
                                      > does seem to sleep most of the time.
                                      >
                                      > --
                                      > Robert Hammond
                                      > PGP:0x154144DA
                                    • Robert Hammond
                                      In message , mpmarks2000 writes ... I also see this error, I already have a small rc.samba diversion script
                                      Message 18 of 21 , Jul 13, 2005
                                      • 0 Attachment
                                        In message <db0m73+hmlp@...>, mpmarks2000 <marks@...>
                                        writes
                                        <snip>
                                        >
                                        >I noticed that the samba log file (in /var/log/samba/log.smbd) kept
                                        >growing as the disks were accessed because of an error in the
                                        >/etc/smb.conf. It contains the line 'username map = no' and tries to
                                        >open a file called 'no' every time the samba disks are accessed. So
                                        >the log keeps growing and growing because the file doesn't exist.
                                        >Commenting out that line in /etc/samba doesnt work because its
                                        >recreated on reboot. So I searched for all of the smb.conf files and
                                        >changed them all. Lo and behold on reboot the line was gone and no
                                        >more errors were logged. Free memory still seems to decrease (more
                                        >slowly), but at least one problem is solved. I hope that this fixed in
                                        >the next beta by removing the line or pointing usname map to the right
                                        >file.
                                        >
                                        I also see this error, I already have a small rc.samba diversion script
                                        so will attempt a small script section to remove this line (should be
                                        quite easy) perhaps using the sed script command. If it works I will
                                        add it to the FAQ Wiki section.


                                        Note that I also have strange event entries in my
                                        /var/log/samba/log.nmbd log file.

                                        I am also running the /var folder in ram but must admit have not seen
                                        any reduction in free memory but will start to monitor it from today.
                                        I would have thought that the most likely culprit is a misbehaved
                                        package.

                                        Also not that I was under the impression (not too sure where from) that
                                        the Linksys firmware is configured with a cron job that periodically
                                        clears the log files from the /var folder.
                                        --
                                        Robert Hammond
                                        PGP:0x154144DA
                                      • Robert Hammond
                                        In message , Robert Hammond writes ... I have a tested script section for this, it needs to be
                                        Message 19 of 21 , Jul 13, 2005
                                        • 0 Attachment
                                          In message <AxmwliEz6X1CFwoF@...>, Robert Hammond
                                          <rob.hammond@...> writes
                                          >In message <db0m73+hmlp@...>, mpmarks2000 <marks@...>
                                          >writes
                                          ><snip>
                                          >>
                                          >>I noticed that the samba log file (in /var/log/samba/log.smbd) kept
                                          >>growing as the disks were accessed because of an error in the
                                          >>/etc/smb.conf. It contains the line 'username map = no' and tries to
                                          >>open a file called 'no' every time the samba disks are accessed. So
                                          >>the log keeps growing and growing because the file doesn't exist.
                                          >>Commenting out that line in /etc/samba doesnt work because its
                                          >>recreated on reboot. So I searched for all of the smb.conf files and
                                          >>changed them all. Lo and behold on reboot the line was gone and no
                                          >>more errors were logged. Free memory still seems to decrease (more
                                          >>slowly), but at least one problem is solved. I hope that this fixed in
                                          >>the next beta by removing the line or pointing usname map to the right
                                          >>file.
                                          >>
                                          >I also see this error, I already have a small rc.samba diversion script
                                          >so will attempt a small script section to remove this line (should be
                                          >quite easy) perhaps using the sed script command. If it works I will
                                          >add it to the FAQ Wiki section.
                                          >
                                          >
                                          >Note that I also have strange event entries in my
                                          >/var/log/samba/log.nmbd log file.
                                          >
                                          >I am also running the /var folder in ram but must admit have not seen
                                          >any reduction in free memory but will start to monitor it from today.
                                          >I would have thought that the most likely culprit is a misbehaved
                                          >package.
                                          >
                                          >Also not that I was under the impression (not too sure where from) that
                                          >the Linksys firmware is configured with a cron job that periodically
                                          >clears the log files from the /var folder.

                                          I have a tested script section for this, it needs to be combined into a
                                          working rc.samba text file such as the one on the Wiki at :-

                                          <http://www.nslu2-linux.org/wiki/HowTo/EnableWinsServer>

                                          The simple script section pasted below will search for the text
                                          username map = no
                                          if present will delete that line.


                                          sed -i -e '/username map \= no/d' /etc/samba/smb.conf


                                          --
                                          Robert Hammond
                                          PGP:0x154144DA
                                        • mpmarks2000
                                          Robert, what I was noticing was that the buffer memory+free memory dropped from 10M after a clean reboot to 1.5MB 24 hrs later. The probable cause is that
                                          Message 20 of 21 , Jul 13, 2005
                                          • 0 Attachment
                                            Robert, what I was noticing was that the buffer memory+free memory
                                            dropped from 10M after a clean reboot to 1.5MB 24 hrs later. The
                                            probable cause is that there are 2 more smbds running, making 4 total!
                                            At about 4MB each that accounts for the memory loss. I wish I knew why
                                            they were started.

                                            --- In nslu2-linux@yahoogroups.com, Robert Hammond <rob.hammond@n...>
                                            wrote:
                                            > In message <AxmwliEz6X1CFwoF@n...>, Robert Hammond
                                            > <rob.hammond@n...> writes
                                            > >In message <db0m73+hmlp@e...>, mpmarks2000 <marks@s...>
                                            > >writes
                                            > ><snip>
                                            > >>
                                            > >>I noticed that the samba log file (in /var/log/samba/log.smbd) kept
                                            > >>growing as the disks were accessed because of an error in the
                                            > >>/etc/smb.conf. It contains the line 'username map = no' and tries to
                                            > >>open a file called 'no' every time the samba disks are accessed. So
                                            > >>the log keeps growing and growing because the file doesn't exist.
                                            > >>Commenting out that line in /etc/samba doesnt work because its
                                            > >>recreated on reboot. So I searched for all of the smb.conf files and
                                            > >>changed them all. Lo and behold on reboot the line was gone and no
                                            > >>more errors were logged. Free memory still seems to decrease (more
                                            > >>slowly), but at least one problem is solved. I hope that this fixed in
                                            > >>the next beta by removing the line or pointing usname map to the right
                                            > >>file.
                                            > >>
                                            > >I also see this error, I already have a small rc.samba diversion
                                            script
                                            > >so will attempt a small script section to remove this line (should be
                                            > >quite easy) perhaps using the sed script command. If it works I will
                                            > >add it to the FAQ Wiki section.
                                            > >
                                            > >
                                            > >Note that I also have strange event entries in my
                                            > >/var/log/samba/log.nmbd log file.
                                            > >
                                            > >I am also running the /var folder in ram but must admit have not seen
                                            > >any reduction in free memory but will start to monitor it from today.
                                            > >I would have thought that the most likely culprit is a misbehaved
                                            > >package.
                                            > >
                                            > >Also not that I was under the impression (not too sure where from) that
                                            > >the Linksys firmware is configured with a cron job that periodically
                                            > >clears the log files from the /var folder.
                                            >
                                            > I have a tested script section for this, it needs to be combined
                                            into a
                                            > working rc.samba text file such as the one on the Wiki at :-
                                            >
                                            > <http://www.nslu2-linux.org/wiki/HowTo/EnableWinsServer>
                                            >
                                            > The simple script section pasted below will search for the text
                                            > username map = no
                                            > if present will delete that line.
                                            >
                                            >
                                            > sed -i -e '/username map \= no/d' /etc/samba/smb.conf
                                            >
                                            >
                                            > --
                                            > Robert Hammond
                                            > PGP:0x154144DA
                                          • Robert Hammond
                                            In message , mpmarks2000 writes ... I seem to remember a post some where inferring that if you disable the UPNP
                                            Message 21 of 21 , Jul 14, 2005
                                            • 0 Attachment
                                              In message <db4c8s+g40o@...>, mpmarks2000 <marks@...>
                                              writes
                                              >Robert, what I was noticing was that the buffer memory+free memory
                                              >dropped from 10M after a clean reboot to 1.5MB 24 hrs later. The
                                              >probable cause is that there are 2 more smbds running, making 4 total!
                                              >At about 4MB each that accounts for the memory loss. I wish I knew why
                                              >they were started.
                                              >
                                              I seem to remember a post some where inferring that if you disable the
                                              UPNP support in the Web interface under Administration/System then it
                                              will remove two of the running smbds.
                                              --
                                              Robert Hammond
                                              PGP:0x154144DA
                                            Your message has been successfully submitted and would be delivered to recipients shortly.