For our off-site off-line scenario I was planning to reuse a bunch of 1TB 3.5 inch SATA hard disks that previously made up a RAID array in a recently retired server.
To conveniently swap backup disks I've set-up an eSATA dock to the computer that makes backups.
I want to copy all our VMs to a hard disk, and then have someone take that disk home at regular intervals.
I created a single primary partition on each hard disk and formatted it as NTFS.
The batch file I had scripted together seems to work fine. So far so good.
The script uses drive letter W:, and because that does not appear to be consistent for all the drives, the script would only work for one disk.
There is an easy way to have a partition always use the same letter, and that is by manually changing it with
But I needed all my partitions to show up as the same letter.
After some experiments I found that the assigned drive letter is tied to the Volume id or Volume Serial Number of an NTFS partition.
This is a 32 bit ID that you might have seen before, because it's listed in the output of the dir command:
Those IDs are automatically generated when the filesystem is created, and the versions of Windows that we use (Windows 7, and Windows Server 2008R2) do not offer a way to change it.
The Sysinternals collection however contains the
volumeid.exe tool that does the trick. It can be downloaded for free at http://technet.microsoft.com/en-us/sysinternals/bb897436.
I set the ID to the same value (
CAFE-BABE) for all the NTFS partitions on my disks.
After that I used
diskmgmt.msc to change the drive letter to W:.
At this moment my Windows system will always use W: for partitions with ID CAFE-BABE.
So it does not matter which of the hard disks I connect to the computer, it will always look like this:
Note that the VolumeID-driveletter mapping is fixed but limited to a specific Windows computer.
So all the CAFE-BABE partitions will likely show up as a different letter on another Windows computer.
But the good thing is that that letter will be the same again for all partitions.