• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Gimme a button to unmount  (Read 2497 times)
ptosch
Newbie
*

Karma: 0
Posts: 10


View Profile
« on: January 07, 2010, 01:07:12 AM »

Hello,

I regularly have to unmount my external 500GB USB-harddisk before I can pull it out safely. This means I must switch on my notebook, login with ssh onto the sheevaplug, unmount and shut down the notebook.
I want the Sheevaplug to have a button so I just have to push this button, the harddrive gets unmounted and I can pull it out safely. Unfortunately there is no such button Wink .

Anyone here who maybe solved it another way ? Is there a possibility to reconfigure the reset button ?

Any help is appreciated !

Regards,
  Peter
Logged

MarkF
Full Member
***

Karma: 7
Posts: 144


View Profile
« Reply #1 on: January 07, 2010, 09:41:50 AM »

Someone replied in another thread with this information.  I thought it might be helpful to you. Smiley

With one or more of these, and some software, you could use it/them for what ever you'd like.  Of course you'd need a USB hub for both your drive and this device; however, you might be able to use a non-powered one, if that is a concern.

Shiny Devices provides a single key USB "keyboard" (http://shinydevices.com/products/keystroke-diy)
Logged

Mark

ptosch
Newbie
*

Karma: 0
Posts: 10


View Profile
« Reply #2 on: January 08, 2010, 03:37:28 AM »

Thanks for the answer, but I wonīt spend that much money for just one button, thats ridiculous. I think I will try using  the console port for transmitting a signal to the sheevaplug. Unfortunately I donīt know where to start.
Greetings,
 Peter
Logged

theblop
Newbie
*

Karma: 0
Posts: 21


View Profile
« Reply #3 on: January 08, 2010, 05:03:18 AM »

I regularly have to unmount my external 500GB USB-harddisk before I can pull it out safely. This means I must switch on my notebook, login with ssh onto the sheevaplug, unmount and shut down the notebook.
I want the Sheevaplug to have a button so I just have to push this button, the harddrive gets unmounted and I can pull it out safely. Unfortunately there is no such button Wink .

Anyone here who maybe solved it another way ? Is there a possibility to reconfigure the reset button ?

Any help is appreciated !

Regards,
  Peter

Maybe auto-mounting/unmounting your USB drive with autofs would help?

More info here: http://wiki.debian.org/AutoFs
Logged

ptosch
Newbie
*

Karma: 0
Posts: 10


View Profile
« Reply #4 on: January 08, 2010, 06:55:23 AM »



Maybe auto-mounting/unmounting your USB drive with autofs would help?

More info here: http://wiki.debian.org/AutoFs

[/quote]

I already use autofs for automounting.

Besides I find the unmount feature in autofs pretty insecure. The manual says, the HDD gets unmounted when itīs not used. So before I plug off the USB-HDD I must know if it is already in mounted or unmounted state;

Now that is a point I didn't consider: I must have something like a feedback from the plug if the unmount procedure has succeeded (sometimes it is not possible to unmount a HDD). I think flashing one of the LEDs would be the right thing...

So it should look like: press button to unmount; wait some secs; if the blue LED is blinking longer than 5 seconds the unmount procedure succeeded; the USB-HDD can be now removed from the USB port.

Regards,
Peter
Logged

monkeyhybrid
Newbie
*

Karma: 1
Posts: 16


View Profile
« Reply #5 on: January 08, 2010, 07:10:23 AM »

Two or three user-customisable buttons, and one for power on / graceful shutdown would be nice. Along with user-customisable LEDs.
Logged

theblop
Newbie
*

Karma: 0
Posts: 21


View Profile
« Reply #6 on: January 08, 2010, 07:34:59 AM »

I don't know if you can do that with autofs, but maybe it's possible to call an external script when the drive is auto-unmounted. This script could change the LED to report the drive mount status.
Or if you're not in a hurry you could run that script from a cronjob every minute (not great but cheaper than a hardware solution)

Another possibility: what about plugging in a cheap USB mouse (you'll need a USB hub too of course) and map one of the buttons to call the unmount+LED check script? I have no idea how you can remap mouse buttons to call a program without being logged in but it's probably possible without too much hacking...


I already use autofs for automounting.

Besides I find the unmount feature in autofs pretty insecure. The manual says, the HDD gets unmounted when itīs not used. So before I plug off the USB-HDD I must know if it is already in mounted or unmounted state;

Now that is a point I didn't consider: I must have something like a feedback from the plug if the unmount procedure has succeeded (sometimes it is not possible to unmount a HDD). I think flashing one of the LEDs would be the right thing...

So it should look like: press button to unmount; wait some secs; if the blue LED is blinking longer than 5 seconds the unmount procedure succeeded; the USB-HDD can be now removed from the USB port.

Regards,
Peter
Logged

diarmuidw
Newbie
*

Karma: 1
Posts: 13


View Profile
« Reply #7 on: January 08, 2010, 08:06:35 AM »

Just add a cheapo keyboard and set up some simple scripts that run off commands like "gimme"

alias "gimme=umount /dev/sda1"

Cheers

Diarmuid

edit. Of course you will have to log in blind first!!!
« Last Edit: January 08, 2010, 04:02:49 PM by diarmuidw » Logged

Pages: [1]
Print
Jump to: