Jump to content


Updates for Safely Remove Hardware issues?


14 replies to this topic

#1 bizzybody

    Member

  • Members
  • PipPip
  • 39 posts

Posted 24 January 2009 - 01:20 AM

I have a 120 gig USB hard drive that Vista refuses to let go of when I tell it to safely remove it. No programs running, no user processes accessing it at all, yet Windows clamps some handles on it and will not let go of them when told to do so.

This is a nasty bug that Windows 2000 and XP have too. What *should happen* when the user selects a device to safely remove is Windows should flush all pending writes to it and LET GO OF ALL ITS FILE HANDLES to anything on that device. If the drive is being looked at with Explorer, simply 'kick' it to another drive, exactly as it does when the user ejects a CD/DVD while it's open in Explorer.

If there actually are any user files open on that drive, Windows should pop up a list of open files and the applications that have them open. There should also be a button the user can click to tell Windows it's bleeping wrong, those files are NOT OPEN- Do what I say and Safely Remove that drive. Windows ought to be able to scan its own RAM to see that files aren't open and programs aren't running.

I have it do this all the time to me when I have created a folder, put some files in it, opened those files, closed those files AND the program used to open them, then Vista will not allow a user with Administrative rights to delete those files and/or the folder they are in until the computer has been rebooted.

Are there any updates that cure it? If so, does Autopatcher download them?

If there aren't any fixes, I wish I could make Microsoft put a 'tiger team' on these two problems until they come up with patches for 2000, XP and Vista that cure them! Chain the programmers to their desks until they fix these BUGS that have been in Windows for YEARS! "You wanna go home? Then make Safely Remove Hardware WORK 100% of the time!" ;) I'd think they'd be embarrassed to let this go through three versions of Windows without getting it fixed.

#2 shaz

    Member

  • Members
  • PipPip
  • 48 posts

Posted 24 January 2009 - 03:52 AM

 bizzybody, on Jan 24 2009, 11:20 AM, said:

I have a 120 gig USB hard drive that Vista refuses to let go of when I tell it to safely remove it. No programs running, no user processes accessing it at all, yet Windows clamps some handles on it and will not let go of them when told to do so.

This is a nasty bug that Windows 2000 and XP have too. What *should happen* when the user selects a device to safely remove is Windows should flush all pending writes to it and LET GO OF ALL ITS FILE HANDLES to anything on that device. If the drive is being looked at with Explorer, simply 'kick' it to another drive, exactly as it does when the user ejects a CD/DVD while it's open in Explorer.

If there actually are any user files open on that drive, Windows should pop up a list of open files and the applications that have them open. There should also be a button the user can click to tell Windows it's bleeping wrong, those files are NOT OPEN- Do what I say and Safely Remove that drive. Windows ought to be able to scan its own RAM to see that files aren't open and programs aren't running.

I have it do this all the time to me when I have created a folder, put some files in it, opened those files, closed those files AND the program used to open them, then Vista will not allow a user with Administrative rights to delete those files and/or the folder they are in until the computer has been rebooted.



Are there any updates that cure it? If so, does Autopatcher download them?

If there aren't any fixes, I wish I could make Microsoft put a 'tiger team' on these two problems until they come up with patches for 2000, XP and Vista that cure them! Chain the programmers to their desks until they fix these BUGS that have been in Windows for YEARS! "You wanna go home? Then make Safely Remove Hardware WORK 100% of the time!" ;) I'd think they'd be embarrassed to let this go through three versions of Windows without getting it fixed.


I hope i don't get shot saying to do this but have u tried downloading a program called unlocker
you can open my computer right click on the drive and select unlocker and it will show u whats locking it and allow you the option of killing the process or just unlocking it.

Also check that you haven't got it set on optimise for quick removal, by right clicking the drive and selecting properties, then select advanced tab.

if its on the first option of optimise for quick removal change to the second option to write to windows cache.

I had the same problem as you and after i did this (changing 2 write 2 windows cache) i had no more issues of safely removing my portable drive, which as it happens is also a 120gb usb hard drive.
Hope this works, if not contact me and i will talk you through it.

Cheers
Shaz

#3 James

    Advanced Member

  • Veterans
  • PipPipPipPipPipPip
  • 1,212 posts
  • Gender:Male
  • Location:UK

Posted 24 January 2009 - 12:01 PM

