Safe removal of an external disk

  • Thread starter Thread starter mech-eng
  • Start date Start date
  • Tags Tags
    Disk
Click For Summary

Discussion Overview

The discussion revolves around the challenges and options for safely removing external disks, particularly USB drives, when the operating system indicates that they are in use. Participants explore various methods for addressing this issue, including logging off, using device manager, and monitoring system activity.

Discussion Character

  • Debate/contested
  • Technical explanation
  • Exploratory

Main Points Raised

  • Some participants inquire about alternative methods for safely removing USB drives when the system indicates they are in use, questioning the reliability of the error notifications.
  • One participant suggests logging off and back in as a potential solution, while another expresses that this method did not work for them.
  • There are concerns about using device manager to remove the drive, with one participant fearing it could lead to file system corruption.
  • Several participants note that the only critical time to worry about removal is when writing to the device, while others mention that accessing files can also cause the device to register as in use.
  • One participant shares a command to disable last access time writes in Windows, suggesting it may help with the issue.
  • Multiple participants report experiences where the system incorrectly indicates that the drive is in use, even after long waiting periods, leading them to unplug the drive without apparent negative effects.
  • There is mention of monitoring disk usage through Task Manager to ensure no processes are accessing the drive before removal.
  • One participant recommends a utility that identifies open files and the programs using them, which could help diagnose issues with drive access.

Areas of Agreement / Disagreement

Participants express a range of experiences and opinions regarding the reliability of the system's indication of drive usage. There is no consensus on the best method for safely removing drives, with multiple competing views on the effectiveness of various approaches.

Contextual Notes

Participants highlight the uncertainty surrounding the operating system's notifications about drive usage and the potential for different external drives to behave inconsistently. Concerns about file system integrity and the implications of unsafe removal are also noted.

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,235
Computer science news on Phys.org
Try logging off, then log back in and quickly try to "stop" the external device.
 
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.
 
Right-click on the device and select "Eject".
 
  • Like
Likes   Reactions: Greg Bernhardt
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
  • #10
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
  • #11
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.
 
  • #12
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: 631
  • #13
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!
 
  • #14
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.
 
  • #15
Shutdown computer or Restart. While the computer is OFF, remove the device.
 
  • #16
symbolipoint said:
Shutdown computer or Restart. While the computer is OFF, remove the device.
Seriously not necessary. See post #9
 
  • #17
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.
 
  • #18
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

Similar threads

  • · Replies 30 ·
2
Replies
30
Views
3K
Replies
2
Views
3K
  • · Replies 24 ·
Replies
24
Views
11K
Replies
14
Views
4K
  • · Replies 36 ·
2
Replies
36
Views
5K
  • · Replies 43 ·
2
Replies
43
Views
6K
Replies
7
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
2
Views
2K
Replies
13
Views
49K