savely remove Western Digital Passport under OpenSuse 11.2

Hello all,

I have a WD passport and I was never able to remove it properly.
In Opensuse 11.1 I used to force it to stop by issuing the following command:

/sbin/sdparm --command=stop /dev/sdb1

However, now that I upgraded to Opensuse 11.2 I’m unable to make it stop, it start to spin immediately after I issue the command.

I tried everything on this site with little success:
https://bugs.launchpad.net/ubuntu/+bug/117713

Thanks for the help.

What happens with umount?

Sorry I did not explained the problem properly.

The Western Digital Passport external drive can be unmount normally. The issue is that, even unmounted it is still spinning and the led light is on.

I read a lot regarding this problem in several forums and the previous solution was to manually stop the HDD with sdparm like I mentioned above.

My “new” problem is, since I upgrade to OpenSuse 11.2, the HDD does not spin down anymore with sdparm (actually it does for less than a second and mediately start again).

I know that Ubuntu users have an extra problem with the udev rules (60-persistent-storage.rules), but this rule is absent in OpenSuse.

Thanks you for the attention.

I just notice that my USB devices are not automatically mounted after the upgrade from OpenSuse 11.1 to 11.2. Now I must click into the device on dolphin or in the device manager to get it mounted. Is this related to the issue I’m having to stop the HDD?

If it is relevant, I made the “upgrade in place” following this instructions:
Upgrade/Supported - openSUSE

Shouldn’t matter. My WD Elements 500 works fine
I know it’s not the same though;)
Not sure of a solution. Google is best bet.

I had my share of “googling” this issue. By the way it is not for the first time it happened to me. I had a Fedora 11 box with the same problem and the only solution was to change to Opensuse 11.1. I guess that the problem is due to the “improvements” in both distros.

I have another external USB HD, it is actually a internal HD in a case, that shutdowns down nicely with the command eject. Does your WD Elements 500 has an external power or it is powered via usb? Maybe only the usb powered HDD are affected.

Do you unmount manually via the terminal or using the eject button on KDE?

Thanks for the attention, I guess that the old saying is always true. “Why upgrade when things work!”

It has it’s own power
It spins down even when mounted. I don’t have to do anything. I never unmount/eject or anything. It’s plugged in permanently. It is visible in /media and has an entry in ‘Places’. It mounts when clicked in ‘Places’ and takes a good few seconds to spin to life. Then it’s fine and speedy.
But leave it a while doing nothing and it spins down, so when you want it again it will take a few seconds again.

That is exactly what I’m doing now. I unmount/sync and then wait for 10 min until it spins down by itself. It is annoying to wait such a long time to remove the HDD but I think it is better than damaging it by removing while it is still spinning (The noise I hear when I do that cannot be good!).

Thanks again. Maybe in a near future, when more people start using Opensuse 11.2, someone comes up with a better solution.

OK I hear you. But so long as you have safely removed it should be OK. Mine powers off when the machine is shut down.

Update:

The guys at the forum I mentioned above (https://bugs.launchpad.net/ubuntu/+bug/117713) came up with the command “devkit-disks”.

I just added the script below, that uses devkit-disks, as an action to the kde4 “device-notifier” and I can safely remove my external HDD now.

Here is the script in case anyone else is interested:

> HDD=$(df | grep PASSPORT | awk ‘{print $1}’)
> if “${HDD}” == “” ]; then
echo "PASSPORT not mounted"i
> else
> # devkit-disks takes /dev/sdb as argument
> devkit-disks --unmount $HDD > /dev/null
> sleep 2
> HD=$(echo $HDD | sed ‘s/[0-9]*//g’)
> devkit-disks --detach $HD
> fi

Just change “PASSPORT” to the name of the mount-point of your HDD.

Sorry the amateur script, by at least I can remove the HDD without waiting until it spins down by itself.