There is more than one problem being described here, but the problem of Safe Removal being delayed only occurs with external drives formatted for NTFS. It does not occur if the external drive is formatted FAT or FAT32.

The option to "Optimize for speed" and "Optimize for quick removal" are not well documented by Microsoft, but there is some evidence that these only apply to FAT32 volumes, not to NTFS volumes.

Whether write caching is enabled depends upon whether the drive is classified by Windows as a "fixed" drive or as a "removable" drive. Generally speaking, Windows classifies all Flash Drives as "removable" and all external Hard Drives as "fixed". That is governed by the way the hardware is configured and is not, AFAIK, alterable by an end user. In my view, however, NO external drive should have Write Caching enabled. That is a recipe for certain data corruption sooner or later, unless you are very patient, very experienced and allow for it, or if you never unplug your external drive.

If you:
  • have write caching enabled on the external drive
  • actually write to the external drive
  • click on hardware removal
  • actually unplug the drive
all in one stream of activity over a few seconds, then you are guaranteed to have data corruption, because Windows will not actually write eveything to the drive until the CPU is idle. That may be quite some time later. In the meantime the data is being held in RAM (not on the drive) because that is the definition of write caching.

If that is your only problem then, after clicking on Remove Hardware there will be a further delay before the drive icon disappears from the Explorer window as well as from the System Tray. That delay will be at least 5 seconds and maybe as long as 30 seconds. If you cannot wait, then you need the equivalent of the Linux sync command, which flushes all write cached data to the drive.

If one or more programs are holding open handles to the external drive, that is another matter entirely. In that case unlocker will help. Also make sure you do not have any Command Prompt windows open, which point to the external drive, because the Command Prompt also locks the drive.

And no, I do not know of any Microsoft updates that change any of this behaviour.

However, Mark Russinovich wrote the equivalent of the Linux sync command whilst he was at Sysinternals (since bought out by Microsoft). Mark wrote this some 12, or more, years ago, when it was called NTFlush. His tool is still available under a new name and may be downloaded from the Sync v2.0 page.


--

#4 shaz

    Member

  • Members
  • PipPip
  • 48 posts

Posted 24 January 2009 - 12:15 PM

 James, on Jan 24 2009, 11:01 PM, said:

There is more than one problem being described here, but the problem of Safe Removal being delayed only occurs with external drives formatted for NTFS. It does not occur if the external drive is formatted FAT or FAT32.

The option to "Optimize for speed" and "Optimize for quick removal" are not well documented by Microsoft, but there is some evidence that these only apply to FAT32 volumes, not to NTFS volumes.

Whether write caching is enabled depends upon whether the drive is classified by Windows as a "fixed" drive or as a "removable" drive. Generally speaking, Windows classifies all Flash Drives as "removable" and all external Hard Drives as "fixed". That is governed by the way the hardware is configured and is not, AFAIK, alterable by an end user. In my view, however, NO external drive should have Write Caching enabled. That is a recipe for certain data corruption sooner or later, unless you are very patient, very experienced and allow for it, or if you never unplug your external drive.

If you:
  • have write caching enabled on the external drive
  • actually write to the external drive
  • click on hardware removal
  • actually unplug the drive
all in one stream of activity over a few seconds, then you are guaranteed to have data corruption, because Windows will not actually write eveything to the drive until the CPU is idle. That may be quite some time later. In the meantime the data is being held in RAM (not on the drive) because that is the definition of write caching.

If that is your only problem then, after clicking on Remove Hardware there will be a further delay before the drive icon disappears from the Explorer window as well as from the System Tray. That delay will be at least 5 seconds and maybe as long as 30 seconds. If you cannot wait, then you need the equivalent of the Linux sync command, which flushes all write cached data to the drive.

If one or more programs are holding open handles to the external drive, that is another matter entirely. In that case unlocker will help. Also make sure you do not have any Command Prompt windows open, which point to the external drive, because the Command Prompt also locks the drive.

And no, I do not know of any Microsoft updates that change any of this behaviour.

--

James in response to ur reply, my external drive is in the ntfs format, and it was the only way i could fix it as unlocker did come up saying that nothing was locking it when it was locked. Changing the setting in xp to write to cache was the only thing that worked for me, but perhaps vista is different. I personally have never had any corruption of any kind to my drive at all. Yes I unplug it using the safe remove option and yes i have it write to cache. It has never corrupted on me at all.

