Safe removal of an external disk

  • Thread starter Thread starter mech-eng
  • Start date Start date
  • Tags Tags
    Disk
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
17 replies · 3K views
mech-eng
Messages
826
Reaction score
13
When we cannot safely remove our usb memories and disks what are the other options? Sometimes we cannot safely remove them and take a notification. According to that notification a program is using the drive so we cannot remove it at that moment. Do you know what the error code for this situation? And is removing the drive from device manager a safe option?
safely remove option.png
 

Attachments

  • safely remove option.png
    safely remove option.png
    10.2 KB · Views: 1,248
Physics news on Phys.org
rcgldr said:
Try logging off, then log back in and quickly try to "stop" the external device.

I tried that but it didn't work. There were more options sometimes but that time I didn't see it. Sometimes when right clicking under my computer, there are three options, one of them stops the drive even though a program use it, but that time I didn't see it. So what about my idea of use of device manager? Is it safe? I am afraid for my disk's file system again turn into RAW file system. Unsafe removal is one of the reasons of RAW file system.

Thank you.
 
The only time you really need to worry is when you’re writing to the device. If you mount it to retrieve a file then it’s okay but not a good practic.

Programs that can make the device busy are a command line session that points to a directory on the device. I’ve gotten this from time to time. The other case is an installer that you haven’t exited from which is using the device or a file explorer utility like windows explorer or Apples finder.
 
  • Like
Likes   Reactions: FactChecker
jedishrfu said:
The only time you really need to worry is when you’re writing to the device.
In the case of Windows, last access time does a write to the drive even when just reading a file. To stop that, open administrator DOS console window or use "Run" as administrator. Enter the following command:

fsutil behavior set disablelastaccess 1

to check the current setting use:

fsutil behavior query disablelastaccess

This works for Windows XP, Windows 7, Windows 10, and should work for Windows Vista and Windows 8 (I don't have Vista or 8 and can't check).
 
  • Like
Likes   Reactions: Asymptotic, FactChecker and jedishrfu
rcgldr said:
In the case of Windows, last access time does a write to the drive even when just reading a file. To stop that, open administrator DOS console window or use "Run" as administrator. Enter the following command:

fsutil behavior set disablelastaccess 1

to check the current setting use:

fsutil behavior query disablelastaccess

This works for Windows XP, Windows 7, Windows 10, and should work for Windows Vista and Windows 8 (I don't have Vista or 8 and can't check).
I checked this on my Windows 10 PC and it was set to 1. I have never changed it, so the default may now be 1.
 
mech-eng said:
When we cannot safely remove our usb memories and disks what are the other options? Sometimes we cannot safely remove them and take a notification. According to that notification a program is using the drive so we cannot remove it at that moment. Do you know what the error code for this situation? And is removing the drive from device manager a safe option? View attachment 219402

I don't believe there is an error code associated with that. The device is obviously still in use - being read from and/or written to. You need to wait a while and attempt to safely remove the USB (or whatever) again.
 
StevieTNZ said:
I don't believe there is an error code associated with that. The device is obviously still in use - being read from and/or written to
No. It is not. I have the same issue (frequently) with a USB drive and on occasion I have waited for many hours and in one case even a couple of days, and the device continues to register as "in use" even though it very obviously is not. I just unplug it and have never had any ill effects. I DO always wait for at least 10 minutes or so after my last access of the device.
 
  • Like
Likes   Reactions: FactChecker
Svein said:
Right-click on the device and select "Eject".
When the system thinks an external drive is in use, the eject fails.
 
  • Like
Likes   Reactions: FactChecker
phinds said:
No. It is not. I have the same issue (frequently) with a USB drive and on occasion I have waited for many hours and in one case even a couple of days, and the device continues to register as "in use" even though it very obviously is not. I just unplug it and have never had any ill effects. I DO always wait for at least 10 minutes or so after my last access of the device.
Me too.
 
phinds said:
When the system thinks an external drive is in use, the eject fails.
That's right...

Look at the drives "Policies" ... maybe you can just disconnect it ?

upload_2018-2-22_15-3-53.jpeg


.
 

Attachments

  • upload_2018-2-22_15-3-53.jpeg
    upload_2018-2-22_15-3-53.jpeg
    47.6 KB · Views: 641
phinds said:
No. It is not. I have the same issue (frequently) with a USB drive and on occasion I have waited for many hours and in one case even a couple of days, and the device continues to register as "in use" even though it very obviously is not. I just unplug it and have never had any ill effects. I DO always wait for at least 10 minutes or so after my last access of the device.
Ah, I see. I should correct my post to relay that the device may, according to the OS, is still in use but is not.

Many hours?! Good grief!
 
StevieTNZ said:
Many hours?! Good grief!
Yes. Once it goes wrong, it will never correct itself. I haven't done a scientific study, but is seems as though some external disks cause more frequent trouble than others.
 
phinds said:
No. It is not. I have the same issue (frequently) with a USB drive and on occasion I have waited for many hours and in one case even a couple of days, and the device continues to register as "in use" even though it very obviously is not. I just unplug it and have never had any ill effects. I DO always wait for at least 10 minutes or so after my last access of the device.
My worry is that I am never sure that some Windows utility is not doing something (scanning or cleaning up). I assume that they do not do that to external drives, but it still worries me. When in doubt, I watch the disk usage in the Task Manager/Performance to make sure that nothing is hitting the drive. If nothing is going on, I pull the drive.
 
There is a free utility I've found quite useful over the years. It reports every open file on the system, what program has opened it, and it even sorts the results by Drive. Right now it reports there are 615 files open, spread across 15 logical drives. (Windows is absolutely INSANE!)
http://www.nirsoft.net/utils/opened_files_view.html
 
  • Like
Likes   Reactions: SammyS and FactChecker