Sign up here and you can log into the forum!

Connected Hard Drives - Power Settings

The place for n00b questions, anything goes...no n00b too n00bish.

Connected Hard Drives - Power Settings   

Postby jfred220 » Sun Aug 26, 2012 1:17 pm

I have searched for and read all relevant posts on this forum that I could find relating to powering down hard drives connected to the WDTV. I would really appreciate anyone taking the time to clarify a few things.

When my WDTV was running on the un-modded firmware my connected hard drives ( 2 drives connected to each USB port) seemed to power down after I pressed the power button on the remote (the LEDs on the HDs would turn off); I don’t think I ever held the power button down. After installing the WDLXTV firmware the LED's on the HDs remain on after pressing the power button.

System Stats:
WDTV Live: WDAAN0000NBK
Firmware: 1.05.04_V.WDLXTV_LIVE-0.5.1.1
(3) Hard Drives connected via USB Hub, connected at rear of media player

1) Using the unmodded firmware were the HD's truely powered off or was I simply putting them into sleep mode, turning off the LEDs but still supplying power to them?

2) I would like my connected HDs to power off the way they did before installing the WDLXTV firmware. I don’t want the LEDs on the HDs to remain on at all times. Is this possible or does the WDLXTV firmware require that the HDs be powered at all times?

3) I’ve read on this forum that power settings for connected HDs can be modified in the WEC Configuration

USB_POWER_OFF='0'
USB_POWER_OFF_DEEP_SLEEP='0'

Which one of these options should I change to “1”? Will this require that I eject all 3 of my HDs before pressing the power button to turn the media player off?

4) What is the best practice, what do most experienced WDLXTV users do in terms of powering down their USB devices?
jfred220
n00b
 
Posts: 14
Joined: Mon Aug 13, 2012 8:17 am

Re: Connected Hard Drives - Power Settings   

Postby mad_ady » Sun Aug 26, 2012 10:46 pm

To answer your questions:

1. As far as I know the Leds on USB devices are managed by those devices. To turn off a led, you would need to turn off the whole device. This means the original firmware turns off the drives
2. Yes, it is possible to turn off the drives, like the original firmware did, however, WDLXTV does not do this by default because some of its features (rTorrent, swap, wdtvext plugins, xmounts, etc) require a permanent external storage to be attached. If you are not using any of these you can power off the USB port. You would have to select USB_POWER_OFF=1 in wec to enable this. However, the setting is ignored if you are using any of the features that require a usb drive. To test, you can use a telnet session and run the command :
Code: Select all
root@Deneb:/root# usb.power.off
usb.power.off: Warning: if you don't 'eject' the officially mounted devices before turning your media player 'off', then the OSD will not mount another device in that slot upon power 'on' and you will have to reboot.
usb.power.off: USB bus 5V power shutdown initialization
usb.power.off: sleeping 3s...
usb.power.off: app.bins are active, cannot turn off USB bus power!


3. Yes, you should eject the drives before power off to prevent filesystem corruption (expecially with NTFS!). You can automate this by adding POWER_DOWN commands (via WEC) like this:
Code: Select all
umount /dev/sda1; eject /dev/sda

Select the correct devices for your system (e.g. sdb, sdc, etc).

4. I can't comment on this because I just use a small 1G USB flash drive and mount my data via the network. However, I do use "DEEP_SLEEP", which powers off the whole device. I use it in a more un-orthodox way (by using a rootFS + DEEP SLEEP), so I would not recommend it if data integrity is important...
User avatar
mad_ady
Developer
 
Posts: 4561
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: Connected Hard Drives - Power Settings   

Postby jfred220 » Mon Aug 27, 2012 9:49 am

2)
I am not using rTorrent or any of the other options that you mentioned.
I am using UMSP apps and movie sheets (with the sheet files all stored on a USB Flash Drive that is plugged into the left port at all times).

Should I be able to set "USB_POWER_OFF=1" ?

3)
So with "USB_POWER_OFF=1" I should always eject before powering down and this can me automated with your supplied WEC command.
Then will the media player have to reboot on Power Up or take a long time to scan all of the drives?

A)
Is there any real harm in just leaving the drives on at all times? Will this shorten the life expectancy of the drives?

Thanks a lot
jfred220
n00b
 
Posts: 14
Joined: Mon Aug 13, 2012 8:17 am

Re: Connected Hard Drives - Power Settings   

