Windows drive letters and cinder volumes ??

How does Windows persist drive letters when attaching/detaching cinder volumes ?

Whenever filesystems are mounted inside Windows instances the administrator will usually assign a drive letter to the device. This information is made persistent inside the registry HKLM\SYSTEM\Mounted Devices registry subkey. Therefore the drive letter will be always persistent as long as you have the volume attached to the same instance. The device order does not matter in this case. My information was based on the quote I found at windowsitpro.com stating :

According to a Microsoft Customer Service and Support (CSS) representative, Windows uses the disk ID as an index to store and retrieve information about the disk. For example, in the HKLM\SYSTEM\Mounted Devices registry subkey, the disk ID appears as REG_BINARY data in the \DosDevices\ and \\??\Volume{} entries because Windows uses the disk ID to store and retrieve information about persistent drive letter mappings and mount points.

And what happens if you detach and attach cinder volumes in the wrong order ?

In short nothing, as long as the volumes are attached to the same system retaining the same copy of the registry. If ever the registry or the system changes, the device letter will be reordered. That’s also a good reason to choose your device description wisely in case you have to recover from a instance/OS issue.