LG MS450H MS400H
¿Quieres reaccionar a este mensaje? Regístrate en el foro con unos pocos clics o inicia sesión para continuar.

sata_mars : Investigation to get hd-idle to work in all hard disks

4 participantes

Página 1 de 2. 1, 2  Siguiente

Ir abajo

sata_mars : Investigation to get hd-idle to work in all hard disks - Página 2 Empty Re: sata_mars : Investigation to get hd-idle to work in all hard disks

Mensaje  evr Dom Abr 03, 2011 1:35 am

Keltek escribió:I connect the 500GB disc to front USB and the timeout parameter is at
Código:
/sys/devices/platform/ehci_hcd/usb1/1-2/1-2:1.0/host2/target2:0:0/2:0:0:0/timeout
It can be found using this pattern:
Código:
/sys/devices/platform/ehci_hcd/usb?/*/*/host?/*/*/block
So if I get this entry, it means this is the block device attached to USB (it can be flash disk or physical HDD) and on the same path (dirname <file>) is the timeout. And so this should set the timeouts for all USB connected to system
Código:
USBBLOCKS=`ls /sys/devices/platform/ehci_hcd/usb?/*/*/host?/*/*/block`
for file in $USBBLOCKS; do
  USBTIMEOUT=`/usr/bin/dirname $file`/timeout
  echo 20 > "$USBTIMEOUT"
done
Great. So we have already all the needed info to prepare a general purpose service script for hd-idle. I'll make a proposal tomorrow (unless you're faster, as usual ;)

Best,

evr

Mensajes : 279
Fecha de inscripción : 12/10/2010

Volver arriba Ir abajo

sata_mars : Investigation to get hd-idle to work in all hard disks - Página 2 Empty Re: sata_mars : Investigation to get hd-idle to work in all hard disks

Mensaje  evr Dom Abr 03, 2011 1:54 am

Keltek escribió:I don't know the SATA driver coding for Linux (I don't know any coding of drivers for Linux), but this is definitely in sata_mars, which use libata and scsi backend. But this seems all what I can say ;)
Hey all, are there someone who is Linux kernel guru? Please?
I started to read the source code of sata_mars, looking for some timeout definitions. This is how I found some hooks under /sys/devices/SATA_DEV/. Then I was curiuous and continued searching under SATA_DEV/ and finally hit host?/target*/*/timeout ;)

But I found no code in sata_mars.[ch] related with the timeout hook or any other hooks which are under host?/target*/*/ ...

Nevertheless, I think the problem is solved, so this is just trying to understad the details...

Best,

evr

Mensajes : 279
Fecha de inscripción : 12/10/2010

Volver arriba Ir abajo

sata_mars : Investigation to get hd-idle to work in all hard disks - Página 2 Empty Re: sata_mars : Investigation to get hd-idle to work in all hard disks

Mensaje  Keltek Dom Abr 03, 2011 10:19 am

It can (and should) be using the libata interface in kernel. The driver itself is really simple (just access the hardware registers and all the work do libata, which is I think the main purpose for libata) and the rest of background is in the other resources. That's why I ask for Linux kernel guru Smile
Keltek
Keltek

Mensajes : 291
Fecha de inscripción : 10/03/2010
Edad : 47
Localización : Praha - Czech Republic

http://www.fozona.cz/

Volver arriba Ir abajo

sata_mars : Investigation to get hd-idle to work in all hard disks - Página 2 Empty Re: sata_mars : Investigation to get hd-idle to work in all hard disks

Mensaje  evr Dom Abr 03, 2011 5:01 pm

Keltek escribió:I connect the 500GB disc to front USB and the timeout parameter is at
Código:
/sys/devices/platform/ehci_hcd/usb1/1-2/1-2:1.0/host2/target2:0:0/2:0:0:0/timeout
[...] And so this should set the timeouts for all USB connected to system
Código:
USBBLOCKS=`ls /sys/devices/platform/ehci_hcd/usb?/*/*/host?/*/*/block`
for file in $USBBLOCKS; do
  USBTIMEOUT=`/usr/bin/dirname $file`/timeout
  echo 20 > "$USBTIMEOUT"
