There was a recent task to expand the Windows 2003 system disk. Since the server was running on a virtual platform (ESX), the easiest thing to do is to increase the size of the virtual disk and then connect the disk to another virtual machine (Windows 2003 does not allow you to change the size of the system disk).
After connecting the drive, Windows did not automatically assign a drive letter, which, incidentally, was not necessary. After starting diskpart and selecting a partition
list volume select volume %Volume Number%
The extend command gave an error and suggested choosing another partition for the extension. It was not possible to use any third-party programs, so I had to find a solution. It turned out that in order to work with a partition, although it is visible in the list of diskpart partitions, it must be assigned a letter. After that, the volume was successfully expanded to all free disk space. ')
For Windows XP, this requirement is also important, the differences will be in the diskpart commands:
list disk select disk %Disk Number% list partition select partition %Partition Number%
In addition, in Windows 2003, you can immediately select Volume without choosing a disk. Perhaps someone will benefit from this experience.