Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Safely Remove Hardware  (Read 2734 times)

0 Members and 1 Guest are viewing this topic.

overthehill

    Topic Starter


    Apprentice

  • Keep Canada beautiful. Swallow your beer cans.
  • Thanked: 14
    • Yes
    • Yes
  • Experience: Familiar
  • OS: Windows Vista
Safely Remove Hardware
« on: January 31, 2011, 09:22:01 PM »
I've been having some problems lately shutting down my external drives safely. Shutting down PC, to safely remove devices gets to be a pain. I have the drives set in (Device Manager) for Quick Removal ,where I'm told that I can remove the device/s without the Safe Removal Icon. But is this safe?. I also read somewhere that shutting down explorer.exe. is a cure?  Anyway, I'm presently trying an app.(USB Safely Remove) which I hope is, (at least it tells me that it is, and appears to be,) shutting the devices down safely. I'm in the trial period but after that, $$. It's not that expensive but I'm wondering what others are doing in this situation ?.
Thanks, overthehill


             

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Safely Remove Hardware
« Reply #1 on: January 31, 2011, 10:15:06 PM »
Searching the MS KB is a bore.

So I found this neat video about Quick Removal in Windows.
http://www.metacafe.com/watch/471355/quick_usb_device_removal/

The Quack Removal concept is helpful in other areas of life.
http://www.metacafe.com/watch/818086/instant_shirt_removal_how_to_sprintcuts/

Wait, there is more. Goto http://support.microsoft.com/
and search for Quick Removal
Yes, there are reported problems with Quick Removal. No simple answer.

overthehill

    Topic Starter


    Apprentice

  • Keep Canada beautiful. Swallow your beer cans.
  • Thanked: 14
    • Yes
    • Yes
  • Experience: Familiar
  • OS: Windows Vista
Re: Safely Remove Hardware
« Reply #2 on: January 31, 2011, 10:27:57 PM »










Searching the MS KB is a bore.

So I found this neat video about Quick Removal in Windows.
http://www.metacafe.com/watch/471355/quick_usb_device_removal/

The Quack Removal concept is helpful in other areas of life.
http://www.metacafe.com/watch/818086/instant_shirt_removal_how_to_sprintcuts/

Wait, there is more. Goto http://support.microsoft.com/
and search for Quick Removal
Yes, there are reported problems with Quick Removal. No simple answer.

Thks,Geek. I couldn't help but smile when I saw the advice below on Quick Removal. overthehill

"Simply remove your Flash Drive from the USB port by gently pulling it toward you."
--------------------------------------------------------------------------------


             

BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: Safely Remove Hardware
« Reply #3 on: February 01, 2011, 06:15:35 AM »
The only time it is unsafe to remove a USB drive is if there is unwritten data still being cached (write-caching) or if it is in the process of being written too.

Problem is, that's more theoretical then in practice. USB is supposed to be a hot-pluggable protocol- the drives should be able to be added and removed as easily and safely as floppy disks (you don't have to "safely remove" a floppy disk).

The way most modern OS's handle USB mass storage is terrible, IMO; Most of them call them "removable drives" and yet institute write-caching of those drives as if they were fixed disks that couldn't be removed, not disks that could be removed at a moments notice. The idea is to "increase performance" of those drives, but it's pointless to write data  faster if that data isn't safe. What makes it worse is that the cache policy is terrible as well, in that no matter how long you wait idle, the cache is never emptied- this can be tested since you can write files to a removable drive (with write-caching enabled) and wait several hours before removing it, and the data will still be corrupted. (of course thankfully write-caching is no longer a default) Thing is, that's not a cache- it's a useless buffer. A cache with a bad policy is just another name for a memory leak. Evewn the DOS smartdrv understood this, and even with all write caching options enabled the data was written within a few seconds; and if you wanted to be really sure you could simply run smartdrv /c to clear the cache manually before powering down.\\I think the entire problem with mass storage USB devices is that there is a tendency to "over-optimize", in complete objection to the very concept of a "hot-swappable" drive.

This "over-optimization" is clear, since there are now at least two options you can set for removable flash drives; disabling write-caching, and "optimize for quick removal" thing is, what is the difference? the only one that should cause problems for removal is write caching so is "optimize for quick removal" simply disabling write caching for that drive? And if so, why did they not label it "disable write caching(Optimize for quick removal)" or something similar?

The program in question seems, odd. The windows "safely remove" applet checks if there are open handles, and if so, simply says the drive is in use. otherwise, it dismounts it. if the "USB Safely remove" program allows you to "safely remove" the device while there are still open handles, then it is only fighting half the battle; the only certain thing is that most of the data that was written is still on the drive, and that the filesystem is not corrupted; file data may be lost since it probably forces handles closed that applications are using, which could in and of itself cause other applications to crash. This doesn't even begin to touch on the fact  that it doesn't make simply removing the drive without "warning" any safer, since the applet can't possibly know you will remove the drive. The best it can do is disable write caching, which you can do in windows anyway.

