PDA

Bekijk de volledige versie : Samba & disk sleep mode



Rumcajs_tr
31-08-2006, 15:01
Hi everybody,
just activated the WL-500gx router! Now, Im thinking about replacement of the original FW by the custom one.
Especially, Im interested in running Samba on the router, using external HDD.
Due to the fact, that my router (and the futute external storage) is situated in my living rooom, Im very serious about the noise the HDD makes. Due to the fact, it is very critical for me to know the answer for the following question:

Does the wl-500gx custom FW have some functionality to set the HDD to sleep mode (stop the motor of the HDD) if the external storage is not used for e.g. 10 minutes?

Can anybody confirm this or give an alternate solution?

Thanks in advance.

poutnik
31-08-2006, 15:34
i'll point you to a different site, the sollution for a NSLU2 unit can be found here, on the www.nslu2-linux.org (http://www.nslu2-linux.org/wiki/FAQ/SpinDownUSBHarddisks). The technical basis why almost all USB connected disks do NOT spin down is also described there. I think that with reasonable knowledge, you can adapt the HowTo found there for use on the wl500g(x)...

Jiri

martin72
31-08-2006, 17:10
Hi everybody,
just activated the WL-500gx router! Now, I´m thinking about replacement of the original FW by the custom one.
Especially, I´m interested in running Samba on the router, using external HDD.
Due to the fact, that my router (and the futute external storage) is situated in my living rooom, I´m very serious about the noise the HDD makes. Due to the fact, it is very critical for me to know the answer for the following question:

Does the wl-500gx custom FW have some functionality to set the HDD to sleep mode (stop the motor of the HDD) if the external storage is not used for e.g. 10 minutes?

Can anybody confirm this or give an alternate solution?

Thanks in advance.


