PC Review


Reply
Thread Tools Rate Thread

ALWAYS close USB flash drive before removing?

 
 
Eddie
Guest
Posts: n/a
 
      17th Nov 2009
Do I always need to close or stop a USB flash drive before I remove
it?

I'm using XP. In XP's Device Manager there is an entry for Disk
Drives and when I look at the Policies tab for the flash drive, it
says:

"Optimized For Quick Removal. This setting enables
write caching on the disk and in Windows, so you can
disconnect this device without using the Safe Removal
icon."

My friends get upset if I don't use the Safe Removal process when
their USB memory is in my PC. Maybe they're repeating a mistake? Or
is there a reason which I'm missing that says I should always use
Safe Removal?
 
Reply With Quote
 
 
 
 
David Brown
Guest
Posts: n/a
 
      17th Nov 2009
Eddie wrote:
> Do I always need to close or stop a USB flash drive before I remove
> it?
>
> I'm using XP. In XP's Device Manager there is an entry for Disk
> Drives and when I look at the Policies tab for the flash drive, it
> says:
>
> "Optimized For Quick Removal. This setting enables
> write caching on the disk and in Windows, so you can
> disconnect this device without using the Safe Removal
> icon."
>
> My friends get upset if I don't use the Safe Removal process when
> their USB memory is in my PC. Maybe they're repeating a mistake? Or
> is there a reason which I'm missing that says I should always use
> Safe Removal?


The main problem with removing USB drives without "safe removal" (or
umount on Linux) is that the OS could still have data in its write
buffers. If you remove the flash drive before the write is complete,
you will lose data, corrupting the file that is being written, and
possibly corrupting the FAT (and therefore lots more of the flash disk).

The "optimize for quick removal" makes windows save as little in the
write buffers as possible, minimising your risks, but you are still
risking data loss and file corruption. The other choice is to store
lots more in the write buffers - that makes the flash disk far faster
for writing, especially for writing lots of small files, but means
greater risk of corruption if you don't remove it safely.

So you should /always/ use safe removal, unless you haven't written
anything to the disk.
 
Reply With Quote
 
GT
Guest
Posts: n/a
 
      17th Nov 2009
"Eddie" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Do I always need to close or stop a USB flash drive before I remove
> it?
>
> I'm using XP. In XP's Device Manager there is an entry for Disk
> Drives and when I look at the Policies tab for the flash drive, it
> says:
>
> "Optimized For Quick Removal. This setting enables
> write caching on the disk and in Windows, so you can
> disconnect this device without using the Safe Removal
> icon."
>
> My friends get upset if I don't use the Safe Removal process when
> their USB memory is in my PC. Maybe they're repeating a mistake? Or
> is there a reason which I'm missing that says I should always use
> Safe Removal?


Windows doesn't always write immediately to a USB stick, but quickly caches
things and writes to the USB drive at its own speed (like a print queue) so
if you drag files across, then immediately remove the stick you might find
things missing or corrupted. If the stick has an LED, then you can tell when
its ready/finished.


 
Reply With Quote
 
Arno
Guest
Posts: n/a
 
      17th Nov 2009
In comp.sys.ibm.pc.hardware.storage GT <ContactGT_rem_ove_@hotmail.com> wrote:
> "Eddie" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Do I always need to close or stop a USB flash drive before I remove
>> it?
>>
>> I'm using XP. In XP's Device Manager there is an entry for Disk
>> Drives and when I look at the Policies tab for the flash drive, it
>> says:
>>
>> "Optimized For Quick Removal. This setting enables
>> write caching on the disk and in Windows, so you can
>> disconnect this device without using the Safe Removal
>> icon."
>>
>> My friends get upset if I don't use the Safe Removal process when
>> their USB memory is in my PC. Maybe they're repeating a mistake? Or
>> is there a reason which I'm missing that says I should always use
>> Safe Removal?


> Windows doesn't always write immediately to a USB stick, but quickly caches
> things and writes to the USB drive at its own speed (like a print queue) so
> if you drag files across, then immediately remove the stick you might find
> things missing or corrupted. If the stick has an LED, then you can tell when
> its ready/finished.


That is dangerous. It may delee or interrupt writes for a short
time due to other things. The only safe opton is to use safe
removal and o wait until windows says that the stick can be removed.

That said, if you have mostlysmall writes, just janking the stick
out oftnen works, but can also result in mor or less subtle data
corruption, up to an including loss of all data on the stick.

Arno


--
Arno Wagner, Dr. sc. techn., Dipl. Inform., CISSP -- Email: (E-Mail Removed)
GnuPG: ID: 1E25338F FP: 0C30 5782 9D93 F785 E79C 0296 797F 6B50 1E25 338F
----
Cuddly UI's are the manifestation of wishful thinking. -- Dylan Evans




















 
Reply With Quote
 
Arno
Guest
Posts: n/a
 
      17th Nov 2009
In comp.sys.ibm.pc.hardware.storage Eddie <(E-Mail Removed)> wrote:
> Do I always need to close or stop a USB flash drive before I remove
> it?


