Safely remove external drive: error message appears - still connected to Everything?

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Safely remove external drive: error message appears - still connected to Everything?

Post by Biff »

When I try to safely remove an external drive an error message appears, the dirve cannot be safely removed:

Image

That obviously is because Everything is still connected to them:
Image

Drive H: is added to the "Folders":
Image
What does "Attempt to monitor changes" mean? Will the lists automatically be updated when the drive is pugged in next time?
Or / and will it be rescanned only at the time set in "Rescan"?

Image

Do I have to close Everything to safely remove the external drives? Or can I remove the drives anyway? Or is there an easier / none risky way to remove the drives?
Last edited by Biff on Fri Jun 09, 2017 1:14 pm, edited 1 time in total.
void
Developer
Posts: 16684
Joined: Fri Oct 16, 2009 11:31 pm

Re: Safely remove external drive: error message appears - still connected to Everything?

Post by void »

If you exit Everything does the problem persist?

Everything does use a handle to this volume to detect changes. However, Everything will detect any requests to remove the device and release these handles.

Does the problem persist if you uncheck Attempt to monitor changes for your H: drive?

What type of external drive are you using?

Attempt to monitor changes means Everything will attempt to monitor changes to this folder, detection is very good in Everything 1.4, however, some changes changes can still be missed, such as thousands on changes in a very short time frame.

If Everything misses changes, the Everything index will be out of sync until the folder is rescanned. Folder indexes are scheduled to update every day at 3am. If Everything is not running at 3am, the folder rescan will occur the next time you start Everything.
Do I have to close Everything to safely remove the external drives? Or can I remove the drives anyway? Or is there an easier / none risky way to remove the drives?
If Everything is hanging on to the volume handle, then yes you will need to exit Everything to safely remove the device.
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Safely remove external drive: error message appears - still connected to Everything?

Post by Biff »

Many thanks.
If you exit Everything does the problem persist?
Yes, it does. I closed both instances.
Attempt to monitor changes means Everything will attempt to monitor changes to this folder
When a drive is plugged in next time it automatically does it or only at the specified time?
Does the problem persist if you uncheck Attempt to monitor changes for your H: drive?
Sorry, at the moment I cannot check it as the drive cannot be removed safely respectively I tried it anyway without success. There is no connetion / access shown anymore.
What type of external drive are you using?
NTFS drives. E.g. 3, 4, 5TB WD MyBook and Elements, Seagate 5TB Expansion and some older ones. The H: drive is an old Medion 1TB.
If Everything misses changes, the Everything index will be out of sync until the folder is rescanned. Folder indexes are scheduled to update every day at 3am. If Everything is not running at 3am, the folder rescan will occur the next time you start Everything.
So if Everything does not find a file / folder it might help to force a scan.
void
Developer
Posts: 16684
Joined: Fri Oct 16, 2009 11:31 pm

Re: Safely remove external drive: error message appears - still connected to Everything?

Post by void »

If you exit Everything does the problem persist?
Yes, it does. I closed both instances.
There might be another application hanging onto a volume handle.
Please check with Process Explorer.
Do a handle search for H: or the volumes GUID.
When a drive is plugged in next time it automatically does it or only at the specified time?
Everything will not attempt to rescan a volume when it is plugged in.
The rescan will occur at the next scheduled time.

I can see rescanning the volume when it is plugged in being useful when the last scheduled update was missed, I'll consider adding this feature.

To manually update the folder index:
  • In Everything, from the Tools menu, click Options.
  • Click the Folders tab on the left.
  • Select your folder index that needs updating.
  • Click Rescan Now.
  • Click OK, the folder will be rescanning in the background.
So if Everything does not find a file / folder it might help to force a scan.
It is more efficient to do a rescan rather than a force rebuild from Tools -> Options -> Indexes.
Both will completely rescan the folder index.
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Safely remove external drive: error message appears - still connected to Everything?

Post by Biff »

