LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   Power off USB mass storage at computer shut down?? (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/power-off-usb-mass-storage-at-computer-shut-down-886931/)

gorade 06-17-2011 02:34 PM

Power off USB mass storage at computer shut down??
 
Running a Seagate FreeAgent GoFles 2TB on an USB3-port as mass storage at Linux Mint LMDE 64 bit.
Seems to work fine with sbackup.
However when I turn off my computer, the external HDD is still spinning.

I have a dual boot and if I turn off the computer with WinXP-pro 64 running it also powers off the external.

If Windows can do it, Linux ought to do it too, I guess. I just can't figure out how to make it.

ButterflyMelissa 06-17-2011 03:10 PM

Hi,

I'd run a script at shutdown, perhaps this pointer could help...in escence you'd have to unmount the thing...

Quote:

If windows can do it, Linux ought to do it too, I guess. I just can't figure out how to make it.
Of course it can, this IS Linux after all :D

Thor

szboardstretcher 06-17-2011 03:16 PM

I noticed this happened on a Laptop of mine, that for some reason powered the USB ports when the thing was shut off.

Didnt find a solution for it that was nice -- disabled USB ports on the board.

gorade 06-17-2011 11:48 PM

Quote:

Originally Posted by Thor_2.0 (Post 4388853)
Hi,

I'd run a script at shutdown,

Thor

How would that script look? If I unmount manually it powers off. (It is starting again at once)

ButterflyMelissa 06-18-2011 11:48 AM

Quote:

If I unmount manually it powers off. (It is starting again at once)
Eek! That is a detail. A nasty one at that. I issue the unmount on mine and the thing spins down and stays there. So, I hope to be forgiven for this short-sightedness....

You could use scsiadd, there is a nice tutorial about it...

I hope this helps...

Thor

gorade 06-18-2011 10:49 PM

Hm, well, thank you. It seems a long way to go to just unmount and power off manually. It is frustrating to see that Windows does this natively and automaticly, without asking. For Linux it takes installing a certain program and writing scripts. I had hoped that just I had forgotten some simple command.
Thank you Thor for caring

ButterflyMelissa 06-19-2011 06:31 AM

Quote:

Thank you Thor for caring
No problem... ;)

Quote:

For Linux it takes installing a certain program and writing scripts. I had hoped that just I had forgotten some simple command.
Well, I think it ties in with the overall philosophy on Linux: it is what you want it to be, not what the makers/programmers/producers want it to be. And yes, in that focus, Linux can be a challenge. But following the path allows you to become more self-reliant, a feature not included in windows where one (I at least) always feels "at the mercy of the machine" where in Linux, it's the other way round.

Hope the matter is solved to your needs :)

Thor

gorade 06-19-2011 07:00 AM

Maybe I will try to insert a script or some line in umountfs. You are right. At least this builds character:^)

Doc CPU 06-22-2011 11:01 AM

Hi there,

Quote:

Originally Posted by Thor_2.0 (Post 4389854)
Well, I think it ties in with the overall philosophy on Linux: it is what you want it to be, not what the makers/programmers/producers want it to be.

yes, that's a significant part of its charm.

Quote:

Originally Posted by Thor_2.0 (Post 4389854)
[...] windows where one (I at least) always feels "at the mercy of the machine" where in Linux, it's the other way round.

Thor, it's not being at the mercy of the machine. That can always be helped. There are schematics and data sheets.
It's being at the mercy of those guys in Redmond who decide what we are to like or not to like; what we should know about and what we shouldn't.

[X] Doc CPU

ButterflyMelissa 06-23-2011 03:21 AM

Quote:

It's being at the mercy of those guys in Redmond who decide what we are to like or not to like; what we should know about and what we shouldn't
You read my mind... :D ... and you hit the very reason why I needed Linux, still need it and will always need it: freedom...but freedom is inherent to the human design, it seems...

gorade 06-23-2011 05:19 AM

Well, dear philosophers, could some of you perchance offer a solution to the problem of making Linux power off my external HDD when I turn off my computer:^) I still don't know how Windows makes it and why Linux doesn't. What is the trick those redmond guys do, that can't repeat?:^)

ButterflyMelissa 06-24-2011 04:00 AM

Well, to put it simply, the shutdown script has to do the work here, this guy found a way...seemed to help him with a similar challenge...

Edit : in Arch (dunnow about the others...sorry) the shutdown script is in /etc/rc.shutdown (go figure...) - maybe a great spot to put the link to the script...

gorade 06-25-2011 06:56 AM

Quote:

Originally Posted by Thor_2.0 (Post 4394372)
Well, to put it simply, the shutdown script has to do the work here, this guy found a way...seemed to help him with a similar challenge...

Edit : in Arch (dunnow about the others...sorry) the shutdown script is in /etc/rc.shutdown (go figure...) - maybe a great spot to put the link to the script...

Maybe /etc/rc6.d would be the place in Debian? Still I am not sure they address exactly the same problem. I try to make the script work. One of those persons seems to do so however and envises a change in the Linux-kernel ( here)

I'm not sure if I dare to change any in the kernel and I am still a bit surprised that Linux doesn't make this as easily as Windows do. There ought to be some simple way since I don't think other people's external harddrives stand humming when computers are shut off, do they?

ButterflyMelissa 06-25-2011 08:41 AM

Quote:

that Linux doesn't make this as easily as Windows
The point is that Linux, unlike the "other one", does not make assumptions about the target system. That adds both to its huge adaptability and its huge learning curve.

Quote:

I'm not sure if I dare to change any in the kernel
Let that (PLEASE) be the very last option. A kernel can break, leaving you with a useless system.

Have you gotten the script to work from the console? If so, placing it in a shutdown script ought to do. I looked around for you...maybe this page can help...I hope.

Thor

gorade 06-25-2011 10:18 AM

Quote:

Originally Posted by Thor_2.0 (Post 4395414)

Have you gotten the script to work from the console? If so, placing it in a shutdown script ought to do. I looked around for you...maybe this page can help...I hope.

Thor

No. I don't know how to make it work. My device seems to be: Bus 002 Device 002: ID 0bc2:50a1 Seagate RSS LLC and it is /dev/sdc

I have tried to exchange it in the script but the hdd doesn't even flinch when I run the script.

Sorry, but this is far above my knowlege so I behave clumsily, I fear.


All times are GMT -5. The time now is 08:48 AM.