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

Re: Need help on Spin-Down the HD on NSLU2

Expand Messages
  • inet2xtreme
    ... UNLSUG. ... use. I ... it ... with ... so ... IDE ... drive ... didn t ... ______________________________________________________________________ ... not
    Message 1 of 6 , Jul 3, 2007
    • 0 Attachment
      --- In nslu2-linux@yahoogroups.com, "bloedmann999"
      <Brian_Dorling@...> wrote:
      >
      > --- In nslu2-linux@yahoogroups.com, key vu <key50001@> wrote:
      > >
      > > Hello Brian,
      > >
      > > Thanks for your answer.
      > >
      > > I'm using NetDisk enclosure from
      > http://www.ximeta.com/products/ndenclosure1_en.php with 40GB Seagate
      > HD (for now).
      > >
      > > In the Spin-Down instruction from Nslu2-linux website, it does not
      > ask to move the file or folder at all. After spend more than a week
      > to configure the spind down but I have no luck.
      > >
      > > Brian, would you please post for me the detail step-by-step to
      > configure the Spin-down option.
      > >
      > >
      > > Best regard,
      > > KEY
      > >
      > >
      > >
      > >
      > >
      > > ----- Original Message ----
      > > From: bloedmann999 <Brian_Dorling@>
      > > To: nslu2-linux@yahoogroups.com
      > > Sent: Friday, June 29, 2007 10:55:04 AM
      > > Subject: [nslu2-linux] Re: Need help on Spin-Down the HD on NSLU2
      > >
      > > --- In nslu2-linux@ yahoogroups. com, "key50001" <key50001@ .>
      wrote:
      > > >
      > > > I'm new to NSLU2 and I just finish upgrade the firmware to
      UNLSUG.
      > All
      > > > I want for now is to Spin-down the hard drive when it not in
      use. I
      > > > follow all the step from different method but still can not get
      it
      > > > spind down. I always receive the error durring the Spin-down
      > > > configuration.
      > > >
      > > > Could anyone please help me to set up and configure the NSLU2
      with
      > Spin
      > > > down option.
      > > >
      > > > Please provide for me the step-by-step to config it because I'm
      so
      > dump
      > > > with Unix.
      > > >
      > > > Thanks in advance.
      > > > KEY
      > > >
      > > Well,
      > >
      > > have you moved /dev and /var to ramfs?
      > >
      > > Tried stopping all unneccessary processes. Dont have syslog-ng
      > > running, dont have cron continually doing things.
      > > Remounted your drives, ../conf and ../data, with noatime?
      > >
      > > It worked for me, but I have a drive that spins itself down. That
      > > means it does not need a command from linux to make it spin down.
      > >
      > > Does your external drive have a spin-down feature? If so, test it
      > > under windows to see if it really works. Do you need to take the
      IDE
      > > drive out and install it in a PC to use ATA commands to set the
      drive
      > > spin down? If so, will it keep those settings through a power off?
      > > pretty easy to test that.
      > >
      > > What error messages do you get? Before I had everything right I
      didn't
      > > get any error messages, it just didn't spin down.
      > >
      > > Cheers Brian
      > >
      > >
      > >
      > >
      > >
      > >
      > >
      >
      ______________________________________________________________________
      ______________
      > > Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's
      > updated for today's economy) at Yahoo! Games.
      > > http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow
      > >
      > Hey,
      >
      > here's how I did it:
      >
      > key vu wrote:
      > > Hello Brian,
      > >
      > > Thanks for your answer.
      > >
      > > I'm using NetDisk enclosure
      > > from http://www.ximeta.com/products/ndenclosure1_en.php with 40GB
      > > Seagate HD (for now).
      > >
      > > In the Spin-Down instruction from Nslu2-linux website, it does
      not ask
      > > to move the file or folder at all. After spend more than a week
      to
      > > configure the spind down but I have no luck.
      > >
      > > Brian, would you please post for me the detail step-by-step to
      > configure
      > > the Spin-down option.
      > >
      > >
      > > Best regard,
      > > KEY
      > >
      > >
      > > ----- Original Message ----
      > > From: bloedmann999 <Brian_Dorling@...>
      > > To: nslu2-linux@yahoogroups.com
      > > Sent: Friday, June 29, 2007 10:55:04 AM
      > > Subject: [nslu2-linux] Re: Need help on Spin-Down the HD on NSLU2
      > >
      > > --- In nslu2-linux@ yahoogroups. com
      > > <mailto:nslu2-linux%40yahoogroups.com>, "key50001" <key50001@ .>
      > wrote:
      > > >
      > > > I'm new to NSLU2 and I just finish upgrade the firmware to
      > UNLSUG. All
      > > > I want for now is to Spin-down the hard drive when it not in
      use. I
      > > > follow all the step from different method but still can not
      get it
      > > > spind down. I always receive the error durring the Spin-down
      > > > configuration.
      > > >
      > > > Could anyone please help me to set up and configure the NSLU2
      > with Spin
      > > > down option.
      > > >
      > > > Please provide for me the step-by-step to config it because I'm
      > so dump
      > > > with Unix.
      > > >
      > > > Thanks in advance.
      > > > KEY
      > > >
      > > Well,
      > >
      > > have you moved /dev and /var to ramfs?
      > >
      > > Tried stopping all unneccessary processes. Dont have syslog-ng
      > > running, dont have cron continually doing things.
      > > Remounted your drives, ../conf and ../data, with noatime?
      > >
      > > It worked for me, but I have a drive that spins itself down. That
      > > means it does not need a command from linux to make it spin down.
      > >
      > > Does your external drive have a spin-down feature? If so, test it
      > > under windows to see if it really works. Do you need to take the
      IDE
      > > drive out and install it in a PC to use ATA commands to set the
      drive
      > > spin down? If so, will it keep those settings through a power off?
      > > pretty easy to test that.
      > >
      > > What error messages do you get? Before I had everything right I
      didn't
      > > get any error messages, it just didn't spin down.
      > >
      > > Cheers Brian
      > >
      > >
      > >
      > >
      > > ------------------------------------------------------------------
      ------
      > > Boardwalk for $500? In 2007? Ha!
      > > Play Monopoly Here and Now
      > >
      >
      <http://us.rd.yahoo.com/evt=48223/*http://get.games.yahoo.com/proddesc
      ?gamekey=monopolyherenow>
      >
      > > (it's updated for today's economy) at Yahoo! Games.
      > Key,
      >
      > I'll try (you can find all the details on the NSLU site):
      >
      > 1. Can you get the disk to spin down under windows? Is there a
      utility
      > to set the spin-down time?
      >
      > 2. If not take the disk out of the enclosure, connect it directly to
      > one of your IDE channels and follow one of the many instructions for
      > setting spin-down via ATA commands. Set a very short interval, it
      > makes testing easier.
      > If you now can get it to spin down, then check that the spin down
      > settings are kept when the drive has been powered off completely.
      >
      > If none of the above works then that decides what you do next:
      >
      > If it doesn't work, then you will need to try sending spin-down
      > commands from Unslung to the disk. That may or may not work
      depending
      > on your USB-IDE adapter in the USB enclosure.
      >
      >
      > If it does spin-down under linux, either via its own settings, or
      via
      > a command then do the following to stop it continually being spun-up
      > again:
      >
      > 1. in /unslung/rc.bootbin:
      >
      > /sbin/logger "/unslung/rc.bootbin Creating ramfs for /dev:"
      > /bin/mount -t ramfs ramfs /mnt/tmpmnt -o maxsize=128
      >
      > /sbin/logger "/unslung/rc.bootbin Copying /dev"
      > /bin/cp -rp /dev/* /mnt/tmpmnt/
      >
      > /sbin/logger "/unslung/rc.bootbin Mkdir /dev.state"
      > /bin/mkdir -p /dev.state
      >
      > /sbin/logger "/unslung/rc.bootbin Mount /dev.state"
      > /bin/mount -o bind /dev /dev.state
      >
      > /sbin/logger "/unslung/rc.bootbin Mount /dev"
      > /bin/mount -o bind /mnt/tmpmnt /dev
      >
      > /sbin/logger "/unslung/rc.bootbin Creating ramfs for /var:"
      > /bin/mount -t ramfs ramfs /mnt/tmpmnt -o maxsize=256
      >
      > /sbin/logger "/unslung/rc.bootbin Copying /var"
      > /bin/cp -rp /var/* /mnt/tmpmnt/
      >
      > /sbin/logger "/unslung/rc.bootbin Mkdir /var.state"
      > /bin/mkdir -p /var.state
      >
      > /sbin/logger "/unslung/rc.bootbin Mount /var.state"
      > /bin/mount -o bind /var /var.state
      >
      > /sbin/logger "/unslung/rc.bootbin Mount /var"
      > /bin/mount -o bind /mnt/tmpmnt /var
      >
      > /sbin/logger "/unslung/rc.bootbin Cleanup /var.state/log/"
      > rm /var.state/log/*
      >
      >
      > /bin/killall -9 syslogd
      > /bin/killall -HUP syslog-ng
      > /bin/sleep 3
      >
      >
      > /bin/killall -HUP klogd
      > /bin/sleep 3
      >
      >
      > P.S. Ignore all the logger commands if you dont want syslog entries
      to
      > see what is going on. As the /var/log has moved, syslog or syslog-ng
      > and klogd need to be recycled to get them logging in the new
      > /var/log/messages location.
      >
      > Now your syslog is on a ram disk and will be lost at reboot,
      therefore
      > part of my shutdown/reboot script copies them from there to disk
      > before shutting down.
      > Something like this:
      >
      > /sbin/logger "/unslung/rc.reboot saving logs then rebooting"
      >
      > # Move logs sent from DD-WRT to syslog server from RAMFS to disk
      >
      > cat /var/log/syslogs/DD-WRT/cron >> /public/syslogs/DD-
      WRT/cron.log
      > cat /var/log/syslogs/DD-WRT/daemon >> /public/syslogs/DD-
      WRT/daemon.log
      > cat /var/log/syslogs/DD-WRT/syslog >> /public/syslogs/DD-
      WRT/syslog.log
      > cat /var/log/syslogs/DD-WRT/user >> /public/syslogs/DD-
      WRT/user.log
      > cat /var/log/syslogs/DD-WRT/authpriv >>
      > /public/syslogs/DD-WRT/authpriv.log
      >
      >
      > # Move slug logs from RAMFS to disk
      >
      > cat /var/log/samba/log.nmbd
      >> /public/syslogs/slug1/samba/log.nmbd
      > cat /var/log/samba/log.smbd
      >> /public/syslogs/slug1/samba/log.smbd
      >
      > cat /var/log/auth.log >> /public/syslogs/slug1/auth.log
      > cat /var/log/cron.log >> /public/syslogs/slug1/cron.log
      > cat /var/log/daemon.log >> /public/syslogs/slug1/daemon.log
      > cat /var/log/debug >> /public/syslogs/slug1/debug
      > cat /var/log/kern.log >> /public/syslogs/slug1/kern.log
      > cat /var/log/messages >> /public/syslogs/slug1/messages
      > cat /var/log/server.log >> /public/syslogs/slug1/server.log
      > cat /var/log/syslog >> /public/syslogs/slug1/syslog
      > cat /var/log/user.log >> /public/syslogs/slug1/user.log
      > cat /var/log/uucp.log >> /public/syslogs/slug1/uucp.log
      >
      >
      > Now you need to remount the drives with noatime, the wiki explains
      why.
      > In /opt/etc/init.d:
      >
      > #!/bin/sh
      > # /opt/etc/init.d/S00remount
      >
      > #set -x
      >
      > # A diversion script to remount the disks without access times being
      > recorded
      > /sbin/logger "/opt/etc/init.d/S00remount Starting"
      > /sbin/logger "/opt/etc/init.d/S00remount Remounting /dev/sda1 with
      > noatime:"
      > /bin/mount -o remount,rw,noatime /dev/sda1
      > /sbin/logger "/opt/etc/init.d/S00remount Remounting /dev/sda2 with
      > noatime:"
      > /bin/mount -o remount,rw,noatime /dev/sda2
      > /sbin/logger "/opt/etc/init.d/S00remount Done"
      >
      > After a mount command you see this:
      >
      > /dev/sda1 on /share/hdd/data type ext3 (rw,noatime)
      > /dev/sda2 on /share/hdd/conf type ext3 (rw,noatime)
      >
      >
      >
      >
      > WIth that done spin-down works for me, and the drive stays down.
      You
      > need to do it on a minimal system though. And since I have installed
      > syslog-ng it does not spin-down anymore. I'm playing with a second
      > slug now to find out why, maybe the conf file of syslog-ng also
      needs
      > to go on the ramfs.
      > I also set my cron to do all clean ups etc once a day, to get the
      time
      > with NTP at the same time etc., so I had one spin up every 24 hours
      if
      > nothing else was in use.
      >

      I implemented the above steps on my slug, now it does not show up on
      the network any more. The one thing I added was making each of the
      two new script executable: "chmod +x init.d" for example.

      I'm not entirely sure how to recover it. I'm going to assume I
      unplug the USB drives, boot, login then plug them back in to edit the
      files. Maybe I'll give that a shot next.
    Your message has been successfully submitted and would be delivered to recipients shortly.