done
I think a more direct, simple and safe way is:
Código:
D=/sys/devices/platform/ehci_hcd
USBTIMEOUTS=`ls $D/usb?/?-?/?-?:*/host?/target?:*/?:*/timeout 2>/dev/null`
for T in $USBTIMEOUTS ; do echo 20 > $T ; done
This also takes into account the case that no timeout hooks ar found.

One problem (both with this and with the way you had proposed), however, is that this does not work if the USB disk is plugged after the hd-idle service script has been executed. So, ideally, I think the USB timeout setting should be set by means of hotpulg...

More ideas?
Best,

evr

Mensajes : 279
Fecha de inscripción : 12/10/2010

Volver arriba Ir abajo

sata_mars : Investigation to get hd-idle to work in all hard disks - Página 2 Empty Re: sata_mars : Investigation to get hd-idle to work in all hard disks

Mensaje  evr Dom Abr 03, 2011 5:38 pm

Keltek escribió:It can (and should) be using the libata interface in kernel. The driver itself is really simple (just access the hardware registers and all the work do libata, which is I think the main purpose for libata) and the rest of background is in the other resources. That's why I ask for Linux kernel guru :)
I already had a look at libata.[ch], but I did not find anything clearly related with the hooks under: /sys/devices/SATA_DEV/host0/target0:0:0/0:0:0:0/ ...

Best,

evr

Mensajes : 279
Fecha de inscripción : 12/10/2010

Volver arriba Ir abajo

sata_mars : Investigation to get hd-idle to work in all hard disks - Página 2 Empty Re: sata_mars : Investigation to get hd-idle to work in all hard disks

Mensaje  vic1972 Dom Abr 03, 2011 6:51 pm

Keltek escribió:It works now Smile
I have to set the timeout to 20. I listen spinup the HDD and yes, it takes veeeeeeery long time. (with timeout 10 it not works )

Hello Keltek
What kind of hard disk you have... does it have a handle to manually start Wink just kidding. Wink

Guys, you really doing a great job.
So far so good, I mean I have hd-idle activated from always , and it is fine;
I just had a couple of OFF blocking when swithching off, but that is a pending issue, which might be or not be related...

So we are in good directions. thanks for your great work.
vic1972
vic1972

Mensajes : 2260
Fecha de inscripción : 09/12/2009
Edad : 52
Localización : Malaga

Volver arriba Ir abajo

sata_mars : Investigation to get hd-idle to work in all hard disks - Página 2 Empty Re: sata_mars : Investigation to get hd-idle to work in all hard disks

Mensaje  Keltek Dom Abr 03, 2011 11:01 pm

I have installed this IBM unit
sata_mars : Investigation to get hd-idle to work in all hard disks - Página 2 IBM3380DiskDriveModule.agr
Only the label is wrong - it should be 1.5TB Wink

Ok, it is WESTERN DIGITAL Caviar AV Green Power 1500GB 32MB cache (WD15EVDS) Smile

The best way to found a parameter in kernel, which is like a "default value" for all drives which appears in system in future. And activate it on boot, not in hdidle script.
Keltek
Keltek

Mensajes : 291
Fecha de inscripción : 10/03/2010
Edad : 47
Localización : Praha - Czech Republic

http://www.fozona.cz/

Volver arriba Ir abajo

sata_mars : Investigation to get hd-idle to work in all hard disks - Página 2 Empty Re: sata_mars : Investigation to get hd-idle to work in all hard disks

Mensaje  evr Dom Abr 03, 2011 11:27 pm

Keltek escribió:I have installed this IBM unit
[...]
Only the label is wrong - it should be 1.5TB ;)
Yea! Nice sample of early Winchester technology!!! I had never seen one with so much capacity; ... it must be very recent ;)) the bigest one I've ever seen did have 256MB!!
Ok, it is WESTERN DIGITAL Caviar AV Green Power 1500GB 32MB cache (WD15EVDS) :)
I'm thinking in buying one of these Greens (threre are up to 3GB, 167 Euros, but I'll be content with just 1GB, 50 Euros).
The best way to found a parameter in kernel, which is like a "default value" for all drives which appears in system in future. And activate it on boot, not in hdidle script.
Yes, that would be ideal, but soo far I have not found how to do it ...

Best,

evr

Mensajes : 279
Fecha de inscripción : 12/10/2010

Volver arriba Ir abajo

