Announcement

Collapse
No announcement yet.

Patch for HDD Standby on QNAP X09

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Patch for HDD Standby on QNAP X09

    Hello,

    i have written a patch to transfer the swapspace of a QNAP X09 to a USB memory stick. This patch also allows you to copy the SSODS installation and Squeezecenter to USB.

    Combined both, my QNAP TS109 pro goes into HDD Standby (even with Date/Time screensaver)

    Edit:
    Removed from server (new version see below)
    UsbUtil.zip

    Up to now it is a very beta version (which works well since one week on my system). You use it at your own risk.

    1. Download the file and copy it to Public share.
    2. open putty and go to public share
    3. Unzip the file with unzip
    4. install it with ./usbutil-ts.sh install usbutility.tar.gz
    5. start utility with ./usbutil.sh

    You will se a main menu where you can choose between Swap and SSOTS USB util

    For the use of the tool you have to plug a memory stick into the QNAP

    In the swap section, you can choose a USB device where you can put the swapspace. You can transfer the swap to this file and you can enable autostart during boot.

    In the SSOTS USB section you can copy the files to an usb device and you can enable autostart --> then the system will link /volume1 to usb if avail during startup and if ssods is located there. You can manually start and stop SSOTS and set the link.

    Please not that there is no guarantee that it works perfectly and please ensure that you have a backup of your data. You use this tool at your own risk

    mr_hyde
    Last edited by mr_hyde; 2008-03-30, 14:14.
    2 x Squeezebox 3 - 1 x Squeezebox Touch - Squeezecenter 7.9.1 / MusicIP in Container station - QNAP TS453A - 4 x 3 TB Hitachi (RAID5)

    #2
    Originally posted by mr_hyde View Post
    For the use of the tool you have to plug a memory stick into the QNAP
    Please note that the Stick is formatted with ext3 through Webinterface. FAT does not work!

    I will build in a check in the next version
    2 x Squeezebox 3 - 1 x Squeezebox Touch - Squeezecenter 7.9.1 / MusicIP in Container station - QNAP TS453A - 4 x 3 TB Hitachi (RAID5)

    Comment


      #3
      new version 0.2

      Hello,

      i have performed some improvements.


      Revision 0.2
      - Overall USB status can be displayed
      - Check, if USB fs is ext3
      - Public share is linked to USB -> Squeezecenter updates can be applied through SSOTS
      - 'Hook into autorun.sh' is included in usbutil.sh, since upgrade of SSOTS resets the adjustment.
      - install routine has different name: ./inst_usbutil_ts.sh

      Edit:
      Removed from server (new version see below)
      usbutil_r02.zip

      Patch works stable for me and tool goes also into standby during internet radio streaming.
      Last edited by mr_hyde; 2008-03-30, 14:14.
      2 x Squeezebox 3 - 1 x Squeezebox Touch - Squeezecenter 7.9.1 / MusicIP in Container station - QNAP TS453A - 4 x 3 TB Hitachi (RAID5)

      Comment


        #4
        Minor improvements -> 0.2a

        I've made just some minor improvements.

        - added SSODS startup check in general status
        - use of ps from SSODS since the regular ps can cause problems

        EDIT:
        removed from server
        usbutil_r02a.zip
        Last edited by mr_hyde; 2008-04-10, 20:05.
        2 x Squeezebox 3 - 1 x Squeezebox Touch - Squeezecenter 7.9.1 / MusicIP in Container station - QNAP TS453A - 4 x 3 TB Hitachi (RAID5)

        Comment


          #5
          Minor imrpovements and SMART HDD info r03

          2 x Squeezebox 3 - 1 x Squeezebox Touch - Squeezecenter 7.9.1 / MusicIP in Container station - QNAP TS453A - 4 x 3 TB Hitachi (RAID5)

          Comment


            #6
            I`ve just installed version r_03 and it seems to work fine now.

            Comment


              #7
              !![BUG in r03]!!

              Hello,

              i've found a bug in r03 (this actually caused no problem, but it could).

              Under certain conditions (restart of device, USB stick is mounted and SSODS is not found on USB), this could delete your Public share!!!

              I've updated the version on the net (still r03). Just perform a new installation with the actual version or change the file /share/..../USBSC/usbstart.sh

              remove the 'r' from

              rm -rf $USBLNIK/$PUBLIC

              to

              rm -f $USBLNIK/$PUBLIC

              The there will be no recursive rm

              I am on a buisness trip for one week from today on. Next week i will find a better solution and i will release it.

              Code:
              #!/bin/sh
              set -x
              
              BASE_LOCATIONS="/share/HDA_DATA /share/MD0_DATA"
              PUBLIC="Public"
              
              for location in $BASE_LOCATIONS ; do
              
              if [ -d "$location/$PUBLIC" ] ; then
                      USBLINK=$location
                      BASE_DIR=$location/USBSC
                      PUBLICDIR=$location/$PUBLIC
                      fi
                      done
              USBSCSTART=${USBLINK}/USBSC/START_SC_USB        
              
              if [ -f ${USBSCSTART} ]; then        
                      cat /proc/mounts | awk '{print $2}' | grep external > usbmount
                      if [ -f usbmount ]; then
                      while read LINE
                      do
                      if [ -f ${LINE}/SSODS/etc/init.d/rc.ssods ]; then
                      USBLINK=${LINE}
                      fi
                      set $LINE
                      done < usbmount
                      rm -f usbmount
              [b]delete  rm -rf $USBLNIK/$PUBLIC
              add     rm -f $USBLNIK/$PUBLIC[/b]
                      ln -sf $PUBLICDIR $USBLINK/$PUBLIC
                      fi
              fi
                      ln -sf ${USBLINK} /volume1 # SSODS (keep the tag!)
                      $BASE_DIR/001_autoswap.sh
                      /volume1/SSODS/etc/init.d/rc.ssods start # SSODS (keep the tag!)
              #eof
              2 x Squeezebox 3 - 1 x Squeezebox Touch - Squeezecenter 7.9.1 / MusicIP in Container station - QNAP TS453A - 4 x 3 TB Hitachi (RAID5)

              Comment


                #8
                Very interesting (apart the side effect that could erase the Public folder!), did you posted also on QNAP forum?! Maybe QNAP's guys can implement a similar solution as permanent on their boxes... thanks for that.
                QNAP Club Italy
                -----------------------------------------------------------------------------------------------------
                "When the Boogeyman goes to sleep every night, he checks his closet for Chuck Norris."

                Comment


                  #9
                  Originally posted by lucas72 View Post
                  Very interesting (apart the side effect that could erase the Public folder!), did you posted also on QNAP forum?! Maybe QNAP's guys can implement a similar solution as permanent on their boxes... thanks for that.
                  Yes it is alos posted in QNAP forum with a link to this thread.

                  The Public bug with Public share is fixed in the actual version.
                  2 x Squeezebox 3 - 1 x Squeezebox Touch - Squeezecenter 7.9.1 / MusicIP in Container station - QNAP TS453A - 4 x 3 TB Hitachi (RAID5)

                  Comment


                    #10
                    Hello mr_hyde,

                    I want to try out your Hdds-Patch. Maybe I have not found the value in this forum, but how many capacities must the USB stick have to work fine? Another question, if I put the files on the stick, do I not slow down the system? I think a Hdd is much faster than an USB stick.

                    Greetings
                    Jens

                    Comment


                      #11
                      Originally posted by Jens_Newbie View Post
                      Maybe I have not found the value in this forum, but how many capacities must the USB stick have to work fine? Another question, if I put the files on the stick, do I not slow down the system? I think a Hdd is much faster than an USB stick.
                      Hello,

                      the USB Stick should have at least 1 GB capacity (~ 10 €) --> 256 MB should be used for swap and you will need ~ the same capacity also for SSODS/Squeezecenter. Together it is a little bit mor then 512.

                      The speed is ok. The only thing that is a little bit slower is the start of dynamic playlists (thats what i observed), but Date/time screesaver and also internet radio allows HDD standby. This is at least important for me.
                      2 x Squeezebox 3 - 1 x Squeezebox Touch - Squeezecenter 7.9.1 / MusicIP in Container station - QNAP TS453A - 4 x 3 TB Hitachi (RAID5)

                      Comment


                        #12
                        That seems to be working great thanks Mr_Hyde.

                        The disk is definitely spinning down, however the lights don't swap to standby like I anticipated (I think normally the status light goes out or something). I assume this is because the NAS isn't in full standby more, instead it has just spun down the disk?
                        ------------------------------------------------
                        Squeezecenter 7.3.2 on Asrock Nettop running Windows 7 beta
                        2 x Squeezebox Booms
                        1 x Squeezebox Duet
                        ------------------------------------------------

                        Comment


                          #13
                          Actually, I take that back, it is acting properly!

                          Not sure it works if I set the timer to anything more than about 10 mins though strangely, I'll experiment more today!
                          ------------------------------------------------
                          Squeezecenter 7.3.2 on Asrock Nettop running Windows 7 beta
                          2 x Squeezebox Booms
                          1 x Squeezebox Duet
                          ------------------------------------------------

                          Comment


                            #14
                            Speedincrease

                            Hi just installed the USB stick utility. 0.3.

                            I can't check if standby works yet, because i have a very large BT download running (32Gb ;-)).
                            But i'm sure that changing the swapfile gave me a good speed increase. Espacially the thumbnails show up faster than before.

                            So a big thumbs up and thx for this tool and SSOTS of course.

                            Rgds,
                            Hellsblade
                            Last edited by Hellsblade; 2008-04-06, 18:26.

                            Comment


                              #15
                              I've installed the utility for swap & ssods. It looks good; although it would be great to be able to set a custom swap size.

                              I can't get my HDD to go into standby, set at 5 min; I've tried turning everything off except slimserver, itunes service; and disconnecting the network. I'm using the SuperDateTime plugin too.

                              Any ideas? I have 2 Samsung 1TB Drives, RAID 1...

                              Comment

                              Working...
                              X