> I'm using XP. In XP's Device Manager there is an entry for Disk
> Drives and when I look at the Policies tab for the flash drive, it
> says:


> "Optimized For Quick Removal. This setting enables
> write caching on the disk and in Windows, so you can
> disconnect this device without using the Safe Removal
> icon."


That is basically a lie by omission. You still need to
wait until all writes are complete. The difference is that
windows will try hard to write immediately, but a) writes
can take time and larger ones can take a lot of time
and b) some other things can still prevent windows to
write immediately. Often this works, but you may still
loose all data on the stick or get corruption if you trust
this statement.

> My friends get upset if I don't use the Safe Removal process when
> their USB memory is in my PC. Maybe they're repeating a mistake? Or
> is there a reason which I'm missing that says I should always use
> Safe Removal?


Your friends are right. There are some advanced journalling
filesystems that can reliably minimize corruption if you remove
an USB stick during a write, but Wndows is not using them
and neither FAT nor NTFS is safe to remove during a write.

Obviously a file tat is bing written during remmoval will
always have some corruption as result, there is no way around
that.

Arno

--
Arno Wagner, Dr. sc. techn., Dipl. Inform., CISSP -- Email: (E-Mail Removed)
GnuPG: ID: 1E25338F FP: 0C30 5782 9D93 F785 E79C 0296 797F 6B50 1E25 338F
----
Cuddly UI's are the manifestation of wishful thinking. -- Dylan Evans
 
Reply With Quote
 
Flasherly
Guest
Posts: n/a
 
      17th Nov 2009
On Nov 17, 5:26 am, Eddie <du...@invalid.com> wrote:
> Do I always need to close or stop a USB flash drive before I remove
> it?


Just remove it after done. Mine burnt out when I left it in -- end
LED light always flashed whether being written to not while it was
working.
 
Reply With Quote
 
Eddie
Guest
Posts: n/a
 
      17th Nov 2009
On 11:32 17 Nov 2009, Arno wrote:

> In comp.sys.ibm.pc.hardware.storage Eddie <(E-Mail Removed)>
> wrote:
>> Do I always need to close or stop a USB flash drive before I
>> remove it?

>
>> I'm using XP. In XP's Device Manager there is an entry for
>> Disk Drives and when I look at the Policies tab for the flash
>> drive, it says:

>
>> "Optimized For Quick Removal. This setting enables
>> write caching on the disk and in Windows, so you can
>> disconnect this device without using the Safe Removal
>> icon."

>
> That is basically a lie by omission. You still need to
> wait until all writes are complete. The difference is that
> windows will try hard to write immediately, but a) writes
> can take time and larger ones can take a lot of time
> and b) some other things can still prevent windows to
> write immediately. Often this works, but you may still
> loose all data on the stick or get corruption if you trust
> this statement.
>
>> My friends get upset if I don't use the Safe Removal process
>> when their USB memory is in my PC. Maybe they're repeating a
>> mistake? Or is there a reason which I'm missing that says I
>> should always use Safe Removal?

>
> Your friends are right. There are some advanced journalling
> filesystems that can reliably minimize corruption if you remove
> an USB stick during a write, but Wndows is not using them
> and neither FAT nor NTFS is safe to remove during a write.
>
> Obviously a file tat is bing written during remmoval will
> always have some corruption as result, there is no way around
> that.
>
> Arno


Suppose I wait a few minutes after I moved a file to the flash
drive. Will the write cache be written out to the flash drive in
that period? Working like that is preferable because XP's Safe
Removal utility can be fiddly to launch.

I mean to ask, is it simply a matter of leaving ENOUGH TIME for the
write cache to be emptied by XP?

Or does the emptying of the write cache depend on OTHER FACTORS than
elapsed time?
 
Reply With Quote
 
Arno
Guest
Posts: n/a
 
      17th Nov 2009
In comp.sys.ibm.pc.hardware.storage Eddie <(E-Mail Removed)> wrote:
> On 11:32 17 Nov 2009, Arno wrote:


>> In comp.sys.ibm.pc.hardware.storage Eddie <(E-Mail Removed)>
>> wrote:
>>> Do I always need to close or stop a USB flash drive before I
>>> remove it?

>>
>>> I'm using XP. In XP's Device Manager there is an entry for
>>> Disk Drives and when I look at the Policies tab for the flash
>>> drive, it says:

>>
>>> "Optimized For Quick Removal. This setting enables
>>> write caching on the disk and in Windows, so you can
>>> disconnect this device without using the Safe Removal
>>> icon."

>>
>> That is basically a lie by omission. You still need to
>> wait until all writes are complete. The difference is that
>> windows will try hard to write immediately, but a) writes
>> can take time and larger ones can take a lot of time
>> and b) some other things can still prevent windows to
>> write immediately. Often this works, but you may still
>> loose all data on the stick or get corruption if you trust
>> this statement.
>>
>>> My friends get upset if I don't use the Safe Removal process
>>> when their USB memory is in my PC. Maybe they're repeating a
>>> mistake? Or is there a reason which I'm missing that says I
>>> should always use Safe Removal?

