Bekijk de volledige versie : hdparm auto-shutdown to prevent damage
jago25_98
31-07-2013, 18:48
I don't want to change firmware if possible as the router I want to use this on is quite important to risk shutting down.
All I need is a hdparm binary compiled for BCM5365P/BCM5364P. Can you help?
It's a good idea to shutdown any USB hard drive connected since running one 24/7 will burn it out and waste electric.
Bear in mind that the USB adBRONET1apter you use will need to support the shutdown command - most do, but not all.
hdparm -y /dev/ ?
[admin@WL500G root]$ ls /dev/scsi/host0/bus0/target0/lun0/
disc part1 part2 part3 part4
[admin@WL500G root]$ ls /dev/discs/
disc0
[admin@WL500G root]$ ls /dev/discs/disc0/
disc part1 part2 part3 part4
What firmware do you have?
ipkg has hdparm, but there's also another way to spin down drives. As long as drives support spin down this method works.
Couldn't find my post on this forum that quick anymore, so a link from my site:
http://wpte.kicks-ass.net/forum/showthread.php?tid=4
also for older firmware with 2.4 kernel you can use the old script:
http://wl500g.info/showthread.php?7836-Firmware-to-spin-down-HDD&p=47135#post47135
both for oleg firmware. You just have to place the script somewhere, and run it like I wrote in the post.
Works well for all my harddrives :)
edit:
to check if it works you can try executing this on a drive:
/usr/sbin/scsi-stop /dev/sda
found the forum link as well: http://wl500g.info/showthread.php?23223-alpha-rt-n-firmware-releases&p=203696#post203696
jago25_98
31-07-2013, 22:39
What firmware do you have?
ipkg has hdparm, but there's also another way to spin down drives. As long as drives support spin down this method works.
Couldn't find my post on this forum that quick anymore, so a link from my site:
http://wpte.kicks-ass.net/forum/showthread.php?tid=4
also for older firmware with 2.4 kernel you can use the old script:
http://wl500g.info/showthread.php?7836-Firmware-to-spin-down-HDD&p=47135#post47135
both for oleg firmware. You just have to place the script somewhere, and run it like I wrote in the post.
Works well for all my harddrives :)
edit:
to check if it works you can try executing this on a drive:
found the forum link as well: http://wl500g.info/showthread.php?23223-alpha-rt-n-firmware-releases&p=203696#post203696
Genius!
1.9.2.7-9 is my firmware.
It's been years since I looked at this and can't remember if that is even oleg.
Unfortunately I don't think I spun down. I rushed upstairs to see and I don't think it did... unless it spun straight up again.
[admin@WL500G j]$ cat /proc/scsi/usb-storage-0/0
Host scsi0: usb-storage
Vendor: JMicron
Product: USB to ATA/ATAPI bridge
Serial Number: 5812271602C2
Protocol: Transparent SCSI
Transport: Bulk
GUID: 152d233800005812271602c2
Attached: Yes
Port: 1
Bus: 00:04.0-1
[admin@WL500G j]$
Now, I now it does spindown on my desktop so I think it could be spinning down but then coming back up again due to being shared by samba
1.9.2.7-9 wow, talk about old :p
It's oleg, from 2008. You should use the old script for this firmware: http://wl500g.info/showthread.php?7836-Firmware-to-spin-down-HDD&p=47135#post47135
Nowadays firmware has moved on to googlecode: https://code.google.com/p/wl500g/
Maybe it did spin up straight away indeed. Could be swap, or programs running on the background.
Note that just spinning of a drive is not that bad. Most drives have excellent ball bearings, they hardly wear. Usually they easily outlive the other components of the drive:)