Thank you for this simple explanation Thom. I am thinking now of pulling my smaller 250G drives until I fill up my 1T. This would stop the onscreen notices for them and as the rest of the conversation goes, save a little energy.

If your 250G drives are external, and powered by AC adapter, and you have Z-wave, you could get a Z-wave appliance module, connect a small power strip to that plug those drives AC adapters into that power strip, and you could instruct the drives to turn on and off with the Z-wave system. That way, they'd only be spinning when you need/want them, and you'd only be out the negligible amount of electricity for the Z-wave module. Z-wave appliance modules (the external/internal kind) are only about $45 USD a piece.

Logged

See my User page on the LinuxMCE Wiki for a description of my system configuration (click the little globe under my profile pic).

To do this transparently, would require some interesting changes to the system to be able to do this, as well as some serious thought. NAS drives could be done this way, because they are autonomous as to their position on the device tree. The device template in question would need to respond to On and Off commands, to power down, and the storage devices scripts would need to be adjusted (augmented) to handle the new device template.

However, I will say this again and again and again, you are barking up the wrong tree here, this approach is retarded, error prone, and ultimately your power savings will be negligable. Stop it.

Thom, you are correct... and what I completely skipped over is that you should only shut off the power to the drives after you issued a umount command to them (through drive management) otherwise write-backs wouldn't take and would lead to a disk that would lose data and have to be scanned for errors. Plus,... these external drives typically only consume about 3-5W or less anyway, roughly the same as a typical alarm clock.

However, if he insists, I was just pointing out that there is a way to make the system do what he wants... Although it would be more efficient (& "green") to use Z-wave appliance modules on real resource hogs. ... Things like compressors, amps, fans, etc.

He could also just have the system order MDs to shut down while their users are likely not to be home, and turn back on (boot on network signal) when they're likely to be back home. He can also yank unused HDs from their systems, if they are only going to be network booted MDs.

Logged

See my User page on the LinuxMCE Wiki for a description of my system configuration (click the little globe under my profile pic).

Thom, you are correct... and what I completely skipped over is that you should only shut off the power to the drives after you issued a umount command to them (through drive management) otherwise write-backs wouldn't take and would lead to a disk that would lose data and have to be scanned for errors. Plus,... these external drives typically only consume about 3-5W or less anyway, roughly the same as a typical alarm clock.

However, if he insists, I was just pointing out that there is a way to make the system do what he wants... Although it would be more efficient (& "green") to use Z-wave appliance modules on real resource hogs. ... Things like compressors, amps, fans, etc.

He could also just have the system order MDs to shut down while their users are likely not to be home, and turn back on (boot on network signal) when they're likely to be back home. He can also yank unused HDs from their systems, if they are only going to be network booted MDs.

What does this have to do with my script?

If you want to have off-topic "maybe you could" discussions, I insist that you at least test the script and report back before derailing this any further. I do not want to commit this to both 8.10 and 10.04 based on 3 peoples results.

I switched it on my core and on 1 of my three MDs. Didn't get to the other 2, as there was some family upheaval. For the same reason I didn't have time to test attaching removable storage. They haven't generate any errors, just sitting there though (no news is good news on that front, I guess). I'll have time to update the other MDs and test tonight,... most likely.

Questions:1) I take it that there's no need to do a reload router or restart seeing as these are shell scripts,... Yes/No??

2) Are there any scenarios that you specifically want to test for,... like attaching, removing and re-attaching storage, removing storage without proper umounting, attaching different partitioning types (ext2/3 versus FAT16/32)??

I have drives/flash cards (compact flash, SSD, portable HDs, etc.) with all kinds of partitioning, and can reformat a few of them at will.

« Last Edit: August 01, 2012, 02:44:11 pm by JaseP »

Logged

See my User page on the LinuxMCE Wiki for a description of my system configuration (click the little globe under my profile pic).

Will, changing the partitioning type (e.g.: go from FAT32 to EXT3 on the same drive and with the same volume name) for a previously detected volume confuse the script an/or database? And/or is that something you would want to test for?

*****************************EDIT to include findings:Sorry for the Vebosity in advance

Note: have a net install 10.04, don't know how this will affect results... Also, I only managed to test in Core and the one MD I changed,... To much family drama for the rest of the MDs...

Tested attaching two Compact Flash (yes, those big ol' dinosaurs), a 1GB and a 4GB both formatted in EXT2 (or EXT3?), through a Sandisk USB multi-card reader attached, first, to the Core, and second, to the MD. ...

The Core did not recognize the 1 GB card, neither did the MD (the card had no files on it, only a temp directory, and permissions were root). The 4GB card was recognized as an internal HD by the MD, but not recognized (separately) by the Core (normal?). To be fair, when the system was installed, it tried to recognize the flash card reader as a storage device (no cards inserted, however), and I told it to ignore it. So, the Core may have been responding as expected. I believe I tried the Core first, if that matters.

When the 4GB card was recognized by the MD I selected it to be private to one user (me), and to be used only when I say so. On subsequent eject and re-insert, it did not prompt me for using the drive. Ejecting did not create any message feedback (I do not know if any of this is expected behavior), nor did it remove it from the storage drive list.

Note: The 4GB card, while formatted in a Linux partition scheme, DID have its permissions set liberally for all to see & use. However, it had a copy of Land of the Lost in AVI format on it (if anybody is wondering, I own the DVD, so fair use as far as I'm concerned). The system did not seem to ask anything about the file (Is it even supposed to?).

Again, the cards were formatted in what is typically used for HDs,... I don't know if LinuxMCE makes any assumptions on what a storage device is based on partition type. But again NOTE,... Selecting the drive to be ejected, did not remove it from the HD storage list on screen... I do not know if this is normal behavior.

*****************************

Side question: Is there a way to edit the drive database to make the system see a storage device as a removable device regardless of partitioning scheme? I would kind of like to move that Flash Card to the Compact Flash list, so that the system does not expect it to be attached,... and especially if there are file transfer options that are presented when a Flash Storage device is introduced (& is there such an option?)... What I have done until now is dropped to the KDE desktop on the core if I was transferring any files. I manually rip movies with AcidRip and/or Handbrake, to save drive space & specify media geometry. I don't particularly like DVD menus, extras, alternate language VODs or non skippable trailers,... and don't want them taking up my HD space. If the system typically responds to removable storage by prompting for file transfers, I am somehow missing out on that feature. It would be nice to know if I'm doing something unexpected, and short circuiting the system functionality in the process.

« Last Edit: August 02, 2012, 03:37:02 pm by JaseP »

Logged

See my User page on the LinuxMCE Wiki for a description of my system configuration (click the little globe under my profile pic).

Updated the script on my core and restarted the machine. My media driver working fine so far except that it still goes offline whenever I restart a media director... hmm. Was sort of hoping the updated radar script might help but maybe I'm barking up the wrong tree.