What kind of HDD do you use? My Maxtor PS3200 on the WL-500gP does take care of this itself (I guess). After about 20 mins (I don't know exactly, it is not documented) it turns off. Maybe you can try this first before you add any tools.

BR

Martin

Rumcajs_tr
31-08-2006, 19:09
What kind of HDD do you use? My Maxtor PS3200 on the WL-500gP does take care of this itself (I guess). After about 20 mins (I don't know exactly, it is not documented) it turns off. Maybe you can try this first before you add any tools.

BR

Martin

I wanted to buy separate HDD rack, as I allready have a Seagate Baracuda 200GB SATA disc. So I assume, that while you have a complete external HDD which has this functionality built-in, I want a cheap rack to put my existing HDD in. Not sure if some rack can do this... :(

Rumcajs_tr
31-08-2006, 19:10
i'll point you to a different site, the sollution for a NSLU2 unit can be found here, on the www.nslu2-linux.org (http://www.nslu2-linux.org/wiki/FAQ/SpinDownUSBHarddisks). The technical basis why almost all USB connected disks do NOT spin down is also described there. I think that with reasonable knowledge, you can adapt the HowTo found there for use on the wl500g(x)...

Jiri

Well, it seems almost impossible to install HDD into an external rack while not interrupting the powr supply...:(

Gerry Boland
30-09-2006, 00:31
What kind of HDD do you use? My Maxtor PS3200 on the WL-500gP does take care of this itself (I guess). After about 20 mins (I don't know exactly, it is not documented) it turns off. Maybe you can try this first before you add any tools.

BR

Martin

Martin, are you using Oleg's firmware? I've got a Maxtor PS3100 and it never spins down! It gets pretty warm too so I'm getting concerned.
-Gerry

Rumcajs_tr
30-09-2006, 20:32
I'm afraid, that the only external storage I found to correctly handle the sleep issue is Western Digital My Book Essential. However, this is handled by the rack itself more than the HDD.
So I'm still searching for an external USB HDD rack, which can handle the spin-down issue... (for SATA HDD drive)

Gerry Boland
30-09-2006, 23:46
The Maxtor OneTouch series has a (windows only) application which allows you to set up spin-down times on the usb hd. This settings then remains when you powerdown & up again.
-Ger

Tamadite
01-10-2006, 09:12
I have a Seagate Deskstar GPX that I have configured to spin down after 20 minutes. It works perfectly. This is done via a special software to configure the hard disk parameters that can be found in Hitachi's web site.

Rumcajs_tr
01-10-2006, 10:35
Ok, so it looks like there are a few USB HDDs available on the market, which are able to handle the sleep mode correctly using a setup utility.
However, I'm looking for an external USB box since I allready have a spare 200GB SATA HDD. I didn't find any external box, which has this funcion specified in the documentation and as I don't wat to buy a "black box" I'm looking for user experiences with external USB boxes with spindown function.
Any comments are welcome :)

PS: Could the above mentioned HDD spindown utility work also for Seagate drives installed in external USB box?

Tamadite
01-10-2006, 11:08
I'm almost sure your Seagate is also programable so you can set up this parameter. Yours its much newer than mine. You can find this software in http://www.hitachigst.com/hdd/support/download.htm under "Feature Tool".

BTW, my Seagate is in an USB box.

Rumcajs_tr
01-10-2006, 11:59
Thank you for your reference.
I have downloaded the Feature Tool from Hitachi's site. It created a bootable floppy with a DOS utility.
As I don't have the USB external BOX yet, I wanted to test it on a second USB external drive I have - It is an external Wester Digital COMBO drive - WD2500JBA (IDE).

After booting the floppy, the program didn't find the USB drive, only my PC's internal drive and CDROM. :(
1) Did you configure the drive connested to (S)ATA interface in yor PC or connected through an USB port?
2) Where did you set the 20Min spindown time? I didn't find such option anywhere in teh menu of the Feature Tool utility.

Any Ideas? Thanks in advance...

Tamadite
01-10-2006, 17:46
You have to do this with the HD connected directly to the SATA or IDE port. It does not work at all via USB ports.

You can find this option under "Features->Change Advance Power Mode" there you will find "Select the desired APM level" set it to the lowest level (Battery life) which means standby after approx. 20min. You will notice the HD will stop spinning.

Rumcajs_tr
01-10-2006, 18:00
Thank you, I didn't think about the fact, that this utility is probably for internal drives only.

Just one question before I will test it:
After setting the parameter in the utility and then switching off the disc from power supply - are these setting stored somehow inside the disk? Because I have to return the disc inside the external box then...

PS: I have just ordered the Raidsonic Icybox IB-351StUS-B SATA 3,5" external USB BOX - it should be delivered in a week so I will test it as soon as possible with two different drives:
Seagate baracuda SATA 200 GB
Western Digital SATA 500 GB

Tamadite
01-10-2006, 18:20
Yes, all parameters are saved in the nvram of the HD therefore you will not lose the new configuration. That is how it worked for me.

BTW nice purchase...

Rumcajs_tr
01-10-2006, 18:27
Ok, thak you very much for your detailed support and I will report immediately after the hdd box delivery and after test of the HDD. Hope it will help somebody else here on the forums too.

Thank you once again...

Rumcajs_tr
08-10-2006, 19:36
OK, so I made some tests, here are the results:

I tested the Toshiba HDD utility with two drives:
- 500GB Western Digital (WD5000KS) and
- 200GB Seagate (ST3200826AS)
Both drives are SATA.

The WD drive supports only the option called "accoustic management" but not the "advanced power mode".
The Seagate drive doesn't support accoustic management and doesn't support advanced power mode.

So this is not a solution for me, probbably due to the fact, that the drives are SATA.

HOWEVER, I made some more research.
I tested the linux command hdparm, which obviously did work via SATA interface but didn't work via USB interface.
Then I installed "sdparm" and "sg_start" utilities (i have UBUNTU distribution based on Debian).
With the following commands, I was able to stop spinning the drive in USB rack !!!

sdparm --command=stop /dev/sdc
or
sg_start --stop /dev/sdc

where /dev/sdc is the physical identification of the drive.

So there is one obvious solution how to solve it - it is possible to run the command periodically in wl500g (eg. each 20 minutes). It should run on any USB drive or any USB enclosure!

The only problem is, that I was not able to test it on my wl500gx since I still have the original FW and I was not able to obtain the sdparm or sg_start packages for wl-500g linux distribution. Can anybody supply or compile these files?
I have tested it on Ubuntu and it works OK. If the read/write operation is in progress, when the drive gets the "spin down" command, there is only a 0,5sec delay, but the copying continues without interruption. I see it definittely as a better solution than running the drive 24/7 nonstop.

PLEASE, IS ANYBODY ABLE TO SUPPLY THE SDPARM OR SG_START PACKAGES FOR WL-500G ???

oleo
11-10-2006, 07:12
Provide a URL link to source location and then I will see If package could be included. If no source code is available then only reverse engineering could be done.

jensm
11-10-2006, 07:40
Hi,

There are source.rpm files at http://sg.torque.net/sg/sdparm.html though they don't seem to be flat text. Does that get you anywhere?

Thanks,

Jens

oleo
11-10-2006, 08:22
sdparm 0.99 package should appear in package feed today.

http://ipkg.nslu2-linux.org/feeds/optware/wl500g/cross/stable/sdparm_0.99-1_mipsel.ipk

Report experiences with package!

jensm
11-10-2006, 11:55
Hi,

Great - thanks! I'll try to get to test it tonight. What about the other thing - sg_start - is that supposed to be an ipkg package as well or is it included in something already?

Thanks,

Jens

oleo
11-10-2006, 12:00
sg_start was not covered by source you gave me.

Rumcajs_tr
11-10-2006, 14:28
Hi,

Great - thanks! I'll try to get to test it tonight. What about the other thing - sg_start - is that supposed to be an ipkg package as well or is it included in something already?

Thanks,

Jens

Hi Jens!
You don't have to use sg_start because this does basically the same as sdparm. So just use the command: "sdparm --command=stop /dev/sdc", but replace "/dev/sdc" with the real identification of your USB drive
So basically You should do this:
1) Install sdparm package (above)
2) connect and map external USB drive to your router (dhe drive should start spinning)
3) in the command line, execute "sdparm --command=stop /dev/sdc", but replace "/dev/sdc" with the real identification of your USB drive
4) The drive should stop spinning
5) as soon as you try to access the drive, it should spin up again normally