But as i said at the risk of repeating myself, maybe its different with vista.

Cheers Shaz

#5 James

    Advanced Member

  • Veterans
  • PipPipPipPipPipPip
  • 1,212 posts
  • Gender:Male
  • Location:UK

Posted 24 January 2009 - 12:39 PM

If it works for you, that is fine. I was just trying to warn other users, who may be less experienced, or who may be in a hurry, that there are hidden dangers in write caching.

Also, it looks like you read my post before I added the final paragraph about the NTFlush/Sync v2.0 tool, which others may find useful.

I can generally recommend any tool written by Mark Russinovich, with the proviso that his programs are generally written for more advanced users...

--

#6 bizzybody

    Member

  • Members
  • PipPip
  • 39 posts

Posted 24 January 2009 - 08:46 PM

Yes, I have it set to optimize for quick removal, and I've tried Unlocker and Sync (formerly from Sysinternals, now from Microsoft but not updated since MS bought them) and a couple of other utilities.

None have worked to force Windows to let go of external NTFS hard drives. Microsoft should've fixed this problem a long time ago!

#7 shaz

    Member

  • Members
  • PipPip
  • 48 posts

Posted 24 January 2009 - 10:08 PM

James. Thats cool.

Bizzybody: try what i said for the writing to cache, just to see if it works as you can always change it back.!!!!!!

Regards
Shaz:)

#8 shaz

    Member

  • Members
  • PipPip
  • 48 posts

Posted 25 January 2009 - 10:11 AM

 bizzybody, on Jan 25 2009, 07:46 AM, said:

Yes, I have it set to optimize for quick removal, and I've tried Unlocker and Sync (formerly from Sysinternals, now from Microsoft but not updated since MS bought them) and a couple of other utilities.

None have worked to force Windows to let go of external NTFS hard drives. Microsoft should've fixed this problem a long time ago!


Bizzybody, u have probably already done this with sync but just in case u overlooked:

did you go to cmd prompt and type
sync -r X: (X: is the letter of your drive)

For example I just did it on mine and i typed

Sync -r H: as H is the letter of my drive and it worked and I also did it on the c drive obviously changing the drive letter from H to C:.

Did you ensure you put a space after the word sync?

Im also wondering and maybe James can clear this up but if sync and unlocker didn't work, could it be possibly a spyware issue????

#9 Guest_maxsisac_*

  • Guests

Posted 25 January 2009 - 11:32 AM

try USB Safely Remove program
all your problems will be over

#10 bizzybody

    Member

  • Members
  • PipPip
  • 39 posts

Posted 25 January 2009 - 06:39 PM

 shaz, on Jan 25 2009, 04:11 AM, said:

Bizzybody, u have probably already done this with sync but just in case u overlooked:

did you go to cmd prompt and type
sync -r X: (X: is the letter of your drive)

For example I just did it on mine and i typed

Sync -r H: as H is the letter of my drive and it worked and I also did it on the c drive obviously changing the drive letter from H to C:.

Did you ensure you put a space after the word sync?

Im also wondering and maybe James can clear this up but if sync and unlocker didn't work, could it be possibly a spyware issue????

And it comes back with FAILED.

The best solution is for Microsoft to get a damn clue and release patches for 2000, XP and Vista to fix this.

#11 shaz

    Member

  • Members
  • PipPip
  • 48 posts

Posted 25 January 2009 - 11:41 PM

 bizzybody, on Jan 26 2009, 05:39 AM, said:

And it comes back with FAILED.

The best solution is for Microsoft to get a damn clue and release patches for 2000, XP and Vista to fix this.


HMMM it is an interesting one. Have u run antispyware, antivirus and antimalware ( can get malwarebytes anti malware from the internet, google it.) Also have you tried running Trend Micro's Hijack this.

Just a few suggestions. I personally use SuperAntispyware, AVG 8 and Malwarebytes antimalware.

(with malwarebytes, install it, update it and then run it.)

And to be fair, you can't keep blaming microsoft because not everyone is having this issue, i myself am not, and I was able to get sync to work. So the issue is something on your machine i feel.

I wish you best of luck with it, Don't give up, there is a solution out there, it's just a matter of finding it!!!!!

#12 shaz

    Member

  • Members
  • PipPip
  • 48 posts