There might be another application hanging onto a volume handle.
Please check with Process Explorer.
Do a handle search for H: or the volumes GUID.
Thank you for the link. I just removed the drive (unsafely). I had done a search before with Process Hacker for H:, found nothing.
Everything will not attempt to rescan a volume when it is plugged in.
For folders. But for file lists and NTFS volumes it does, doesn't it?
The rescan will occur at the next scheduled time.
For folders only. If the external drive is plugged in. And if not, Everything will try it the next scheduled time and so on.
So "Folders" is not the right option to use if you want automatically your external drives being scanned each time you plug in them, is it right?
I can see rescanning the volume when it is plugged in being useful when the last scheduled update was missed, I'll consider adding this feature.
That is great. But actually the NTFS indexes might do it instead (if those for external drives wouldn't be lost when (re)indexing) or the file lists, if I understand it right.
To manually update the folder index:

In Everything, from the Tools menu, click Options.
Click the Folders tab on the left.
Select your folder index that needs updating.
Click Rescan Now.
Click OK, the folder will be rescanning in the background.
Thank you.
Both will completely rescan the folder index.
This rescan is for folders only. And they do not have to do anything with the NTFS indexes. When Everything does a "normal" (automatically after plugging in an external drive) (re)scan (for NTFS indexes) it means the external drive indexes in "NTFS" will be gone? And will have to be rebuild when they are plugged in again?

By the way, why are file lists automatically scanned ("Monitor changes"), if I understand it right, when an external drive is plugged in and folders aren't? One could use file lists or folders to make a list of an entire (external) drive, if I see it right. What actually are the differences between them?
void
Developer
Posts: 16684
Joined: Fri Oct 16, 2009 11:31 pm

Re: Safely remove external drive: error message appears - still connected to Everything?

Post by void »

For folders. But for file lists and NTFS volumes it does, doesn't it?
Yes, file lists and NTFS volumes are always monitored and up to date.
So "Folders" is not the right option to use if you want automatically your external drives being scanned each time you plug in them, is it right?
Please consider converting your external drives to NTFS for this functionality.
This rescan is for folders only. And they do not have to do anything with the NTFS indexes. When Everything does a "normal" (automatically after plugging in an external drive) (re)scan (for NTFS indexes) it means the external drive indexes in "NTFS" will be gone? And will have to be rebuild when they are plugged in again?
Rescanning is for folder indexes only.

To keep offline NTFS volumes in your Index:
  • In Everything, from the Tools menu, click Options.
  • Click the NTFS tab.
  • Uncheck Automatically remove offline volumes.
  • Click OK.
By the way, why are file lists automatically scanned ("Monitor changes"), if I understand it right, when an external drive is plugged in and folders aren't?
File lists are created manually, Either from the File list editor (Everything -> Tools -> File list editor), from the command line (-create-file-list) or from es -export-efu.

File lists will not do what you want easily.
You can create a script to generate a file list of your removable volume when it is plugged in.
Everything will detect a change to the file list and reload it.
One could use file lists or folders to make a list of an entire (external) drive, if I see it right. What actually are the differences between them?
File lists are a static list. ie: a list of file names that does not change.
File lists do not monitor changes to the file names in its list. Only a change to the physical EFU file list is monitored.

Folders indexes do monitor changes to file names.
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Safely remove external drive: error message appears - still connected to Everything?

Post by NotNull »

Depending on how you closed Everything, the process is still running without it being shown in Task Manager's application list.

In Task Manager, If you go to the Details tab (Win10) / Processes tab (Win7) Everything is probably still there.
You can right-click on the Everything process(es) and select "End process tree" to end it.

Everything has to do it's housekeeping (writing database, etc), so give it a minute ...

Close ThisIsMyFile too. Maybe that's also locking your external drive (Don't know; I tested it once and decided I stick with my regular tools (Process Explorer and on the CMD prompt: TASKLIST, TASKKILL, WMIC, HANDLE)

BTW: A CMD version to (force) stop all running Everything.exe's:

Code: Select all

for /f "usebackq tokens=2 delims= " %X in (`tasklist ^| findstr /i /b "everything"`) DO taskkill /F /PID %X
[code]

If that doesn't work, start downloading Process Explorer and handle.exe to prepare for the next round .... ;-)
These utlities can be found here: https://technet.microsoft.com/en-us/sysinternals/


BTW: You might want to change the screenshots. Now we see the settings of E: and I: drive instead of H: (and there is still a name visible (description of the I: disk))
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Safely remove external drive: error message appears - still connected to Everything?

Post by NotNull »

Missed all these messages while I was writing mine... You can ignore my message.
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Safely remove external drive: error message appears - still connected to Everything?

Post by Biff »

Sorry for my confusion:
So "Folders" is not the right option to use if you want automatically your external drives being scanned each time you plug in them, is it right?

Please consider converting your external drives to NTFS for this functionality.
So really convert the file systems of the drives and then use the "NTFS" tab.
To keep offline volumes in Everything 1.4 or later:

In Everything, from the Tools menu, click Options.
Click the NTFS tab.
Uncheck Automatically remove offline volumes.
Click OK.


When enabled, keep offline volumes will:

Allow offline volumes to stay in the index.
Not rebuild the database when the volume goes offline.
Automatically update the index when the volume comes back online with out doing a full rebuild.
Rebuild the database if a volume has changed too much.
Detect changes to the volume while it is online.
Offline indexes will be lost when the index is rebuilt. All volumes must be online when Everything builds its index.

I would think this
"Offline indexes will be lost when the index is rebuilt. All volumes must be online when Everything builds its index."
means the opposite of this
"To keep offline volumes in Everything"
It means, if I see it right, indexes of drives being offline will be lost when Everything (re)indexes. So there is no way to keep indexes of offline drives.

"(Attempt to) Monitor changes" means something different in "NTFS" and "File lists" and "Folders".

So Everything does not monitor the content of file lists but the file (itself) / the file attributes, such as date, time, size and if one of them has changed (for exampel because one has added (or removed from the list) some files to the file list and saved it) it reloads the file / its content automatically (that is "Monitor changes" for file lists).
Folders indexes do monitor changes to file names.
At special / set times (not automatically when a drive is plugged in). The same way like NTFS does it all the time, I could imagine. May be one could set "Rescan" to "Every" 3 minutes or so. So an external drive plugged in would then be scanned most likely. But I assume,

So both "File lists" and "Folders" (are not suitable to be used the way I would like to do it. So I could let Everything just scan like usual the files using the NTFS function. But after a (re)scan the offline volumes were gone, is it correct?
Depending on how you closed Everything, the process is still running without it being shown in Task Manager's application list.
I closed it by clilcking "Exit" in the context menu shown after clicking the icon in the system tray.
In Task Manager, If you go to the Details tab (Win10) / Processes tab (Win7) Everything is probably still there.
You can right-click on the Everything process(es) and select "End process tree" to end it.
No, no, it was not shown anymore in the Task Manager.
Everything has to do it's housekeeping (writing database, etc), so give it a minute ...
Yes, but that will be interrupted by closing it with the Task Manager, I suppose.
Close ThisIsMyFile too. Maybe that's also locking your external drive (Don't know; I tested it once and decided I stick with my regular tools (Process Explorer and on the CMD prompt: TASKLIST, TASKKILL, WMIC, HANDLE)
Yes, I had closed it before clicking "Savely remove"
BTW: A CMD version to (force) stop all running Everything.exe's:

Code: Select all

for /f "usebackq tokens=2 delims= " %X in (`tasklist ^| findstr /i /b "everything"`) DO taskkill /F /PID %X
[code][/quote]
Thank you. I use ProcessKO or something like that. I will try next time the code.

[quote]If that doesn't work, start downloading Process Explorer and handle.exe to prepare for the next round .... ;-)
These utlities can be found here: https://technet.microsoft.com/en-us/sysinternals/[/quote]
Thank you for the link, yes, I have it on my drive.

[quote]BTW: You might want to change the screenshots. Now we see the settings of E: and I: drive instead of H: (and there is still a name visible (description of the I: disk))[/quote]
Ah, yes, I missed it, thank you.

[quote]Missed all these messages while I was writing mine... You can ignore my message.[/quote]
No, no, those are good thoughts.
Post Reply