Volume numbers in the "Volume ###" column may change every time that you run the "List Volume" command in the Diskpart.exe utility in Windows


Symptoms


Consider the following scenario. You run the List Volume command in the Diskpart.exe command-line utility to display all the volumes on a Microsoft Windows-based computer. (This command also displays the drive letters that correspond to these volumes.) Then, you exit the Diskpart.exe utility. Next, you restart the Diskpart.exe utility, and then you run the List Volume command again to display all the volumes on the computer.

In this scenario, the volume-numbering scheme that appears in the Volume ### column the first time that you run the List Volume command may not match the volume-numbering scheme from the second time that you run the command. This behavior may cause problems if you rely on Diskpart.exe volume-numbering when you process scripts.


Note On a Microsoft Windows Server 2003-based computer, you may first notice this behavior after you upgrade from Windows Server 2003 Service Pack 1 (SP1) to Windows Server 2003 Service Pack (SP2). This behavior may also occur after you install the 923076 hotfix. Windows Server 2003 SP2 and the 923076 hotfix both install a newer version of the Diskpart.exe utility.

Cause


The volume numbers that are used in the Diskpart.exe utility are not intended to coincide with any other numbering schemes. The volume numbers represent a simple number index, and these numbers may vary every time that you run the Diskpart.exe utility.

Workaround


To work around this behavior, use one of the following methods:
  • Keep the Disk Management console (Diskmgmt.msc) running while you process scripts. Or, keep an instance of the Diskpart.exe utility running in the background while you process scripts. When you do this, the volume numbers should not change between instances of the Diskpart.exe utility.
  • Use the volume Label information instead of the volume number to track particular volumes.


    Note This method requires that you use unique volume names for each partition.

More Information


For more information about the Diskpart.exe command-line utility, click the following article number to view the article in the Microsoft Knowledge Base:

300415 A Description of the Diskpart command-line utility

For more information about a similar issue with disk numbering, click the following article number to view the article in the Microsoft Knowledge Base:

937251 The disk-drive numbers on a Windows Vista-based computer may not correspond as expected to the SATA channel numbers