sata_mars : Investigation to get hd-idle to work in all hard disks - Página 2 Empty Re: sata_mars : Investigation to get hd-idle to work in all hard disks

Mensaje  evr Lun Abr 04, 2011 12:21 am

evr escribió:I think a more direct, simple and safe way is: [...] This also takes into account the case that no timeout hooks ar found.
Even simpler:
Código:
USBTIMEOUTS=`ls /sys/block/sd?/device/timeout`
for T in $USBTIMEOUTS ; do echo 30 > $T ; done
BTW, I've just seen in a few linux systems and all have these timeouts set to 30 or larger!
[...] this does not work if the USB disk is plugged after the hd-idle service script has been executed. So, ideally, I think the USB timeout setting should be set by means of hotpulg...
The best way to found a parameter in kernel, which is like a "default value" for all drives which appears in system in future. And activate it on boot, not in hdidle script.
Yes, that would be ideal, but soo far I have not found how to do it ...
If we do not find a solution for this, another option is to include in into the hd-idle code: As soon as it detects a new disc to monitor, check its timer and ajust it if needed. I think I can do it easyly.

Best,

evr

Mensajes : 279
Fecha de inscripción : 12/10/2010

Volver arriba Ir abajo

sata_mars : Investigation to get hd-idle to work in all hard disks - Página 2 Empty Re: sata_mars : Investigation to get hd-idle to work in all hard disks

Mensaje  Keltek Lun Abr 04, 2011 12:41 am

evr escribió:Even simpler:
Código:
USBTIMEOUTS=`ls /sys/block/sd?/device/timeout`
for T in $USBTIMEOUTS ; do echo 30 > $T ; done
Do this code for both SATA and USB discs?
evr escribió:BTW, I've just seen in a few linux systems and all have these timeouts set to 30 or larger!
Ok, I vote for 30.
evr escribió:If we do not find a solution for this, another option is to include in into the hd-idle code: As soon as it detects a new disc to monitor, check its timer and ajust it if needed. I think I can do it easyly.
Agree, it is a clean solution and the number of seconds can be passed to hdidle and the hdidle can set it automatically for all (existing and for future connected) discs.
Keltek
Keltek

Mensajes : 291
Fecha de inscripción : 10/03/2010
Edad : 47
Localización : Praha - Czech Republic

http://www.fozona.cz/

Volver arriba Ir abajo

sata_mars : Investigation to get hd-idle to work in all hard disks - Página 2 Empty Re: sata_mars : Investigation to get hd-idle to work in all hard disks

Mensaje  evr Lun Abr 04, 2011 1:32 pm

evr escribió:Even simpler:
Código:
USBTIMEOUTS=`ls /sys/block/sd?/device/timeout`
for T in $USBTIMEOUTS ; do echo 30 > $T ; done
Keltek escribió:Do this code for both SATA and USB discs?
Yes. I forgot to mention...
evr escribió:BTW, I've just seen in a few linux systems and all have these timeouts set to 30 or larger!
Keltek escribió:Ok, I vote for 30.
O.K.
evr escribió:If we do not find a solution for this, another option is to include in into the hd-idle code: As soon as it detects a new disc to monitor, check its timer and ajust it if needed. I think I can do it easyly.
Keltek escribió:Agree, it is a clean solution and the number of seconds can be passed to hdidle and the hdidle can set it automatically for all (existing and for future connected) discs.
O.K. I'll see it along this week. Meanwhile, I think we can already post in SF a patch to enable hd-idle (fixed disks) as a normal service.

Best,

evr

Mensajes : 279
Fecha de inscripción : 12/10/2010

Volver arriba Ir abajo

sata_mars : Investigation to get hd-idle to work in all hard disks - Página 2 Empty Re: sata_mars : Investigation to get hd-idle to work in all hard disks

Mensaje  Keltek Lun Abr 04, 2011 2:12 pm

Acknowledge Smile
Victor, did you plan to make some changes in PM?
I should release a fix for LGMenu (as I mentioned some time before about wrong recording directories for external storage), new PM (only binary of course) and this fix for hdidle with timeout set to 30, fully controlled service enabled at startup.
Keltek
Keltek

Mensajes : 291
Fecha de inscripción : 10/03/2010
Edad : 47
Localización : Praha - Czech Republic