I tested under ubuntu on both sata and ide drives, it works. Unfortunately, I don't have oleg firmware installed in my router now (will do it soon) so I can't test the same behaviour on wl500g

Duke
11-10-2006, 15:07
Just tried this stuff with WL500GDeluxe with 1.9.2.7-7e - seems not working at all

Tamadite
11-10-2006, 19:26
The hard disk must be able to support this sort of configuration and/or the ATA-SCSI bridge protocol must be able to transport these commands.

Do not have big expectations when using this command via USB. If Rumcajs_tr got it to work must be because some latest version of the ATA-SCSI bridge protocol in the USB box.

"In summary, sdparm can do very little with USB mass storage devices. Best to start with very low expectations. Features such as locking and password based access control are being discussed for USB so there may be improvements in the future." Source: http://sg.torque.net/sg/sdparm.html

jensm
11-10-2006, 20:08
Hi,

Installed sdparm, tried this:

sdparm --command=stop /dev/scsi/host0/bus0/target0/lun0/disc

Which does not produce an error msg. Doesn't seem to work though, disk is still spinning.

The disc is a 60 gig Hitatch/IBM Deathstar in a cheapo usb casing serving mp3s.

Is it a general thing that it doesn't work, am I executing it incorrectly or does it depend on the disc? Note that nothing else is accessing the disc at time of test (twonky, torrent etc).

Thanks,

jens

jensm
11-10-2006, 20:22
If it helps: this is what i get on the usb controller bridge thingemading:

[admin@wl500 lun0]$ cat /proc/scsi/usb-storage-0/0
Host scsi0: usb-storage
Vendor: Myson Century, Inc.
Product: USB Mass Storage Device
Serial Number: 100
Protocol: 8070i
Transport: Bulk
GUID: 04cf88180000000000000100
Attached: Yes
[admin@wl500 lun0]$

Also, it does not respond well to things like:

sdparm -lv /dev/sdc

Which returns:

open error: /dev/sdc [read only]: No such file or directory

Thanks,

Jens

FilimoniC
11-10-2006, 22:33
nice ! I wanna a cookie !!!

Rumcajs_tr
12-10-2006, 13:08
The hard disk must be able to support this sort of configuration and/or the ATA-SCSI bridge protocol must be able to transport these commands.

Do not have big expectations when using this command via USB. If Rumcajs_tr got it to work must be because some latest version of the ATA-SCSI bridge protocol in the USB box.

"In summary, sdparm can do very little with USB mass storage devices. Best to start with very low expectations. Features such as locking and password based access control are being discussed for USB so there may be improvements in the future." Source: http://sg.torque.net/sg/sdparm.html

Hi! I got this option working on Ubuntu. The USB rack is Raidsonic Icybox IB-351StUS-B SATA 3,5" external USB BOX. The drive is 500GB Western Digital (WD5000KS) or 200GB Seagate (ST3200826AS) (work on both).
If you are not sure, whether your usb/drive can support this, you can test it on same linux distribution on your PC.