Why does unplugging USB stick WITHOUT dismount destroys always data?

J

Jason Stacy

According to the USB specification I should always be able to unplug an USB stick
from my computers without having arsik to loose data.

But this is not the case.

Whenever I copy something onto my USB stick and plug the USB stick out
then all the just copied data is lost.

Is occurs with different USB sticks and on different computers (under WinXP).

To prevent data loss I always have to dismount the USB stick first (by clicking on
the icon in the Systray).

Is there a way to enable "quick unplug" without having to dismount first?

Maybe there is an option to allow this.

J.
 
P

philo

Jason Stacy said:
According to the USB specification I should always be able to unplug an USB stick
from my computers without having arsik to loose data.

But this is not the case.

Whenever I copy something onto my USB stick and plug the USB stick out
then all the just copied data is lost.

Is occurs with different USB sticks and on different computers (under WinXP).

To prevent data loss I always have to dismount the USB stick first (by clicking on
the icon in the Systray).

Is there a way to enable "quick unplug" without having to dismount first?

Maybe there is an option to allow this.

J.


Play it safe and properly disconnect the drive
 
J

John Wunderlich

(e-mail address removed) (Jason Stacy) wrote in
According to the USB specification I should always be able to
unplug an USB stick from my computers without having arsik to
loose data.

But this is not the case.

Whenever I copy something onto my USB stick and plug the USB stick
out then all the just copied data is lost.

Is occurs with different USB sticks and on different computers
(under WinXP).

To prevent data loss I always have to dismount the USB stick first
(by clicking on the icon in the Systray).

Is there a way to enable "quick unplug" without having to dismount
first?

Maybe there is an option to allow this.

J.

The only option that comes close is to double-click "My Computer",
right-click on your USB drive -> Hardware (Tab) -> Select USB Drive ->
Properties -> Policies (Tab).

.... but usually "Quick Removal" is the default.

HTH,
John
 
T

Tom Stephenson

Jason said:
According to the USB specification I should always be able to unplug an USB stick
from my computers without having arsik to loose data.

But this is not the case.

Whenever I copy something onto my USB stick and plug the USB stick out
then all the just copied data is lost.

Is occurs with different USB sticks and on different computers (under WinXP).

To prevent data loss I always have to dismount the USB stick first (by clicking on
the icon in the Systray).

Is there a way to enable "quick unplug" without having to dismount first?

Maybe there is an option to allow this.

J.
You have to FLUSH the buffers (cache) so that the data is actually
written to the USB stick. That is why you should eject then remove.

Tom S.
 
J

Jim

Jason Stacy said:
According to the USB specification I should always be able to unplug an
USB stick
from my computers without having arsik to loose data.

But this is not the case.

Whenever I copy something onto my USB stick and plug the USB stick out
then all the just copied data is lost.

Is occurs with different USB sticks and on different computers (under
WinXP).

To prevent data loss I always have to dismount the USB stick first (by
clicking on
the icon in the Systray).

Is there a way to enable "quick unplug" without having to dismount first?

Maybe there is an option to allow this.

J.
The reason is that the copy operation may not be complete when control
returns to you. Hence, use the "safely remove hardware" button.
Another way would be to shutdown the computer, but such an operation seems a
bit drastic.
Jim
 
A

Arno Wagner

In comp.sys.ibm.pc.hardware.storage Jason Stacy said:
According to the USB specification I should always be able to unplug
an USB stick from my computers without having arsik to loose data.

Where did you read that? Since it is a technical impossibility
without using special filesystems, I highly doubt they put it
in there...
But this is not the case.
Whenever I copy something onto my USB stick and plug the USB stick out
then all the just copied data is lost.
Is occurs with different USB sticks and on different computers (under WinXP).
To prevent data loss I always have to dismount the USB stick first
(by clicking on the icon in the Systray).
Is there a way to enable "quick unplug" without having to dismount first?
Maybe there is an option to allow this.

No. There is an option to reduce the time after a write that you have
to wait. If you unplug during writing, you can cause an arbitrary
amount of damage, including loss of the filesystem.

What youa re observing is write buffering. You can disable that,
but you are still only safe if you either unmount or wait
long enough after each write.

Arno
 
H

Harry331

Jason Stacy wrote...
According to the USB specification I should always be able to unplug an USB stick
from my computers without having arsik to loose data.

But this is not the case.

Whenever I copy something onto my USB stick and plug the USB stick out
then all the just copied data is lost.

Is occurs with different USB sticks and on different computers (under WinXP).

To prevent data loss I always have to dismount the USB stick first (by clicking on
the icon in the Systray).

Is there a way to enable "quick unplug" without having to dismount first?

Maybe there is an option to allow this.


Googling your $Subject line ... and you're already here.

http://forums.techarena.in/xp-hardware/1058957.htm
 
E

Ed Light

Plug in the usb drive and wait several seconds. Right click on the usb
drive in windows explorer or equivalent and choose properties. Click on
the hardware tab. Click on the usb drive. Click on properties. Click on
policies.

I assume it's set to optimize for performance. Change it to optimize for
quick removal.

This turns off write cacheing, meaning that it no longer saves the data
to memory and feeds it to the usb drive as it will take it. The usb
drive now has to take on the whole file before the application con be
finished writing it.


--
Ed Light

Better World News TV Channel:
http://realnews.com

Bring the Troops Home:
http://bringthemhomenow.org
http://antiwar.com