Whenever I remove a drive and the safely remove applet refuses to allow it to be removed, I run handle with the drive root path as an argument in cmd- such as "handle L:\" which will tell me which programs have files open, and I can close the files in those applications with ease. I'm sure there are GUI tools that could be used as well (Process Explorer could be used here as well). Of course that doesn't address what I feel is the worst problem- and this is hardly specific to windows, - The fact that you even need a "safely remove" option; aside from maybe determining wether the device is safe to remove, there is no purpose for it to exist. How is a flash drive really any different from a Floppy disk? You don't have to "safely remove" floppies, the very idea of doing so is absurd, and yet we accept it with Flash drives, which are, by definition, supposed to be "hot-pluggable".


I was trying to dereference Null Pointers before it was cool.

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Safely Remove Hardware
« Reply #4 on: February 01, 2011, 11:59:41 AM »
Thank you, BC
This is one of those times when I agree with every hing you wrote.  :)

overthehill

    Topic Starter


    Apprentice

  • Keep Canada beautiful. Swallow your beer cans.
  • Thanked: 14
    • Yes
    • Yes
  • Experience: Familiar
  • OS: Windows Vista
Re: Safely Remove Hardware
« Reply #5 on: February 01, 2011, 12:07:40 PM »
The only time it is unsafe to remove a USB drive is if there is unwritten data still being cached (write-caching) or if it is in the process of being written too.

Problem is, that's more theoretical then in practice. USB is supposed to be a hot-pluggable protocol- the drives should be able to be added and removed as easily and safely as floppy disks (you don't have to "safely remove" a floppy disk).

The way most modern OS's handle USB mass storage is terrible, IMO; Most of them call them "removable drives" and yet institute write-caching of those drives as if they were fixed disks that couldn't be removed, not disks that could be removed at a moments notice. The idea is to "increase performance" of those drives, but it's pointless to write data  faster if that data isn't safe. What makes it worse is that the cache policy is terrible as well, in that no matter how long you wait idle, the cache is never emptied- this can be tested since you can write files to a removable drive (with write-caching enabled) and wait several hours before removing it, and the data will still be corrupted. (of course thankfully write-caching is no longer a default) Thing is, that's not a cache- it's a useless buffer. A cache with a bad policy is just another name for a memory leak. Evewn the DOS smartdrv understood this, and even with all write caching options enabled the data was written within a few seconds; and if you wanted to be really sure you could simply run smartdrv /c to clear the cache manually before powering down.\\I think the entire problem with mass storage USB devices is that there is a tendency to "over-optimize", in complete objection to the very concept of a "hot-swappable" drive.

This "over-optimization" is clear, since there are now at least two options you can set for removable flash drives; disabling write-caching, and "optimize for quick removal" thing is, what is the difference? the only one that should cause problems for removal is write caching so is "optimize for quick removal" simply disabling write caching for that drive? And if so, why did they not label it "disable write caching(Optimize for quick removal)" or something similar?

The program in question seems, odd. The windows "safely remove" applet checks if there are open handles, and if so, simply says the drive is in use. otherwise, it dismounts it. if the "USB Safely remove" program allows you to "safely remove" the device while there are still open handles, then it is only fighting half the battle; the only certain thing is that most of the data that was written is still on the drive, and that the filesystem is not corrupted; file data may be lost since it probably forces handles closed that applications are using, which could in and of itself cause other applications to crash. This doesn't even begin to touch on the fact  that it doesn't make simply removing the drive without "warning" any safer, since the applet can't possibly know you will remove the drive. The best it can do is disable write caching, which you can do in windows anyway.

Whenever I remove a drive and the safely remove applet refuses to allow it to be removed, I run handle with the drive root path as an argument in cmd- such as "handle L:\" which will tell me which programs have files open, and I can close the files in those applications with ease. I'm sure there are GUI tools that could be used as well (Process Explorer could be used here as well). Of course that doesn't address what I feel is the worst problem- and this is hardly specific to windows, - The fact that you even need a "safely remove" option; aside from maybe determining wether the device is safe to remove, there is no purpose for it to exist. How is a flash drive really any different from a Floppy disk? You don't have to "safely remove" floppies, the very idea of doing so is absurd, and yet we accept it with Flash drives, which are, by definition, supposed to be "hot-pluggable".

Thanks BC_ for the in depth analysis. Lots to digest. What I gather though from the info. that you provided, is in order to remove these devices safely it's still a bit of a hassle. So, rightly or wrongly what I did was purchase the app. that I mentioned above. Now whether this app. does what it's supposed to do or whether it's just a "feel good", I purchased it nevertheless. From the short time that I've used it and from the reviews that I could find, it looks like an OK app. One click seems to do what it is supposed to do. So far anyway :-\ .
For less than $15 CDN, (reduced price) I was able to purchase it which includes a life time subscription. I'm thinking that as long as it doesn't harm anything (I'm sure I'll find out) and makes me "feel good", just feeling good for <$15 isn't a bad investment.
So for now anyway, I'll click the solved option.
Thanks and appreciate your expertise once again, overthehill