Safe removal of an external disk

  • Thread starter mech-eng
  • Start date
  • Tags
    Disk
In summary, 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?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
  • #1
mech-eng
828
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,105
Computer science news on Phys.org
  • #2
Try logging off, then log back in and quickly try to "stop" the external device.
 
  • #3
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.
 
  • #4
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 FactChecker
  • #5
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 Asymptotic, FactChecker and jedishrfu
  • #6
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.
 
  • #7
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.
 
  • #8
Right-click on the device and select "Eject".
 
  • Like
Likes Greg Bernhardt
  • #9
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 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 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: 550
  • #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 SammyS and FactChecker

What is the proper way to safely remove an external disk?

The proper way to safely remove an external disk is to first make sure that all files and applications on the disk are closed. Then, on a Windows computer, click on the "Safely Remove Hardware" icon in the system tray and select the external disk. On a Mac, click on the external disk icon and drag it to the trash, which will change to an eject symbol. Once the disk has been ejected, you can safely unplug it from the computer.

Why is it important to safely remove an external disk?

Safely removing an external disk ensures that all data and files on the disk are properly saved and closed before the disk is disconnected from the computer. This helps prevent data loss or corruption, which can occur if the disk is removed while files are still open or being accessed.

What could happen if an external disk is not safely removed?

If an external disk is not safely removed, it can lead to data loss or corruption. This is because the disk may still be in use by the computer, and removing it without properly closing files or applications can cause those files to become corrupted or inaccessible.

Can I safely remove an external disk while it is transferring data?

No, it is not recommended to remove an external disk while it is transferring data. This can cause the data transfer to be interrupted, leading to potential data loss or corruption. It is best to wait until the data transfer is complete before safely removing the disk.

Is there a difference between "ejecting" and "safely removing" an external disk?

On a Mac, ejecting an external disk simply means closing any open files or applications and making sure they are saved before physically disconnecting the disk. On a Windows computer, safely removing a disk goes a step further by also flushing any pending writes to the disk, ensuring that all data has been properly saved before disconnecting it.

Similar threads

  • Computing and Technology
Replies
30
Views
2K
Replies
2
Views
1K
  • Computing and Technology
Replies
24
Views
7K
Replies
14
Views
3K
  • Computing and Technology
2
Replies
43
Views
3K
  • Computing and Technology
2
Replies
36
Views
4K
  • Programming and Computer Science
Replies
2
Views
854
Replies
7
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
10
Views
943
Replies
19
Views
2K
Back
Top