Iraq Veterans Against the War:
http://ivaw.org
http://couragetoresist.org

Send spam to the FTC at
(e-mail address removed)
Thanks, robots.
 
M

Mike S.

According to the USB specification I should always be able to unplug an
USB stick
from my computers without having arsik to loose data.

But this is not the case.

Whenever I copy something onto my USB stick and plug the USB stick out
then all the just copied data is lost.

Is occurs with different USB sticks and on different computers (under WinXP).

USB devices are designed for hot plugging, but AFAIK there is no way to
tell an application that is writing to the drive, that it needs to stop
because someone has just yanked it out of the socket. Also, if the drive
is configured by Windows for performance, then write cacheing is in effect
which delays the write process until the system is idle ... when you may
already have unplugged the drive before that occurs.
To prevent data loss I always have to dismount the USB stick first (by
clicking on
the icon in the Systray).

Is there a way to enable "quick unplug" without having to dismount first?

Maybe there is an option to allow this.

Yes, under the hardware properties for the drive, select "optimize for
quick removal". This will turn off write cacheing which may reduce the
chances of data corruption after unsafe removal.
 
E

Eric Gisin

Device Manager, "optimize for quick removal".

Jason Stacy said:
According to the USB specification I should always be able to unplug an USB stick
from my computers without having arsik to loose data.

But this is not the case.

Whenever I copy something onto my USB stick and plug the USB stick out
then all the just copied data is lost.
because Windows caches writing to files.
 
S

Sandy

Are you allowing some time for the 'delayed write' process? Sometimes it
takes a little while before the data is actually written, at least for me.
 
J

JW

According to the USB specification I should always be able to unplug an USB stick
from my computers without having arsik to loose data.

But this is not the case.

Whenever I copy something onto my USB stick and plug the USB stick out
then all the just copied data is lost.

Is occurs with different USB sticks and on different computers (under WinXP).

To prevent data loss I always have to dismount the USB stick first (by clicking on
the icon in the Systray).

Is there a way to enable "quick unplug" without having to dismount first?

Maybe there is an option to allow this.

J.

From Explorer:
Properties, hardware, select the USB stick, properties, policies. Make
sure that the check box for "optimize for quick removal" is checked.
 
A

Arno Wagner

In comp.sys.ibm.pc.hardware.storage JW said:
On 21 Oct 2008 20:11:26 GMT (e-mail address removed) (Jason Stacy) wrote in
Message id: <[email protected]>:
From Explorer:
Properties, hardware, select the USB stick, properties, policies. Make
sure that the check box for "optimize for quick removal" is checked.

You still need to wait for any writes in progress to conclude.
It is highly advisalbe to "safely remove" even with this setting.

Arno
 
B

Bill in Co.

It doesn't, if you have write caching disabled and wait for the transfer of
data to finish.
 
J

JS

Once upon a time (more than 20 years ago) there existed a bus (HP-IB) that
could let you disconnect the hard drive even if it was in the middle of
transferring a large file. The drive could stay disconnected for as long as
you liked, when you reconnected the drive the remaining part of the file was
then written to the hard drive without any file corruption.
See: http://www.interfacebus.com/Design_Connector_GPIB.html

So in more than 20 years we have made absolutely no progress!

JS
http://www.pagestart.com
 
B

Bill Sharpe

Jason said:
According to the USB specification I should always be able to unplug an USB stick
from my computers without having arsik to loose data.

But this is not the case.

Whenever I copy something onto my USB stick and plug the USB stick out
then all the just copied data is lost.

Is occurs with different USB sticks and on different computers (under WinXP).

To prevent data loss I always have to dismount the USB stick first (by clicking on
the icon in the Systray).

Is there a way to enable "quick unplug" without having to dismount first?

Maybe there is an option to allow this.

J.
It doesn't always destroy data. You apparently are pulling the stick out
immediately after writing data to it. Give it a minute or two to
complete writing. I usually click the "safely remove hardware" icon, but
even when I don't, I have yet to lose any data on the stick.

Others have suggested an adjustment you can make, which I didn't know
about previously. I do learn from these forums.

Bill
 
O

Ofnuts

Jason said:
According to the USB specification I should always be able to unplug an USB stick
from my computers without having arsik to loose data.

But this is not the case.

Whenever I copy something onto my USB stick and plug the USB stick out
then all the just copied data is lost.

Is occurs with different USB sticks and on different computers (under WinXP).

Because writing the file to disk requires to things: 1) writing the file
data, and 2) updating the file allocation table (FAT). The new file data
is invisible until the FAT is updated (except for the computer writing
to it since it has its own updated copy of the FAT in memory).

The FAT update is delayed because when you write several files (which is
fairly common) this allows one single FAT update at the end which,
compared to systematic FAT update 1) saves time, and 2) prevents wear
(flash memory can only we written some many times (around 10000 times
IIRC)). The FAT is updated after some delay without activity (several
seconds) or if you explicitly tell XP you're done with the write (dismount).
To prevent data loss I always have to dismount the USB stick first (by clicking on
the icon in the Systray).

Is there a way to enable "quick unplug" without having to dismount first?

Maybe there is an option to allow this.

Yes there is, but doing so might increase Flash wear and slow down write
performance:

- insert drive
- right click on the drive to "Properties" dialog
- "Hardware" tab
- Select drive and click "Properties"
- In new properties dialog select "Policies" tab
- Check "Optimize for quick removal"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top