>>
>> Your friends are right. There are some advanced journalling
>> filesystems that can reliably minimize corruption if you remove
>> an USB stick during a write, but Wndows is not using them
>> and neither FAT nor NTFS is safe to remove during a write.
>>
>> Obviously a file tat is bing written during remmoval will
>> always have some corruption as result, there is no way around
>> that.
>>
>> Arno


> Suppose I wait a few minutes after I moved a file to the flash
> drive. Will the write cache be written out to the flash drive in
> that period? Working like that is preferable because XP's Safe
> Removal utility can be fiddly to launch.


> I mean to ask, is it simply a matter of leaving ENOUGH TIME for the
> write cache to be emptied by XP?


It is, but there is no reliable way to tell how much time is enough.

> Or does the emptying of the write cache depend on OTHER FACTORS than
> elapsed time?


The time the emptying takes can depend on other usage of the
filesystem, for example. Say you have a large weite request
that has aged in the background and reached the "must flush"
timeout, than that will be written before the USB stick is.

There are other conditions that can delay writing.

The problem is that there is no way to tell from the outside
and you will get corruption if you remove in the wrong Moment.
That said, it typically (low I/O load, no large writes, no
high CPU/hogh memory load tasks) works.

Arno
--
Arno Wagner, Dr. sc. techn., Dipl. Inform., CISSP -- Email: (E-Mail Removed)
GnuPG: ID: 1E25338F FP: 0C30 5782 9D93 F785 E79C 0296 797F 6B50 1E25 338F
----
Cuddly UI's are the manifestation of wishful thinking. -- Dylan Evans
 
Reply With Quote
 
Rod Speed
Guest
Posts: n/a
 
      17th Nov 2009
David Brown wrote:
> Eddie wrote:
>> Do I always need to close or stop a USB flash drive before I remove
>> it?
>>
>> I'm using XP. In XP's Device Manager there is an entry for Disk
>> Drives and when I look at the Policies tab for the flash drive, it
>> says:
>>
>> "Optimized For Quick Removal. This setting enables
>> write caching on the disk and in Windows, so you can
>> disconnect this device without using the Safe Removal
>> icon."
>>
>> My friends get upset if I don't use the Safe Removal process when
>> their USB memory is in my PC. Maybe they're repeating a mistake? Or
>> is there a reason which I'm missing that says I should always use
>> Safe Removal?

>
> The main problem with removing USB drives without "safe removal" (or
> umount on Linux) is that the OS could still have data in its write
> buffers. If you remove the flash drive before the write is complete,
> you will lose data, corrupting the file that is being written, and
> possibly corrupting the FAT (and therefore lots more of the flash
> disk).
> The "optimize for quick removal" makes windows save as little in the
> write buffers as possible, minimising your risks, but you are still
> risking data loss and file corruption. The other choice is to store
> lots more in the write buffers - that makes the flash disk far faster
> for writing, especially for writing lots of small files, but means
> greater risk of corruption if you don't remove it safely.


> So you should /always/ use safe removal, unless you haven't written anything to the disk.


Thats just plain wrong. If you have it optimized for quick removal and its
been a while since the write, its fine to unplug it without safe removal.


 
Reply With Quote
 
David W. Hodgins
Guest
Posts: n/a
 
      17th Nov 2009
On Tue, 17 Nov 2009 11:15:19 -0500, Eddie <(E-Mail Removed)> wrote:

> Or does the emptying of the write cache depend on OTHER FACTORS than
> elapsed time?


Suppose the antivirus program is downloading a large update, that
you are not yet aware of. The writes to the flash drive may, or
may not be completed quickly. The only way to be sure, is to use
the remove safely option.

The only time it's guaranteed to be safe without that, is if you
haven't written anything to the drive. Your friend is correct
that you should always use the safely remove. Even if 99% of the
time it works ok without it, it's his drive that could effectively
be erased due to fat corruption.

Also, using the "Optimized For Quick Removal" option increases the
number of small writes to the drive, which will speed up the wearing
out of the drive. Flash drives have a limited number of writes.

Regards, Dave Hodgins

--
Change nomail.afraid.org to ody.ca to reply by email.
(nomail.afraid.org has been set up specifically for
use in usenet. Feel free to use it yourself.)
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ALWAYS close USB flash drive before removing? Eddie Computer Hardware 51 29th Nov 2009 04:55 PM
ALWAYS close USB flash drive before removing? Eddie Storage Devices 57 28th Nov 2009 09:33 PM
removing usb flash drive Amanda Windows Vista Hardware 1 4th Mar 2008 02:07 PM
Problem when removing USB flash drive Sammy bin Snoozin Storage Devices 12 7th Oct 2007 03:42 PM
Removing a flash drive Eldritch Windows XP General 5 6th Feb 2005 05:45 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:33 AM.