http://www.fozona.cz/

Volver arriba Ir abajo

sata_mars : Investigation to get hd-idle to work in all hard disks - Página 2 Empty Re: sata_mars : Investigation to get hd-idle to work in all hard disks

Mensaje  evr Lun Abr 04, 2011 10:59 pm

evr escribió:[...]another option is to include in into the hd-idle code: As soon as it detects a new disc to monitor, check its timer and ajust it if needed. I think I can do it easyly.
Keltek escribió:Agree, it is a clean solution and the number of seconds can be passed to hdidle and the hdidle can set it automatically for all (existing and for future connected) discs.
evr escribió:O.K. I'll see it along this week. [...]
Done! Please find it at SF:

http://sourceforge.net/projects/lgmenu/files/Services/hd-idle-1.03a.tgz/download

Best,

evr

Mensajes : 279
Fecha de inscripción : 12/10/2010

Volver arriba Ir abajo

sata_mars : Investigation to get hd-idle to work in all hard disks - Página 2 Empty Re: sata_mars : Investigation to get hd-idle to work in all hard disks

Mensaje  evr Mar Abr 05, 2011 12:07 am

evr escribió:[...] Meanwhile, I think we can already post in SF a patch to enable hd-idle (fixed disks) as a normal service.
Well, not anly for fixed disks, but all disks (internal, cradle and USB) -- looks like it works well in all the cases (so far ;).

Best,

evr

Mensajes : 279
Fecha de inscripción : 12/10/2010

Volver arriba Ir abajo

sata_mars : Investigation to get hd-idle to work in all hard disks - Página 2 Empty Re: sata_mars : Investigation to get hd-idle to work in all hard disks

Mensaje  vic1972 Mar Abr 05, 2011 12:08 am

Keltek escribió:Acknowledge Smile
Victor, did you plan to make some changes in PM?
I should release a fix for LGMenu (as I mentioned some time before about wrong recording directories for external storage), new PM (only binary of course) and this fix for hdidle with timeout set to 30, fully controlled service enabled at startup.

No, no modification to PM.
I am fine with actual release. thanks.
vic1972
vic1972

Mensajes : 2260
Fecha de inscripción : 09/12/2009
Edad : 52
Localización : Malaga

Volver arriba Ir abajo

sata_mars : Investigation to get hd-idle to work in all hard disks - Página 2 Empty Re: sata_mars : Investigation to get hd-idle to work in all hard disks

Mensaje  Keltek Miér Abr 06, 2011 12:40 pm

Some positive reaction today Smile I have sleeping HDD for about 21h and after that the wakeup was without any problems.

Just one notice - I check here in my work some Linux boxes with RHEL 5.4 installed and all devices have 60s timout so I change my mind and set default timeout to 60.
Keltek
Keltek

Mensajes : 291
Fecha de inscripción : 10/03/2010
Edad : 47
Localización : Praha - Czech Republic

http://www.fozona.cz/

Volver arriba Ir abajo

sata_mars : Investigation to get hd-idle to work in all hard disks - Página 2 Empty Re: sata_mars : Investigation to get hd-idle to work in all hard disks

Mensaje  evr Jue Abr 07, 2011 2:07 am

Keltek escribió:Some positive reaction today :) I have sleeping HDD for about 21h and after that the wakeup was without any problems.
Glad to hear about it ;) Did you notice a difference in the temperature of the LG (before awakening the disk) with respect to previous extended use periods with the disk running?
Just one notice - I check here in my work some Linux boxes with RHEL 5.4 installed and all devices have 60s timout so I change my mind and set default timeout to 60.
I think it is exagerated, bu anyway I don't think it may harm, so let's set it to 60 (in any cae, it is easy to change).

Best,

evr

Mensajes : 279
Fecha de inscripción : 12/10/2010

Volver arriba Ir abajo

sata_mars : Investigation to get hd-idle to work in all hard disks - Página 2 Empty Re: sata_mars : Investigation to get hd-idle to work in all hard disks

Mensaje  Keltek Jue Abr 07, 2011 10:04 am

I forgot to test one very important function - start recording while disk is sleeping. So stay tuned to this test...
Keltek
Keltek

