So i had a problem where a server disk was under too much load, partitions were running out of space and the server just needed some love. This would be simple enough if the driver were all in their own VHD, but in this server, they were not. They were setup as a 120+200+200 

The C drive was running out of space, and the IO on the second drive was getting too high. The only way forward was to move the middle 200GB partition to another VHD. The server was running Exchange and SQL from this partition, no a drag and drop was never going to work.

After a few weeks of thinking, and lots of searching on the internet, i came up with a through of using windows software raid to create a mirror to another VHD. I added the VHD into the server and started playing around with the mirrored sets. I was able to create and break the mirrors as i wanted. I made a 10GB partition, setup a mirror, put some files, then broke it. Problem was that when you break the mirror, it was a little hit and miss about if Disk 0 or Disk 1 retained the drive letter.

I setup the mirror of the Exchange drive, waited hours for them to sync, then tested it out. Failure 🙁 When i broke the set, Disk 0 remained the master still, Disk 1 received a new drive letter.

Two more tests produced the same result.

It took a few days later when i remembered my old friend DISKPART. Back to the test server and logged in, fired up disk part. It was able to show me the volumes i had created. A bit of playing, and i was now able to break the mirror how i wanted.

The the moment of truth, breaking the mirror of the live Exchange drive….

Diskpart

List Disk
List Volume

Select Volume 1

break disk=0 nokeep

5 min later DiskPart successfully broke the mirror volume… into OWA to test things were still working…. BAM all working as expected

diskpart

I will test this on the live server on the weekend, but im stoked.

I have successfully moved a partition to another drive, with no data loss or interruption to a live production server. This same system could be used to move a partition to a new drive to allow space increase like i have or to migrate to a new drive. There is no restriction on the physical/virtual drive, as long as the drive has enough space to create a partition the same size as the original drive.

Who would have thought that little old diskpart could still do so many cool thing.

« »