Forgets a drive when a new one is connected

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
Commerzpunk
Posts: 6
Joined: Sun Apr 18, 2021 8:53 pm

Forgets a drive when a new one is connected

Post by Commerzpunk »

Hello,
i love this tool! :)

I use it to index about 25 HDD drives which are offline 99% of the time.
They contain BluRay or DVD untouched files from my physical collection and recording from HD TV.
I store these files because i might change the encoding method in the future.
To be able to index where a specific files is stored > "Gladiator.mkv", i set up a system:

Each HDD has a sticker with numbers 001 - 999.
Each HDD has the number as a folder in the root "x:\##001\"
So, if i seach for a file, the ## folder name / number tells me which drive to pick from my rack.

Of course i have the swich "keep index for offline drives" for each drive and in general.

That works fine, BUT i found 2 pairs of drives (so 4 in total) that keep "stealing" the identity.
e. g. when i have #018 connected, its indexed and fine. But if i connect drive ##020, ##018 disappears and ##020 is there.
Same with ##021 and ##023. Its a bit suspicous that these 2 drives are the exact same series and size.

I tried to re-index and rebuild the database.

What can i try or do?
void
Developer
Posts: 16748
Joined: Fri Oct 16, 2009 11:31 pm

Re: Forgets a drive when a new one is connected

Post by void »

Thank you for your feedback Commerzpunk,

Everything might be seeing the drives as 'moved'.

Could you please try disabling automatically remove 'moved' ntfs volumes:
  • In Everything, type in the following search and press ENTER:
    /auto_remove_moved_ntfs_volumes=0
  • If success, you should see auto_remove_moved_ntfs_volumes=0 in the status bar for a few seconds.
Could you please send me your %APPDATA%\Everything\Everything.ini

Does the issue persist?
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Forgets a drive when a new one is connected

Post by NotNull »

Everything tries to distinguish disks, I really should say volumes here, by getting a unique ID of that disk or volume.

Sometimes those unique ID's are not as unique as you would expect. For example when cloning a disk using the wrong tools or when the manufacturer doesn't make the ID's unique. I think you 'suffer' from that last one.

So for Everything those 2 volumes have the same ID adn when the second one i connected, it will replace the results of the first one as Everything will see it as 'just a lot of changes to the same volume'.

You can inspect if this is the case by following these steps:
  • Connect your first disk of a pair
  • Start CMD.exe
  • Run the following commands (replace X: with the actual driveletter of that disk:

    Code: Select all

    wmic.exe volume WHERE DriveLetter='X:' get DriveLetter,DeviceID
    vol X:
    
    Ouput should look similar to this. The bold parts are important:

    c:\Tools\Everything>wmic.exe volume WHERE DriveLetter='T:' get DriveLetter,DeviceID
    DeviceID DriveLetter
    \\?\Volume{a52ba464-0000-0000-0040-000000000000}\ T:


    c:\Tools\Everything>vol t:
    Volume in drive T is TEMP
    Volume Serial Number is 166A-C5AA
  • Repeat this for the other disk of the pair
  • Compare the results of both disks.


I suspect the the Volume Serial Numbers of both disks of a pair are the same. IIRC, Windows uses that to build the DeviceID from.
So, if that is the case, changing the Volume Serial Number of one of those those disks should fix it. There are tools to do that, but let's take it step by step.



Pesonally, I would approach this in a different way as the contents of your movie disks seem quite static:
  • Create a EFU file list for each of your disks adn save it as ##017.EFU, etc.
  • Save them all in one folder
  • In Everything include these EFU file lists:
    • Go to Menu:Tools > Options > Indexes > File Lists
    • Click Add
    • Browse to your EFU file folder
    • select all EFU files
    • click Open
    • click OK
  • In the Everything results, right-click the Name column header
  • Select (activate/check) File List FileName
Now, when you search for 'gladiator', you will find the disk it is on in the File List FileName column
Commerzpunk
Posts: 6
Joined: Sun Apr 18, 2021 8:53 pm

Re: Forgets a drive when a new one is connected

Post by Commerzpunk »

Well @NotNull, that was a very good answer, i tried what you posted and it looks like you are right!

Code: Select all

\\?\Volume{a1b2c3d4-0000-0000-0000-100000000000}\  D:
Datenträger in Laufwerk D: ist AV020
Volumeseriennummer: F8F5-036F

\\?\Volume{a1b2c3d4-0000-0000-0000-100000000000}\  D:
Datenträger in Laufwerk D: ist AV018
Volumeseriennummer: AE3E-EB16
As far as I understand your answer, the results are a bit like the opposide of what you expected.
The device ID is the same, but the Volume Serial Number is different.

Lets see where this ends... ;)
Last edited by NotNull on Mon Apr 19, 2021 5:50 pm, edited 1 time in total.
Reason: Edited volume GUIDs for privacy
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Forgets a drive when a new one is connected

Post by NotNull »

Thanks for testing!
Commerzpunk wrote: Mon Apr 19, 2021 4:35 pm As far as I understand your answer, the results are a bit like the opposide of what you expected.
Might looks that way, but I actually expected the volume UUIDs to be the same (edited to {a1b2c3d4-0000-0000-0000-100000000000}. btw to protect your privacy ), but I expected the 'Volumeseriennummer' to be the root cause of it. And that theory looks to be a wrong.


The UUID's being the same will definitely cause the issues you are experiencing.
Undoubtedly it is possible to change that volume ID, but I do not know how (yet). Will do some research.
void
Developer
Posts: 16748
Joined: Fri Oct 16, 2009 11:31 pm

Re: Forgets a drive when a new one is connected

Post by void »

If Everything is seeing different drives with the same GUID, disabling auto_remove_moved_ntfs_volumes should prevent the old volumes from being removed from your index when adding a volume with the same GUID.

To disable auto_remove_moved_ntfs_volumes:
  • In Everything, type in the following search and press ENTER:
  • /auto_remove_moved_ntfs_volumes=0
  • If success, you should see auto_remove_moved_ntfs_volumes=0 in the status bar for a few seconds.
Commerzpunk
Posts: 6
Joined: Sun Apr 18, 2021 8:53 pm

Re: Forgets a drive when a new one is connected

Post by Commerzpunk »

Hello @void,

i tried that, it did accept the changes, but there is no change in the behavior.
After i diabled the parameter i changed the drives a couple of times to give a change to index all.
I even restartet Everything and did the same again.
No change, drives keep disappearing.

In an other forum i got a recommendation for a tool to change the volume ID.

Forum:
https://www.kodinerds.net/index.php/Thr ... pportfall/

Tool:
https://www.heise.de/download/product/volumeid-49240


Would that be fine to just use that tool?
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Forgets a drive when a new one is connected

Post by NotNull »

Commerzpunk wrote: Wed Apr 21, 2021 5:55 am In an other forum i got a recommendation for a tool to change the volume ID.
That will change the 'Volumeseriennummer', which isn't much help in this case.

I did *a lot* of reading on this subject (still do), but no clear solution.
However, I did found a way to change the volume UUID/GUID ( {a1b2c3d4-0000-0000-0000-100000000000} ).

Will post that tonight (European timezone).
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Forgets a drive when a new one is connected

Post by NotNull »

There are no solutions presented so far, but this works here:
(Should be pretty harmless, but no guarantees; use at your own risk)
  • Make a note of the current values of each of your disks in a 'pair' ( [1] \\?\Volume{a1b2c3d4-0000-0000-0000-100000000000}\ [2] D: [3] F8F5-036F )
  • Attach one of your problematic USB disks
  • Start an elevated CMD prompt
  • Run diskmgmt.msc
  • Select your disc from the list
  • Make sure it's type is Basic, like this:
    2021-04-21 12_26_39-Window.png
    2021-04-21 12_26_39-Window.png (11.65 KiB) Viewed 22641 times
  • If not: Stop right here. There might be too many dependencies.
    (it is very unlikely that an external disk is not of the Basic type, but better be 100% certain)
  • Close Disk Management
  • Safely remove the USB disk (important!)
  • Run regedit.exe from the still open elevated CMD prompt
  • Go to HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices
  • Sèlect the \\?\Volume{a1b2c3d4-0000-0000-0000-100000000000} entry.
  • Rename it to xxxxx\\?\Volume{a1b2c3d4-0000-0000-0000-100000000000}
  • Select the \DosDevices\D:
    (replace D: with the actual driveletter)
  • Rename it to xxxxx\DosDevices\D:
  • Exit Registry Editor
  • Attach the disk you just removed.
    It might get a different Driveletter
  • Run the following command and make a note of the output:

    Code: Select all

    wmic.exe volume WHERE DriveLetter='X:' get DriveLetter,DeviceID
    
    (replace X: with the actual driveletter)

    This should give you a new GUID
  • Safely remove the USB disk
  • Attach the other disk of the 'pair'
  • Run the following command and make a note of the output:

    Code: Select all

    wmic.exe volume WHERE DriveLetter='X:' get DriveLetter,DeviceID
    
    (replace X: with the actual driveletter)
  • Compare the output with that of the first disk.
  • If they have a different GUID: It should be fixed. Test it in Everything.
  • If they have the same GUID: both disks present the same information to Windows on a hardware/firmware level. Not much you can do about that (at least: for me; I have no idea how to fix that)
    If that is the case: I would like to know what brand/ type of disks do that, so I can avoid buying those.
  • Close CMD

If both disks still get the same \\?\Volume{a1b2c3d4-0000-0000-0000-100000000000} UUID, you can still try the EFU File List suggestion. That should work regardless.
void
Developer
Posts: 16748
Joined: Fri Oct 16, 2009 11:31 pm

Re: Forgets a drive when a new one is connected

Post by void »

Of course i have the swich "keep index for offline drives" for each drive and in general.
Could you please confirm automatically remove offline volumes is unchecked:
  • In Everything, from the Tools menu, click Options.
  • Click the NTFS tab on the left.
  • Uncheck Automatically remove offline volumes (was this checked?)
  • Click OK.
Does the issue occur in the new Everything 1.5 alpha ?
Commerzpunk
Posts: 6
Joined: Sun Apr 18, 2021 8:53 pm

Re: Forgets a drive when a new one is connected

Post by Commerzpunk »

void wrote: Thu Apr 22, 2021 5:44 am
Of course i have the swich "keep index for offline drives" for each drive and in general.
Could you please confirm automatically remove offline volumes is unchecked:
  • In Everything, from the Tools menu, click Options.
  • Click the NTFS tab on the left.
  • Uncheck Automatically remove offline volumes (was this checked?)
  • Click OK.
That was, what i meant, and yes, it was unchecked.

void wrote: Thu Apr 22, 2021 5:44 am Does the issue occur in the new Everything 1.5 alpha ?
I am sorry, its exactly the same using the really good looking 1.5 alpha.
Commerzpunk
Posts: 6
Joined: Sun Apr 18, 2021 8:53 pm

Re: Forgets a drive when a new one is connected

Post by Commerzpunk »

NotNull wrote: Wed Apr 21, 2021 8:28 pm There are no solutions presented so far, but this works here:
(Should be pretty harmless, but no guarantees; use at your own risk)
  • Make a note of the current values of each of your disks in a 'pair' ( [1] \\?\Volume{a1b2c3d4-0000-0000-0000-100000000000}\ [2] D: [3] F8F5-036F )
  • Attach one of your problematic USB disks
  • Start an elevated CMD prompt
  • Run diskmgmt.msc
  • Select your disc from the list
  • Make sure it's type is Basic, like this:
    2021-04-21 12_26_39-Window.png
  • If not: Stop right here. There might be too many dependencies.
    (it is very unlikely that an external disk is not of the Basic type, but better be 100% certain)
  • Close Disk Management
  • Safely remove the USB disk (important!)
  • Run regedit.exe from the still open elevated CMD prompt
  • Go to HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices
  • Sèlect the \\?\Volume{a1b2c3d4-0000-0000-0000-100000000000} entry.
I followed your instructions until here.
Cant go on at this point because there is not entry for this (of course my real one, not your example) GUID in HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices in my registry.
NotNull wrote: Wed Apr 21, 2021 8:28 pm [*]Rename it to xxxxx\\?\Volume{a1b2c3d4-0000-0000-0000-100000000000}
[*]Select the \DosDevices\D:
(replace D: with the actual driveletter)
[*]Rename it to xxxxx\DosDevices\D:
[*]Exit Registry Editor
[*]Attach the disk you just removed.
It might get a different Driveletter
[*]Run the following command and make a note of the output:

Code: Select all

wmic.exe volume WHERE DriveLetter='X:' get DriveLetter,DeviceID
(replace X: with the actual driveletter)

This should give you a new GUID
[*]Safely remove the USB disk
[*]Attach the other disk of the 'pair'
[*]Run the following command and make a note of the output:

Code: Select all

wmic.exe volume WHERE DriveLetter='X:' get DriveLetter,DeviceID
(replace X: with the actual driveletter)
[*]Compare the output with that of the first disk.
[*]If they have a different GUID: It should be fixed. Test it in Everything.
[*]If they have the same GUID: both disks present the same information to Windows on a hardware/firmware level. Not much you can do about that (at least: for me; I have no idea how to fix that)
If that is the case: I would like to know what brand/ type of disks do that, so I can avoid buying those.
[*]Close CMD
[/list]


If both disks still get the same \\?\Volume{a1b2c3d4-0000-0000-0000-100000000000} UUID, you can still try the EFU File List suggestion. That should work regardless.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Forgets a drive when a new one is connected

Post by NotNull »

OK, that was unexpected. Will do some more thinking ...
Commerzpunk
Posts: 6
Joined: Sun Apr 18, 2021 8:53 pm

Re: Forgets a drive when a new one is connected

Post by Commerzpunk »

Are there any results or new ideas that i can try?
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Forgets a drive when a new one is connected

Post by tuska »

Hi,
Have you tested the behavior with the current Everything 1.5.0.1265a alpha version?
(Maybe there was already something in the changes that affects your problem).
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Forgets a drive when a new one is connected

Post by NotNull »

tuska wrote: Fri Jun 25, 2021 4:34 pm Maybe there was already something in the changes that affects your problem).
That won't help. It is a problem with the hardware. Everything can't do anything about that. Two disks are presented with the exact same ID. They are the same to Everything. So when you connect disk 2 after disk 1, it is seen as the same disk with 'just' a lot of changes.

I was trying to find a way to make Windows see them as different disks, which would cause Everything to see them as different disks too.
But that didn't work as expected.


@Commerzpunk:
I think it is too tricky (dataloss) to go any further with this.
My suggestion would be to take one 'twin' of each of your 2 sets out of rotation and use them for something else.
Or create a filelist of them and add those to the Everything database, as described earlier.

No more ideas beyond that. Sorry ..
Post Reply