how to use scsi-stop ?

Discussion in 'Tomato Firmware' started by maurer, Mar 8, 2010.

  1. maurer

    maurer Network Guru Member

    I have a RT-N16 running TB's latest K26 usb mode.
    I want to use scsi-stop and i don't know how.
    I need help.
  2. Bobi

    Bobi Addicted to LI Member

    Scsi-stop is installed by default in Tomato TB's. What you have to do is :
    First step : unmount your usb hdd (be sure that all partitions are unmounted).
    Second step : in the console type "scsi-stop /dev/sda" without quotes.

    For me is always working in this way (Hdd led turns off).
  3. teddy_bear

    teddy_bear Network Guru Member

    Follow the links from the 1st post of Tomato USB mod thread.
    Also, check out this post with scripts adjusted for kernel 2.6.
  4. maurer

    maurer Network Guru Member

    i don't understand how to use those scripts.
    i've put them in my /root folder and i've tried to run them.
    i see no result - just no prompt.
  5. maurer

    maurer Network Guru Member

    ok i've fixed that
    now it give me the error that my hdd id is not in the white-list.
    how to fixed that ?
  6. spikes

    spikes Networkin' Nut Member


    How did you run the script and which script did you use? Did you ever figure out how to fix that error message you got?
  7. Rasky

    Rasky Addicted to LI Member

    I run my scripts by putting them in Administration >> Scripts >> Init, like this:

    /root/ &

    The ampersand puts it in background.

    The error you get is because you need to enable the disk in the whitelist (the script is very conservartive and will not touch any device UNLESS it is whitelisted). If the disc's USB ID is ABCD:1234, you can add it to the whitelist like this:

    echo 1234 > /opt/var/idle_disks/whl/abcd

    The whitelist directory can be configure in idles_scsi.conf. The default is /opt/var/idles_disks/whl, but you can put it wherever you want (eg: /jffs, or even /tmp if you run the echo command at startup through the init script).
  8. spikes

    spikes Networkin' Nut Member

    I put the "" and "idles_scsi.conf" files in the "/tmp/home/root" folder on the external drive. I added the command "/root/ &" to the init section. For the USB ID, do I use the VendorID and ProdID that is listed when you run the command "cat /proc/bus/usb/devices", where in your example VendorID=ABCD and ProdID=1234? I ran the command to add the VendorID and ProdID to the whitelist.

    After the elapsed time specified in "idles_scsi.conf", I noticed that the light on my enclosure will start to blink and then turn off momentarily. After about 3 or so, it will turn back on. The hard drive will still be spinning. Does that mean my enclosure doesn't support the command to spin down or am I not doing something correctly?
  9. spikes

    spikes Networkin' Nut Member

    Ok, so I ended up using a different enclosure and manually did the scsi-stop command test. The hard drive spins down and when I try to access it, it spins up again. However, even having all the scripts, files, commands in-place, the drive doesn't spin down after the 15 minutes I specified in the .conf file. What I also noticed was that as soon as I reboot the router, the two files "" and "idle_disks.conf" in the root folder disappear, as if they got deleted. Is that normal?
  10. rhester72

    rhester72 Network Guru Member

    root's home directory is not persistent - you will need to repopulate it (or at least create softlinks to locations on permanent storage) on every reboot.

  11. spikes

    spikes Networkin' Nut Member

    Thanks for the response. Yah, I ended up putting the scripts in /jffs and now it runs in the background. However, I still can't get the drive to spin-down. It might be because I have the Optware Package installed on that external drive with nzbget, transmission, and phpSQLiteCMS services running in the background. They are not actively doing anything though. Has anyone been able to get idle_disks scripts to work properly with the Optware Package installed?
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice