HDD spin down / idle

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2
Author Message
hrmcrm
DD-WRT Novice


Joined: 18 Sep 2010
Posts: 4

PostPosted: Sun Apr 24, 2011 21:29    Post subject: spin down now works Reply with quote
culaie,
Thanks for the details and code to stop (and start) an external hard drive. Mine works correctly now. My set-up is:
Router ASUS WL-500GPremium v2
DD-WRT v24-sp2 (08/12/10) mini-usb-ftp (SVN revision 14929)
External HD Fantom Drive 1TB. Four partitions -
part 1 2GB ext3, mounted as /opt
part 2 2GB swap
part 3 2GB ext3 mounted as /tmp/c
part 4 937GB FAT32 mounted as /mnt

I flashed dd-wrt, then installed Optware, the Right Way. In the initial configuration, I could access the FAT32 partition as 192.168.1.1/public from Linux computers on the network, but not from Windows XP machines. The WinXP machines popped up a login window, but I could not find a user name and password that worked. All it needed for WinXP access was to use SWAT to change security from USER to SHARE.

When the Fantom drive is USB-connected to one computer, either Linux or WinXP, it spins down after about 10 minutes of inactivity. Connected to the ASUS router with the factory firmware, it also spun down after 10 minutes of inactivity. However, writing to the HD was unreliable through the router with stock firmware.

After installing dd-wrt & OtRW, I could read from and write to the drive properly, but it ran continuously. Your procedure above got it behaving correctly.

My usage is probably different from yours, so I changed some items. I did not install ushare. There is no printer on the router, so I did not enable USB Printer Support in the web GUI. Optware seemed to have installed watchprinter service on and started, so I used telnet to disable it.

A few clarifications to your procedure:
Step 3. scsi-stop is in /opt/sbin/
Step 8. I believe the file that needs editing is /opt/etc/init.d/S35automount.
Step 12. The cron jobs in the web GUI are on the tab Administration, then Management tab.
The line numbers you mention for some files were slightly different in my system, but I easily found the text you quoted.

I am very glad to have everything working correctly. Thanks for your help on the spin down issue.

Howard
Sponsor
speedy71471
DD-WRT User


Joined: 13 Aug 2008
Posts: 248

PostPosted: Sun Apr 24, 2011 22:58    Post subject: Reply with quote
Just put this in your startup script and be done with it.

for f in /sys/class/scsi_disk/*; do echo 1 > $f/allow_restart; done

_________________
Linksys WRT600N v1.1 16758M NEWD Eko mini-usb-ftp (AP) (OTRW)
Linksys E2000 16758M NEWD-2 K.26 Eko mini (repeater bridge) (on 5GHz)
amplatfus
DD-WRT Novice


Joined: 17 Jan 2009
Posts: 11

PostPosted: Sat Jan 19, 2013 10:28    Post subject: spindown/ spinup external HDD on DDWRT Reply with quote
Prerequisite:
-router ASUS wl 500gPv2
-firmware: DD-WRT v24-sp2 (05/17/11) mega - build 17084M
-external HDD Expansion 2TB with one ext3 partition (/dev/discs/disc0/part0)
-"optware the wright way" - Take2 installed in part0 and mounted in /opt
-/opt/pc mounted in /mnt (for torrents)
- transmission service on
- swapon file /opt/myswap

I have tried method posted here by culaie completed by hrmcrm.
Unfortunately, HDD did not spins up.
Could you please advice?

Thank you so much!
hrmcrm
DD-WRT Novice


Joined: 18 Sep 2010
Posts: 4

PostPosted: Mon Jan 21, 2013 5:22    Post subject: Reply with quote
There is conflicting advice around the forum on this issue. There is a conspicuous router database, but several people say "DON'T USE THE ROUTER DATABASE". Optware, the Right Way (http://www.dd-wrt.com/wiki/index.php/Optware%2C_the_Right_Way) recommends "the LATEST build". The Peacock Thread (http://www.dd-wrt.com/phpBB2/viewtopic.php?t=51486) recommends Brainslayer 14929, which is what I have. The file name has been changed since my earlier posting. It is now at ftp://ftp.dd-wrt.com/others/eko/BrainSlayer-V24-preSP2/2010/08-12-10-r14929/broadcom/dd-wrt.v24_usb_generic.bin

Another conflict regards jffs. Optware, the Right Way says "For USB users, you won't be needing JFFS2, so DISABLE it". However, USB on ASUS WL500GPV2 (http://www.dd-wrt.com/wiki/index.php/USB_on_ASUS_WL500GPV2) directs to"Enable JFFS2 Support". The procedure of culaie above uses jffs, and I did that, as described in USB on ASUS WL500GPV2.

The page How to - Format and Partition External Storage Device (http://www.dd-wrt.com/wiki/index.php/How_to_-_Format_and_Partition_External_Storage_Device) describes creating several partitions before installing Optware. You state your HD has only one partition. That may be part of the problem. The swap partition is a special format.

So, suggestions:

1. Change to version 14929 of v24_usb_generic.

2. Create more partitions per the How_to_Format page.

3. Configure dd-wrt per USB on ASUS WL500GPV2.

4. Do the tweaks in culaie's procedure.

Hope this helps,
Howard
amplatfus
DD-WRT Novice


Joined: 17 Jan 2009
Posts: 11

PostPosted: Mon Jan 21, 2013 8:11    Post subject: spindown/ spinup external HDD on DDWRT Reply with quote
Dear hrmcrm,

Thank you for reply.
I can confirm it is working now, with configuration posted by me earlier. I have forgot to do Step 5. chmod +x /jffs/hdd-stop from culaie post.

Now there is one little issue:
After spin up, the transmission service must be restarted. I have to find how can I include auto-restart of transmission service in a script. Could you please advice?...If I will find something in the meantime, I'll promise to post here also.

Thank you so much!
PS: I have a swap file, not a swap partition.
Goto page Previous  1, 2 Display posts from previous:    Page 2 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum