Unmounting external USB drives in Ubuntu 9.04

UPDATE root issue discussed below was fixed in Ubuntu 9.10 – unmounting and spinning down the drive works just fine from GUI

As some people know there are problems with correct unplugging of external USB hard drives on linux, Ubuntu in particular. The problem is that none of graphical managers support drive spindown when unmounting/ejecting the external hard drive. This can cause severe damage to HDD.

There’s an old bug in LP for that. The summary is that you can use a script by Clem-Vangelis and Dave Rosky to do the work. Later someone posted a link to scipt by Yan Li, which does even some more stuff.

But since Ubuntu 9.04 those scripts have stopped working – the drive kept spinning. Googling around I found a similar problem and found out the problem was in udev rules. There was a manul solution in comments of LP bug #388506 mentioning udev rules editing: in ubuntu 9.04 I needed to copy the 60-persistent-storage.rules file, modify ACTION!="add|change" to ACTION!="add". This way the scripts worked. Somehow when this rule is present my home partition couldn’t be mounted. So this rules file must be removed after external drive unmount.

To make things easier I merged the scripts by Clem-Vangelis,  Dave Rosky and Yan Li, updated it with udev rules workaround and done some other things. The script is as follows:

Continue reading “Unmounting external USB drives in Ubuntu 9.04”

Advertisements

bug in Nokia 3120 Classic’s alarm

There’s a bug in my Nokia 3120 Classic, firmware v 07.16 27-05-08 RM-364.

Steps to reproduce:

1 Enable ‘Active Stand By’ Update 05.10.2008: after all this doesn’t affect the issue
2 Put the phone on charge (eg for a night while you sleep)
3 Put your alarm on
4 Alarm turns on in the morning.
Expected result: you click ‘Snoose’ and dream for 10 more minutes.
Actual result: there’s no ‘Snooze’ button. ‘Menu’ is instead. Keypad seems to be unlocked. Pressing any key switches alarm off and failes you on getting right on time. Later, the phone blinks after hanging off a.k.a. pressing the “red phone button”
Solution: after charging your phone turn it off and then turn it on again (a.k.a restart it) OR disable the active stand by

Seems the Nokia guys should be aware of it link#1, link#2.