Easy way to unplug a USB memory stick

I have found a quick, easy and safe way to unplug a mounted USB memory stick.

The method may be wrong, but it serves me flawlessly for years.
It doesn’t require root privileges, unmounting of the partition(s) of the memory stick, tuning of KDE settings, or editing policy files.

  1. Quit the applications using the memory stick’s partitions.

  2. In any terminal window, say
    sync
    three times, waiting for every previous sync command to complete.

  3. It is unlikely that at this point there is data transfer occurring through memory stick, but, if it has LED indicator, watch for it. If there is data transfer, then wait.

  4. Unplug the memory stick.

Or in KDE 4 click the eject button next to the device in the “Deice Notifier”

Have you tried the device notifier ZStefan?

Your way sounds harder, not easier.

all I can say is…:sarcastic:! lol

I run KDE3. Where is the Device Notifier in KDE4? In the system tray?

You can install and run the dolphin file manager under KDE3 as well, that allows you to simply right click on the device (in the left pane) and unmount/eject it.

As does ‘Konqueror’

I’ve never had a problem just unpluging it.

the little light goes out, I unplug it,

never had a problem, no lost data

same goes for my external HDD.

I use thunar

halmount -u /media/<whatever>
is a command line method that I suspect isn’t that well known.

halmount -u /media/<whatever>
is a command line method that I suspect isn’t that well known.

IIRC you need the ivman package installed to provide that command. Please correct me if I’m wrong on this.

I wouldn’t do this for an encrypted external device though, you could corrupt the entire thing :S. Always run sync first.

You’re correct. If it isn’t installed, when you type halmount zypper appears on your command line and offers to download and install it for you there and then, without going into YaST. Cute.

On Fri, 2009-09-04 at 23:46 +0000, ZStefan wrote:
> I have found a quick, easy and safe way to unplug a mounted USB memory
> stick.
>
> The method may be wrong, but it serves me flawlessly for years.
> It doesn’t require root privileges, unmounting of the partition(s) of
> the memory stick, tuning of KDE settings, or editing policy files.
>
>
> 1) Quit the applications using the memory stick’s partitions.

ok.

>
>
> 2) In any terminal window, say
> sync
> three times, waiting for every previous sync command to complete.

nope.

>
>
> 3) It is unlikely that at this point there is data transfer occurring
> through memory stick, but, if it has LED indicator, watch for it. If
> there is data transfer, then wait.

risky.

>
>
> 4) Unplug the memory stick.
>
>

not safe.

Best way is to tell it to safely remove hardware (KDE) and if that
succeeds, remove it. However, even so, since Linux distros are true
multi-user (unlike ANY Windows variant), there is a chance that the
device could be in use.

There isn’t a silver bullet way to do this today.

Devices that are inhernetly single user in purpose tend to “fail” in a
multi-user paradigm. The “solution” (and it really isn’t a solution but
a constraint) is to assume that the ONLY the primary desktop user has
the ability to control certain devices. Then, what I said about telling
KDE to safely remove is the “correct” procedure. Gnome may have
something similar.

even in Konqueror you can right click on the usb stick and select “Safely Remove”, it did work for me on suse 10.2, kde 3.5

Wow ! you’ve got guts. USB command structure being controlled through the host controller may leave your host controller locked into an infinite loop thusly interfering with any other USB device in use. Also, unless you explicitely unmount or eject the device the system may decide the device has malfunctioned and refuse to re-enable it at a future date.

regards
Rick

will I guess I’m just lucky. going on 2 years now for my western digital “My Book” and a bunch of different usb drives. suse, mandrivia, xp, vista, and now win7 and I’ve never had a problem. I also do not use an encrypted file system on any of them so maybe that might have something to do with it. I’ve just never had a problem with it

I just finsihed restoring my friends “My Book” she had 30+ years of genealogy stored for back-up (3rd time she used the drive under Windows XP) and just unplugged it not thinking. This cooked her USB port, and the logic board for the drive. Had to connect the drive direct into computer buss to recover information. She was sure sweating since she thought she had a reliable back-up.
I’m just warning people to take standard precautions, how valuable is your information, how valuable is your time? how valuable is your hardware too? One hasty decision can ruin your whole day.lol!

and 3 computers, 2 usb hubs, and 3 years later my “MyBook”, 6 usb sticks, 5 phones,2 cameras, and 1 usb headset and every piece of this hardware is fine. I must be Just lucky.

I agree you are lucky and leave it at that ok.