Mensajes : 291
Fecha de inscripción : 10/03/2010
Edad : 47
Localización : Praha - Czech Republic

http://www.fozona.cz/

Volver arriba Ir abajo

sata_mars : Investigation to get hd-idle to work in all hard disks - Página 2 Empty Re: sata_mars : Investigation to get hd-idle to work in all hard disks

Mensaje  vic1972 Jue Abr 07, 2011 10:34 pm

Working fine!
I am happy with this service.
thanks.
vic1972
vic1972

Mensajes : 2260
Fecha de inscripción : 09/12/2009
Edad : 52
Localización : Malaga

Volver arriba Ir abajo

sata_mars : Investigation to get hd-idle to work in all hard disks - Página 2 Empty Re: sata_mars : Investigation to get hd-idle to work in all hard disks

Mensaje  evr Vie Abr 08, 2011 12:08 am

Keltek escribió:I forgot to test one very important function - start recording while disk is sleeping. So stay tuned to this test...
Hope the test has gone well (it should ;)
vic1972 escribió:Working fine! I am happy with this service.
Glad to hear.

Have any of you already tried the new hd-idle binary which sets by itslef the timeout of every new disk detected (i.e., this one)?

Best,

evr

Mensajes : 279
Fecha de inscripción : 12/10/2010

Volver arriba Ir abajo

sata_mars : Investigation to get hd-idle to work in all hard disks - Página 2 Empty LG450H consumtion with disks spun-up and -down

Mensaje  evr Dom Abr 10, 2011 3:40 pm

Hi,

I have been measuring the power consumption of my MS450H under various working conditions, including disks spun-up and -down. See:

https://ms450.forosactivos.net/t705-ms450h-power-consumtion#6376

Taking into account only the standard 250GB internal disk, the consumption goes from 16-18 watts with the disk spun-up to 13-15 with the disk spun-down.

Best,


Última edición por evr el Lun Abr 11, 2011 12:55 am, editado 2 veces (Razón : typo)

evr

Mensajes : 279
Fecha de inscripción : 12/10/2010

Volver arriba Ir abajo

sata_mars : Investigation to get hd-idle to work in all hard disks - Página 2 Empty Re: sata_mars : Investigation to get hd-idle to work in all hard disks

Mensaje  vic1972 Miér Ene 18, 2012 9:41 pm

Hello,
I would like to retake this nice thread.
To check if we can make hd-idle work for all or most of the hd devices.

I have check that some of the paths explained at the begining of this thread,
containing filename : timeout,
now they are not there.
I think i will have to re-read the thread.
regards
vic1972
vic1972

Mensajes : 2260
Fecha de inscripción : 09/12/2009
Edad : 52
Localización : Malaga

Volver arriba Ir abajo

sata_mars : Investigation to get hd-idle to work in all hard disks - Página 2 Empty Re: sata_mars : Investigation to get hd-idle to work in all hard disks

Mensaje  evr Miér Ene 18, 2012 11:01 pm

vic1972 escribió:Hello,
I would like to retake this nice thread. To check if we can make hd-idle work for all or most of the hd devices.

I have check that some of the paths explained at the begining of this thread, containing filename : timeout, now they are not there. I think i will have to re-read the thread.
Hi Vic,
I do not really understand what do you mean. What are no longer there? messages of this thread? or files under /sys ?

Best,

evr

Mensajes : 279
Fecha de inscripción : 12/10/2010

Volver arriba Ir abajo

sata_mars : Investigation to get hd-idle to work in all hard disks - Página 2 Empty Re: sata_mars : Investigation to get hd-idle to work in all hard disks

Mensaje  vic1972 Jue Ene 19, 2012 8:32 am

I meant files . I willl. Check later again
vic1972
vic1972

Mensajes : 2260
Fecha de inscripción : 09/12/2009
Edad : 52
Localización : Malaga

Volver arriba Ir abajo

sata_mars : Investigation to get hd-idle to work in all hard disks - Página 2 Empty Re: sata_mars : Investigation to get hd-idle to work in all hard disks

Mensaje  Contenido patrocinado


Contenido patrocinado


Volver arriba Ir abajo

Página 1 de 2. 1, 2  Siguiente

Volver arriba

- Temas similares

 
Permisos de este foro:
No puedes responder a temas en este foro.