Postby mad_ady » Mon Aug 27, 2012 9:56 am

Moviesheets require that you don't unplug the drive on standby. Just try to run the usb.power.off command and see if it complains. If it does, it won't matter if you set USB_POWER_OFF or not, it won't power off the USB.
You are left off with two options:
1. Leave USB powered - it shouldn't be an issue, apart from overheating. The USB connector tends to get hot. Otherwise it won't make much difference.
2. Use Advanced Standby - and put your whole unit in standby. The problem is when it wakes up it does a full reboot (this is what I'm using): http://wiki.wdlxtv.com/Power_settings/Standby
User avatar
mad_ady
Developer
 
Posts: 4561
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: Connected Hard Drives - Power Settings   

Postby rened77 » Tue Aug 28, 2012 2:35 am

Hello mad_ady.

I wanna do that "automatic eject commands".
But what must i type for ma 2 HDDS. I have one at the rear USB (2TB) and one at the side USB plug (2TB).
Where do i see what is the correct device (e.g. sdb, sdc, etc)
In the main menu stands "USB1" and "USB2". Is it that? :?:

Thanks for help.

kind regards
rened77
DLX'er
 
Posts: 59
Joined: Mon Sep 26, 2011 5:40 am

Re: Connected Hard Drives - Power Settings   

Postby mad_ady » Tue Aug 28, 2012 3:57 am

@rened77: Run the "mount" command from telnet (or click on Mount table in the webend) and you will see the drive names. For two drives, the first one seen by the system is usually sda, the second one is sdb. Make sure to unmount all partitons on a drive (sda1, sda2) before ejecting, otherwise eject will fail.
User avatar
mad_ady
Developer
 
Posts: 4561
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: Connected Hard Drives - Power Settings   

Postby rened77 » Tue Aug 28, 2012 5:14 am

@mad_ady
Is it possible that the automatic eject is automaticly on?
I have the 1.02.21 0.5.1.1 Version, and when i turn the WDTV off it will go to "deep sleep" (the WDTV stays cool overnight) and the 2 HDDs turn off in 30sec or so.
Before they go off, the WDTV Leds do a little "Bling bling" alternately. How do i see that they eject the HDDs cause the TV turns instantely black.

kind regards
rened77
DLX'er
 
Posts: 59
Joined: Mon Sep 26, 2011 5:40 am

Re: Connected Hard Drives - Power Settings   

Postby mad_ady » Tue Aug 28, 2012 8:03 am

When putting the device in standby, stay connected via telnet with this command running:
Code: Select all
tail -f /tmp/messages.txt

If they are ejected, you should get some notification there, before it disconnects. Anyway, when the device is in deep sleep. the drives get disconnected by force if they are not ejected.
User avatar
mad_ady
Developer
 
Posts: 4561
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: Connected Hard Drives - Power Settings   

Postby jfred220 » Tue Sep 04, 2012 9:15 pm

I ran the "root@Deneb:/root# usb.power.off" command and received the following response:
# root@Deneb:/root# usb.power.off
-sh: root@Deneb:/root#: not found

I ran the "umount /dev/sda1; eject " commands and received the following respnses:
# umount /dev/sdb1; eject /dev/sdb1
umount: can't umount /tmp/media/usb/USB1/8CF0140FF013FDE0: Device or resource busy
eject: /dev/sdb1: Input/output error
#
# umount /dev/sdc1; eject /dev/sdc1
umount: can't umount /dev/sdc1: Invalid argument
eject: /dev/sdc1: Input/output error
# umount /dev/sdd1; eject /dev/sdd1
umount: can't umount /dev/sdd1: Invalid argument

Any idea what this means?
jfred220
n00b
 
Posts: 14
Joined: Mon Aug 13, 2012 8:17 am

Re: Connected Hard Drives - Power Settings   

Postby mad_ady » Tue Sep 04, 2012 9:29 pm

The output I gave you also contained my customized prompt (root@Deneb#), so you just need to type in "usb.power.off".

Umount /dev/sdb1 fails because you are probably still using files off that partition. usb.power.off will tell you what you are still using.

The eject commands must be issued on the drive (e.g. /dev/sdb), not on the partition (/dev/sdb1)! I see that sdc and sdd do not exist, so don't bother to issue those commands again.
User avatar
mad_ady
Developer
 
Posts: 4561
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Next

Return to n00b central

Who is online

Users browsing this forum: No registered users and 2 guests