Posted 26 January 2009 - 12:27 AM

 shaz, on Jan 26 2009, 10:41 AM, said:

HMMM it is an interesting one. Have u run antispyware, antivirus and antimalware ( can get malwarebytes anti malware from the internet, google it.) Also have you tried running Trend Micro's Hijack this.

Just a few suggestions. I personally use SuperAntispyware, AVG 8 and Malwarebytes antimalware.

(with malwarebytes, install it, update it and then run it.)

And to be fair, you can't keep blaming microsoft because not everyone is having this issue, i myself am not, and I was able to get sync to work. So the issue is something on your machine i feel.

I wish you best of luck with it, Don't give up, there is a solution out there, it's just a matter of finding it!!!!!


Also this might sound a stupid question,,, But have u tried a different usb hard drive on this machine, or have u tried this drive on a machine running xp

Just a few ideas, You have probably already tried all this anyway. But Im Intrigued!!!! I have been on google searching and I can't seem to find anything.

Im just sorry i can't be of any more help!!!!!

#13 shaz

    Member

  • Members
  • PipPip
  • 48 posts

Posted 26 January 2009 - 10:35 AM

 maxsisac, on Jan 25 2009, 10:32 PM, said:

try USB Safely Remove program
all your problems will be over

Maxsisac thats entirely the point of this thread, bizzybody can't get the safely remove to work. Hence his writing to the forum. Silly billy!!! ;)

#14 _def_x_

    audi 5k

  • Veterans
  • PipPipPipPipPipPip
  • 1,460 posts
  • Gender:Male

Posted 26 January 2009 - 11:19 AM

Hi bizzybody, I can hear/read your frustration and issues like this really do annoy!!!

I figured I would chime in as I use (2) 320GB usb drives, a SanDisk Titanium (U3) thumb drive,
multi-card reader, usb audio interface, and usb midi port device, all on both 2K Pro and XP Pro
and I have never had any issues with ejecting or reading/writing to any device. I have used my
usb enclosures and thumb drive on many other XP machines without issue as well.

Have you checked your "permissions" and made sure you have "ownership" / "full control" of the
usb device? I don't know if you built your system yourself but maybe you are a "trusted installer"
or "user", or maybe even "admin" with no "read/write/modify" permissions?

AFAIK, in Vista, the Vista Security Policy is the chief admin (which affects the UAC) and all other admins
are really subservient in reality. I do believe it is possible to run as the hidden admin but doing this can
render Vista inoperable or atleast a real security risk, and the user would likely have to contact Microsoft
to fix the problem.

So what you need to check / do is elevate your status (permissions). In my opinon this is the key to using
Vista, figuring out how to take more control over a very security laden OS, it can be done.

Check your status, if this isn't it, you've atleast eliminated another possibility.

Mike

#15 shaz

    Member

  • Members
  • PipPip
  • 48 posts

Posted 31 January 2009 - 10:50 PM

 gUiTaR_mIkE, on Jan 26 2009, 10:19 PM, said:

Hi bizzybody, I can hear/read your frustration and issues like this really do annoy!!!

I figured I would chime in as I use (2) 320GB usb drives, a SanDisk Titanium (U3) thumb drive,
multi-card reader, usb audio interface, and usb midi port device, all on both 2K Pro and XP Pro
and I have never had any issues with ejecting or reading/writing to any device. I have used my
usb enclosures and thumb drive on many other XP machines without issue as well.

Have you checked your "permissions" and made sure you have "ownership" / "full control" of the
usb device? I don't know if you built your system yourself but maybe you are a "trusted installer"
or "user", or maybe even "admin" with no "read/write/modify" permissions?

AFAIK, in Vista, the Vista Security Policy is the chief admin (which affects the UAC) and all other admins
are really subservient in reality. I do believe it is possible to run as the hidden admin but doing this can
render Vista inoperable or atleast a real security risk, and the user would likely have to contact Microsoft
to fix the problem.

So what you need to check / do is elevate your status (permissions). In my opinon this is the key to using
Vista, figuring out how to take more control over a very security laden OS, it can be done.

Check your status, if this isn't it, you've atleast eliminated another possibility.

Mike


Hey Bizzybody,

Just wondering if you have had any luck finding a solution for this, as I am so intrigued by it and I wonder what the solution could be.??





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users